chore: migrate to OpenAPI snapshot for schema drift detection#36
Merged
Conversation
- Add docs/openapi-snapshot.json seeded from uk.dev.inforcerdev.net/openapi.json - Remove docs/api-schema-snapshot.json (obsolete) Paired with Powershell-Module-Automation switch from Test-ApiSchemaChanges.ps1 to compare-openapi.sh. The new nightly workflow diffs the published OpenAPI spec directly instead of inferring schemas from live endpoint responses — kills the false-positive drift PRs caused by response-data variance.
There was a problem hiding this comment.
Pull request overview
This PR replaces the prior custom “API schema snapshot” artifact with a committed OpenAPI (3.0.1) JSON snapshot intended to serve as the baseline for detecting API schema drift over time.
Changes:
- Added
docs/openapi-snapshot.jsoncontaining a full OpenAPI snapshot of the public API surface. - Removed
docs/api-schema-snapshot.json, the previous derived schema snapshot format.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/openapi-snapshot.json | Adds the OpenAPI JSON snapshot intended as the new drift-detection baseline and documentation source. |
| docs/api-schema-snapshot.json | Removes the legacy schema snapshot artifact being replaced by the OpenAPI snapshot approach. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+4410
to
+4414
| "servers": [ | ||
| { | ||
| "url": "http://localhost:7072/api" | ||
| } | ||
| ], |
Comment on lines
+1
to
+5
| { | ||
| "components": { | ||
| "responses": { | ||
| "conflict": { | ||
| "content": { |
0b9f444 to
40e58b0
Compare
Comment on lines
+4410
to
+4414
| "servers": [ | ||
| { | ||
| "url": "http://localhost:7072/api" | ||
| } | ||
| ], |
Comment on lines
+1
to
+3
| { | ||
| "components": { | ||
| "responses": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
How the flow works after merge
production-readylabel. Otherwise silent, retries tomorrow.production-ready, you merge it. The updated snapshot becomes the new baseline.Test plan
openapi.jsonURLs reachable (dev + prod currently byte-identical, noservers/infodivergence)required[]) all detect correctlyactionlintclean on both workflows