Docs: Add note about YAML reserved words in ConfigurationProperties#12427
Merged
graemerocher merged 2 commits intoMar 5, 2026
Merged
Conversation
Added documentation explaining that YAML has reserved boolean words (yes/no, true/false, on/off) that are automatically converted to boolean values when used as unquoted keys in YAML configuration. This clarifies the behavior described in issue micronaut-projects#12409 where property names like 'yes' and 'no' fail to bind because SnakeYAML parses them as booleans. The note includes: - List of affected reserved words - Explanation of the issue - Workaround example using quoted keys - Reference to YAML 1.2 specification Fixes micronaut-projects#12409 Signed-off-by: Nikita Nagar <permanayan84@gmail.com>
graemerocher
requested changes
Mar 4, 2026
Changed 'This includes:' to 'These includes:' since 'words' is plural. This addresses the review comment from @graemerocher. Signed-off-by: Nikita Nagar <permanayan84@gmail.com>
graemerocher
approved these changes
Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Added documentation explaining YAML reserved boolean words (yes/no, true/false, on/off) and how they are automatically converted to boolean values when used as unquoted keys in YAML configuration.
Problem
When property names like yes or no are used in YAML configuration without quotes, SnakeYAML parses them as boolean values (true/false) instead of strings. This causes the property binding to fail.
Solution
Added a comprehensive note in the configurationProperties.adoc documentation that:
Changes
Modified:
Test Plan
Fixes #12409