Skip to content

feat(compare): enhance API signature comparison and display#140

Merged
AmiteK23 merged 1 commit intomainfrom
feat/compare-api-signature-diff
Mar 9, 2026
Merged

feat(compare): enhance API signature comparison and display#140
AmiteK23 merged 1 commit intomainfrom
feat/compare-api-signature-diff

Conversation

@AmiteK23
Copy link
Member

@AmiteK23 AmiteK23 commented Mar 9, 2026

Description

Adds backend API signature comparison support to the stamp context compare command.

This PR:

  • compares interface.apiSignature in diff results
  • detects parameter changes, including added, removed, and modified parameters with type information
  • detects return type, request type, and response type changes
  • updates compare output to display detailed API signature deltas
  • extends unit tests to cover API signature comparison scenarios

This completes comparison support for extracted backend API contract data.


Type of Change

  • Bug fix
  • Feature
  • Breaking change
  • Docs
  • Refactor
  • CI / Tests
  • Performance
  • Other (please describe):

Architectural Impact

  • No contract/output changes
  • Contract/output changed (describe below)

If contract/output changed, explain the impact on:

  • Bundle structure: No bundle schema changes
  • CLI flags: No CLI flag changes
  • Watch/strict behavior: No watch/strict behavior changes
  • Comparison output: apiSignature is now included in compare diff detection and detailed display output

Testing

  • Tested locally
  • Tests added/updated
  • All tests pass

Related Issues

None.

Checklist

  • Target branch is main
  • Self-reviewed
  • Docs updated (if needed)
  • Changelog updated (if needed)

Additional Notes

  • Includes detailed parameter-level diff rendering for backend API signature changes
  • Includes apiSignature in non-hash change detection for git baseline comparison mode
  • Improves backend contract drift detection in compare results

- Add support for detecting changes in API signatures, including parameters and return types.
- Update comparison logic to include API signature deltas in the diff results.
- Enhance display functions to show detailed changes for added, removed, and modified API signatures.
- Extend unit tests to cover various scenarios for API signature changes in comparison results.
@AmiteK23 AmiteK23 merged commit c145c85 into main Mar 9, 2026
7 checks passed
@AmiteK23 AmiteK23 deleted the feat/compare-api-signature-diff branch March 10, 2026 18:50
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.

1 participant