-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
Description
Description
Currently if you use enums in extension config mappings, the javadoc is extracted from each value of that enum and added as a tooltip in the extension's configuration reference. See for example
This is a very nice feature, but only works if the enum is in the extension source. Which is sometimes impractical, because the library we're integrating in the extension might already define its own enums, perhaps even with javadoc.
If we switch to an enum of our own like we do in #51629 , just for the purpose of documenting each value of the enum, we run the risk of the library changing the enum's values without us noticing (e.g. adding new values), and then the configuration is more limiting than it should be.
Implementation ideas
Could we either:
- Ideally, extract the library's enum javadoc and use that? That would likely be challenging.
- More realistically, provide a way to use the library's enums for configuration, while (somehow) adding documentation to each value? E.g. We could imagine an annotation to be put on the configuration method:
@ConfigDocEnumValueDocs(value = "AUTO", docs = "This is some docs")? Or something less ugly :)