Skip to content
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

Improve way to manage default values in case of a Map #584

Merged
merged 1 commit into from
Jun 1, 2021
Merged

Improve way to manage default values in case of a Map #584

merged 1 commit into from
Jun 1, 2021

Conversation

essobedo
Copy link
Contributor

@essobedo essobedo commented Jun 1, 2021

Follow up of #579

Motivation

The current documentation about the support of Map doesn't describe how to define default values, it needs to be added. Moreover #579 adds a sonar violation , it needs to be fixed. Finally tests on failures are missing.

Modifications:

  • Rewrites the converter to avoid relying on a regular expression with a negative lookbehind to fix the Sonar violation
  • Adds a new config message for the MapConverter in case of invalid format
  • Adds unit tests to check that errors are properly thrown in case sub properties are missing and default value is not in the expected format.
  • Modifies the example for @ConfigProperty to set defaultValue and describe how to use it properly

@essobedo essobedo changed the title Describe how to define default values in case of a Map Improve way to manage default values in case of a Map Jun 1, 2021
@essobedo
Copy link
Contributor Author

essobedo commented Jun 1, 2021

@radcortez Hi, here is the missing part of the previous task

@radcortez
Copy link
Member

Thanks!

@radcortez radcortez merged commit 37ba473 into smallrye:main Jun 1, 2021
@essobedo essobedo deleted the doc-map-support-improvment branch June 1, 2021 20:41
@radcortez radcortez added this to the 2.4.0 milestone Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants