ConfigSchemaGenerator: Ignore case and support named options#4795
Merged
eerhardt merged 7 commits intomicrosoft:mainfrom Jul 11, 2024
bart-vmware:config-schema-generator-casing-named-options
Merged
ConfigSchemaGenerator: Ignore case and support named options#4795eerhardt merged 7 commits intomicrosoft:mainfrom bart-vmware:config-schema-generator-casing-named-options
eerhardt merged 7 commits intomicrosoft:mainfrom
bart-vmware:config-schema-generator-casing-named-options
Conversation
eerhardt
reviewed
Jul 8, 2024
eerhardt
approved these changes
Jul 10, 2024
Member
eerhardt
left a comment
There was a problem hiding this comment.
LGTM. Thanks again for the great contributions, @bart-vmware!
Contributor
Author
@eerhardt Thanks for timely reviewing and providing good feedback. |
Member
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
bart-vmware
added a commit
to SteeltoeOSS/Steeltoe
that referenced
this pull request
Jul 11, 2024
Based on changes from microsoft/aspire#4795
bart-vmware
added a commit
to SteeltoeOSS/Steeltoe
that referenced
this pull request
Jul 11, 2024
Based on changes from microsoft/aspire#4795
…ator-casing-named-options
bart-vmware
added a commit
to SteeltoeOSS/Steeltoe
that referenced
this pull request
Jul 15, 2024
Based on changes from microsoft/aspire#4795
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR updates the Config Schema Generator tool to handle casing differences in log categories, config paths, type names, and property names. There's no way to determine the "right" casing, ie: should "One" win over "one"? Therefore I've
onlymade sure that the nodes get unified (so you'll either get "One" or "one", but never both), and that the last occurrence always wins, and capture this behavior in tests:OverwritesLogCategoriesWithDifferentCasingLastUsedCasingOfLogCategoryWins: Casing of the last occurrence wins.MergesPropertiesAtConfigPathWithDifferentCasingLastUsedCasingOfConfigPathWins: Casing of thefirstlast occurrence wins.MergesTypesWithDifferentCasingLastUsedTypeDocumentationWins:CasingDocumentation of the last occurrence wins.OverwritesPropertyWithDifferentCasingLastUsedCasingOfPropertyWins: Casing of the last occurrence wins.Additionally, this PR implements support for named options, as proposed in #4775.
Fixes #4773.
Closes #4775.
/cc @eerhardt
Microsoft Reviewers: Open in CodeFlow
Edit: Renamed tests to clarify their purpose, and ensure the last occurrence always wins.