Skip to content

"Partial matching" for @ConfigMapping #22063

Closed Answered by radcortez
famod asked this question in Q&A
Discussion options

You must be logged in to vote

At this time, there is no way to provide partial mappings. The mappings start from a provided namespace (or subnamespace - the prefix) and expect all properties found to be mapped or a validation exception occurs (you can disable it like you are doing with smallrye.config.mapping.validate-unknown).

There is also no way at the moment to retrieve subtrees of the mapping.

Is it a big issue to map schedule even if is not going to be used? The added benefit is that it will validate that the config is there, except if it is optional, and in that case you can use Optional.

Replies: 3 comments 3 replies

Comment options

famod
Dec 9, 2021
Collaborator Author

You must be logged in to vote
0 replies
Comment options

famod
Dec 9, 2021
Collaborator Author

You must be logged in to vote
1 reply
@radcortez
Comment options

Comment options

You must be logged in to vote
2 replies
@famod
Comment options

famod Dec 9, 2021
Collaborator Author

@radcortez
Comment options

Answer selected by famod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants