-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Configuration metadata processor ignores collection-based nested configuration non-primitive properties #9894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Two things:
We don't generate properties for list. Ever. What would be the key? I don't know what you are trying to do but when I remove the
Which works as advertized. If you have an idea to improve the javadoc and/or the doc of |
Thanks for the feedback. Few questions for my own understanding:
To elaborate further, I am working on a CLI interface that allows one to query a metadata repository to understand what fields and properties are available for a given group, etc. My goal is that when the metadata repository is queried, the user/developer can learn that "oh, there is apparently a {
"hints": [],
"groups": [
...
],
"properties": [
...
{
"sourceType": "org.example.additional.metadata.MyConfigProps",
"name": "my.sth",
"type": "java.util.List<org.example.additional.metadata.SomethingProperties>",
"indexed": [
{
"sourceType": "org.example.additional.metadata.SomethingProperties",
"type": "java.lang.String",
"name": "my.sth[index].test"
}
]
}
]
} For the
|
If you have questions, can you please ask them on Gitter/Stackoverflow? Generating metadata for nested POJOs is not at the agenda so I am afraid that you'll have to discover those properties yourself in such cases (that's what IDEs are doing). I'll give some thoughts as how we can improve the javadoc of |
Sure thing, will do wrt Gitter. However, there is a question that I think deserves to be asked here. I am not really interested in improving the documentation with a PR as much as I was interested in getting this to work "properly" with a PR. If understood you correctly, are you saying that sort of change would not be accepted and that I'd have to deal with it on my own? Thanks again. |
Yes, that's what I meant by " Generating metadata for nested POJOs is not at the agenda". We've thought about supporting it and the number of corner cases that such support would bring is too high to consider the feature. We have to stop somewhere and I believe that stopping at collections/maps is the right call. To make that a bit more clear. Let me close this issue and I'll create another one for the documentation. |
Background
I first discussed this issue in the Gitter chatroom with @dsyer and I suspect the potential diagnosis was that it's a bug. So I'd like to document it here first and bring it to your attention, and certainly plan to offer a fix with a follow-up pull request if there is interest and need.
Problem Statement
The configuration metadata processor seems to be ignoring nested configuration properties and fields that are of type
Collection
and the inner type is an external class. When a properly configured build is run, the final generated metadata in the.json
file does not contain any of the fields expected to be found in the inner class in some indexed way perhaps.Example:
After the processor has run, under
groups
one can find a reference tosth
in the generated JSON metadata yet theproperties
do not contain any references or fields that belong toSomethingProperties
. The sample application above should demonstrate this well. I am not entirely familiar with this area myself, but having worked with @wilkinsona before a bit I don't think this situation is by design.Thank you for your time.
The text was updated successfully, but these errors were encountered: