Skip to content

ci: enforce OpenAPI consumer contract in the central PR gate - #54

Closed
mojtaba-arvin wants to merge 4 commits into
mainfrom
ci/openapi-contract-central-gate
Closed

mojtaba-arvin wants to merge 4 commits into
mainfrom
ci/openapi-contract-central-gate

Conversation

@mojtaba-arvin

@mojtaba-arvin mojtaba-arvin commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes the OpenAPI CI blind spot identified in #48.

  • Convert the OpenAPI contract workflow into a reusable workflow while retaining manual dispatch.
  • Add an openapi path-classification output for all package runtime modules and the OpenAPI consumer example/design.
  • Invoke the OpenAPI contract from the central PR gate whenever those paths change.
  • Make the central gate require the OpenAPI result when applicable; a skipped or failed required contract can no longer be silently omitted.
  • Add classifier tests for routers, registry, decorators, settings, reverse, URLconf, the example, design document, and workflow.

Division of coverage with PR #44

The DRF custom-action removal example is already implemented on PR #44's branch: it removes product-legacy-export through VersionedRouter.remove(..., from_version=2), asserts V1 runtime success and V2 404, and asserts the operation is present in the V1 schema but absent from V2. PR #44 also uploads candidate schemas before baseline verification. This PR supplies the missing central gate and broad path classification that ensure those checks run for every relevant runtime change.

Verification

Verified on head 64ed4b21769dea07fecdc631e3f1dc3f6277ba71:

  • Pull request gate: passed.
  • Path classifier: passed.
  • OpenAPI consumer contract: passed.
  • Agent/workflow policy validation, including YAML validation and classifier tests: passed.
  • Unrelated Python, compatibility, package, website, and dependency jobs were correctly skipped for this CI-only change.

Run: https://github.com/mojtaba-arvin/django-api-versioning/actions/runs/44352163913

PR remains Draft pending final cross-PR review.

Copy link
Copy Markdown
Owner Author

Superseded by the consolidated integration PR #58, which includes this work and passed the complete required PR gate on exact head 98f79472777f9e8e0bbf78c16531d97a46ad0a3a. The consolidated change is now merged to main as a8b39343c478bb5a8afbe1de20d95a2b10630f37. Closing this focused PR to avoid leaving duplicate, already-integrated branches open; its implementation history remains in the PR conversation and the consolidated merge.

@mojtaba-arvin
mojtaba-arvin deleted the ci/openapi-contract-central-gate branch November 19, 2026 09:34
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