name: openapi-changelog description: Diff rest-openapi.yaml against main and summarize REST API contract changes. Use before running buildREST (gate check for breaking changes) or after buildREST to document what changed for a PR description.
Steps
Get the diff of
rest-openapi.yamlagainstmain:git diff main -- modules/headless-delivery-ext/headless-delivery-ext-impl/rest-openapi.yamlIf there's no diff against
main, checkHEAD~1:git diff HEAD~1 -- modules/headless-delivery-ext/headless-delivery-ext-impl/rest-openapi.yamlAnalyze the diff and produce a structured summary under these headings (omit any heading with no changes):
Endpoints
- Added: list new
pathsentries with HTTP method and summary - Removed: list deleted paths
- Modified: list changed paths and describe what changed (parameter name, type, required flag, response schema)
Schemas
- Added: new
components/schemasentries - Removed: deleted schemas
- Modified: changed properties (type changes, added/removed fields, required changes)
Breaking changes (flag explicitly):
- Removed endpoints or schemas
- Changed parameter types or names
- Removed required fields that were previously required
- Added: list new
If the diff is empty, output: "No changes to rest-openapi.yaml relative to main."
If breaking changes are present, prepend a GATE warning before the summary:
⚠ BREAKING CHANGES DETECTED — confirm with the user before running buildREST. Clients consuming these endpoints will need to be updated.
Keep the summary concise — one bullet per change, no YAML quoting. The goal is a human-readable changelog entry or pre-buildREST gate check, not a raw diff replay.