Repository navigation
fix(differs.openapi): account for enum constraint interactions - #60
Merged
Merged
Conversation
qballer
approved these changes
Nov 8, 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.
Change
Fix enum compatibility false negatives following #59. The shared walker retains simultaneous enum and const changes, so response
const: a→enum: [a, b]and inputenum: [a, b]→const: arequire major bumps.Preserve minor recommendations for equivalent const/singleton-enum substitutions. Equivalence is proven from both schema objects inside the walker, including JSON object key-order independence; raw changes remain complete. Coexisting constraints and unrelated same-name parameters cannot share equivalence evidence. JSON arrays and objects with numeric keys remain distinct values. Object comparisons require matching own keys, including JSON
__proto__properties, so inherited properties cannot prove equivalence.Treat enum changes inside actual
oneOfbranches conservatively as breaking: exactly-one matching defeats branch-local subset reasoning. Equivalent substitutions remain compatible. Escape parameter names so names containing/oneOf/0/cannot imitate composition paths.Validation
pnpm build,pnpm lint, changed-file ESLint, andpnpm testpass (46 tests).pnpm test:e2epasses (361 passed, 1 skipped). The original six interaction regressions fail against the previous implementation. Independent rereview passed 51 tests/probes, including the original findings, same-name query/header collision, and 100 enum/const/coexisting-constraint pairs; no actionable findings remain.git diff --checkpasses.Release impact
Corrects missed changes, retains equivalent substitutions, and makes enum changes under
oneOfconservative without proving branch disjointness. No package versions changed. Published consumers require a separately approved package/action release containing the fix; this PR does not authorize publishing, tags, or merging.