Skip to content

fix: ignore non-method keys in api-diff path iteration#395

Merged
shenbenson merged 1 commit into
masterfrom
fix-path-level-extensions-in-diff
May 8, 2026
Merged

fix: ignore non-method keys in api-diff path iteration#395
shenbenson merged 1 commit into
masterfrom
fix-path-level-extensions-in-diff

Conversation

@shenbenson

Copy link
Copy Markdown
Contributor

Summary

  • Filter path-item iteration to actual HTTP methods so path-level keys like x-internal, parameters, summary, etc. don't get reported as endpoint changes (was producing spurious [X-INTERNAL] /api/v2/{coin}/wallet/{walletId}/webhooks/notifications entries in release notes).
  • Fix a self-comparison typo in checkSimilarity() — the description-similarity check was comparing endpoint1.details.description to itself instead of endpoint2.details.description.
  • Add a path-level-extensions test fixture covering path-level x-internal, summary, and parameters.

Test plan

  • node --test tests/generate-release.test.js — 14/14 pass (13 existing + 1 new fixture)

🤖 Generated with Claude Code

path-level keys like x-internal, parameters, summary, etc. were
being treated as http methods, producing spurious entries like
[X-INTERNAL] in release notes. filter to known http methods.

also fix a self-comparison typo in checkSimilarity's description
check (was comparing endpoint1.description to itself instead of
endpoint2.description).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@shenbenson shenbenson requested a review from a team as a code owner May 8, 2026 18:54
@shenbenson shenbenson enabled auto-merge May 8, 2026 18:54
@shenbenson shenbenson merged commit 93e2b18 into master May 8, 2026
6 checks passed
@shenbenson shenbenson deleted the fix-path-level-extensions-in-diff branch May 8, 2026 18:56
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.

2 participants