fix: duplicate labels with ignore-case - #1797
Merged
Merged
Conversation
pierrecamilleri
force-pushed
the
fix/header-case
branch
from
July 28, 2026 09:52
7805c46 to
3a774a9
Compare
pierrecamilleri
added a commit
that referenced
this pull request
Jul 28, 2026
# Context follow-up to #1797, which handles duplicate labels when ignoring case. This PR handles ambiguous fields under "ignore-case=True", which were silently ignored during validation. # Fix Ambiguous fields under "ignore-case" raise now an error : there is no obvious default behavior and the schema schould *not* be used with "ignore-case=True" in this circumstances.
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.
Context
ignore-case(orheader-case) is a dialect option that affects validation by ignoring the case of the header. It is not specific to a schema, but to a validation instruction.It has subtle implications that were not correctly taken into account :
This PR handle an existing bug, where duplicate labels are not detected under "ignore-case=True", and introduces a refactoring to avoid such bugs in the future.
Proposition
LabelMatchingclass, which defines in one place the matching strategy.