-
Notifications
You must be signed in to change notification settings - Fork 114
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
Add the ability to group configuration into a class/interface #279
Comments
Timing isn't a concern from my perspective, it was more that it was an idea/note I'd had from a meeting ages ago and wanted to add it so it can be planned. |
We might be able to take it a bit farther tbh. For some of my other work I'm needing a more powerful configuration system, so it might be time to create something for complex configurations on SmallRye that we can move to (and maybe Quarkus can move there as well in the future). |
+1 to that |
@dmlloyd let me know some of your ideas and I might be able to help you implement it :) |
I'm still forming up my ideas. But one thing I'm sure of is that I have a lot of regret using fields in Quarkus instead of interfaces. My other ideas so far:
Obviously this does not all need to be "day one" functionality. |
Another thing to consider is validation. It'd be quite nice to have annotation-driven validation as part of this, which uses the validating converters we provide. Need to figure out: How lazy should validation be? Sometimes eager validation might be more useful; sometimes lazy might be. Being lazy means storing the configuration value and converting it lazily, which might be fairly inconvenient unless we enhance |
These are some awesome ideas, and the idea that interfaces can be used with the builder API aligns with how MP REST Client works as well. The automatic documentation from annotation is something that @cescoffier has done for Reactive Messaging. It could be something we can extract to a common thing for use by all. Should all these be separate issues, or leave here for now? |
I think it needs to marinate a bit longer since some of the answers to some questions have bearing on what the issues/implementation steps would even be. Let's keep it as one issue for now. |
We probably need to detail some of these and do it step by step of course. |
Initial implementation for this is coming in 1.9. We will add additional features as required in separate issues / PRs. |
Quarkus introduced
@ConfigProperties
(https://github.com/quarkusio/quarkus/blob/master/extensions/arc/runtime/src/main/java/io/quarkus/arc/config/ConfigProperties.java) as a way to mark all fields on a class/interface as having a common prefix.I think it would be a good feature to have within SmallRye Config as well.
It would likely simplify a lot of configuration usage in SmallRye projects
The text was updated successfully, but these errors were encountered: