Skip to content

feat: add --exclude-extensions flag to exclude specific extension names#788

Merged
reuvenharrison merged 3 commits intomainfrom
feat-765-exclude-extensions
Feb 5, 2026
Merged

feat: add --exclude-extensions flag to exclude specific extension names#788
reuvenharrison merged 3 commits intomainfrom
feat-765-exclude-extensions

Conversation

@reuvenharrison
Copy link
Collaborator

Summary

  • Adds new --exclude-extensions CLI flag to exclude specific OpenAPI extension names from diff
  • Unlike --exclude-elements extensions which excludes ALL extensions, this provides fine-grained control
  • Supports multiple extensions via comma separation or repeated flag usage
  • Also works via config file (oasdiff.yaml)

Closes #765

Usage

# Exclude specific extension
oasdiff diff base.yaml revision.yaml --exclude-extensions x-internal

# Exclude multiple extensions
oasdiff diff base.yaml revision.yaml --exclude-extensions x-internal,x-ignore

Config file:

exclude-extensions:
  - x-internal
  - x-ignore

Test plan

  • Added unit tests for exclude-extensions in diff package
  • Added CLI integration tests in internal package
  • All existing tests pass

🤖 Generated with Claude Code

…es (#765)

Add a new --exclude-extensions flag that allows users to exclude specific
OpenAPI extension names from the diff while keeping other extensions.

This is different from --exclude-elements extensions which excludes ALL
extensions. The new flag provides fine-grained control over which
specific extensions to ignore (e.g., x-internal, x-ignore).

Usage:
  oasdiff diff base.yaml revision.yaml --exclude-extensions x-internal
  oasdiff diff base.yaml revision.yaml --exclude-extensions x-internal,x-ignore

Also works in config file (oasdiff.yaml):
  exclude-extensions:
    - x-internal
    - x-ignore

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.49%. Comparing base (c8cb0b1) to head (6841120).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #788      +/-   ##
==========================================
+ Coverage   89.47%   89.49%   +0.01%     
==========================================
  Files         249      249              
  Lines       12435    12456      +21     
==========================================
+ Hits        11126    11147      +21     
  Misses        862      862              
  Partials      447      447              
Flag Coverage Δ
unittests 89.49% <100.00%> (+0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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 and others added 2 commits February 4, 2026 22:53
- Document the new flag in docs/DIFF.md
- Add example in the config file examples/oasdiff.yaml

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@reuvenharrison reuvenharrison merged commit 82af827 into main Feb 5, 2026
14 checks passed
@reuvenharrison reuvenharrison deleted the feat-765-exclude-extensions branch February 5, 2026 08:43
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.

Option to ignore certain fields in oasdiff diff command

2 participants