Skip to content

validate: report conflicting-paths and duplicate-parameter as errors - #1436

Merged
reuvenharrison merged 3 commits into
oasdiff:mainfrom
Yshuro:fix/validate-error-level-spec-violations
Nov 25, 2026
Merged

reuvenharrison merged 3 commits into
oasdiff:mainfrom
Yshuro:fix/validate-error-level-spec-violations

Conversation

@Yshuro

@Yshuro Yshuro commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

The OpenAPI specification forbids conflicting templated paths with identical hierarchies and duplicate parameters within a name and location with a MUST NOT.

Previously, oasdiff validate reported conflicting-paths and duplicate-parameter as warnings, allowing specifications containing these violations to pass with exit code 0.

This change:

  • Removes conflicting-paths and duplicate-parameter from ruleLevels downgrades in validate/rule_levels.go, so they report at the default ERR severity.
  • Updates validate/rule_levels_test.go to assert checker.ERR for both rules and verifies them against sample specifications.
  • Updates internal/validate_test.go so the command-line tests verify they exit with non-zero exit code 1 without requiring --fail-on INFO.
  • Updates docs/VALIDATE.md and the command help in internal/validate.go, which listed both rules as warnings.

Resolves #1435.

Yshuro and others added 2 commits November 21, 2026 09:59
The OpenAPI specification forbids conflicting templated paths with identical hierarchies and duplicate parameters within a name and location with a MUST NOT.

Previously, oasdiff validate reported conflicting-paths and duplicate-parameter as warnings, allowing specifications containing these violations to pass with exit code 0.

This removes both rules from ruleLevels downgrades, leaving them at the default ERR level, and updates test assertions accordingly.

Resolves oasdiff#1435.

Signed-off-by: Yshuro <yshuro1080@gmail.com>
…s in docs and help

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.18%. Comparing base (5b36896) to head (ecfa487).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1436      +/-   ##
==========================================
+ Coverage   92.04%   92.18%   +0.14%     
==========================================
  Files         386      386              
  Lines       15223    15222       -1     
==========================================
+ Hits        14012    14033      +21     
+ Misses       1211     1189      -22     
Flag Coverage Δ
unittests 92.18% <100.00%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@reuvenharrison
reuvenharrison merged commit 564a62b into oasdiff:main Nov 25, 2026
11 checks passed
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.

validate: conflicting-paths and duplicate-parameter are warnings, although the spec forbids both

3 participants