Skip to content

[#1150] Enforce OpenAPI runtime contract tests - #1158

Merged
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
Jagadeeshftw:feat/issue-1150-openapi-runtime-contracts
Aug 27, 2026
Merged

[#1150] Enforce OpenAPI runtime contract tests#1158
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
Jagadeeshftw:feat/issue-1150-openapi-runtime-contracts

Conversation

@Jagadeeshftw

Copy link
Copy Markdown
Contributor

Summary

  • add CI contract validation for OpenAPI 3.1 structure, references, paths, parameters, request schemas, and response declarations
  • run the validator from prebuild so contract drift blocks production builds
  • add runtime regression coverage for auth wallet/refresh requests, billing request documentation, webhook URL security, proxy-style success/error envelopes, and the canonical response envelope
  • retain deterministic tests that do not require a database, wallet, upstream service, or DNS success

Acceptance criteria

  • Required auth fields and enum/security constraints are exercised at runtime.
  • Success and error envelope shapes are parsed and asserted.
  • OpenAPI references and document structure are checked in CI.
  • Contract validation is part of the build lifecycle.

Verification

  • npx jest --runInBand --forceExit tests/contract/openapi-runtime.test.ts — 26 tests passed
  • npm run validate:openapi — contract structure valid (32 paths, 42 operations)
  • npm run prebuild — passed; reports existing compatibility warnings for legacy operations that predate operation IDs/schema declarations
  • npx prettier --check ... — passed

Repository-wide lint/typecheck still report pre-existing baseline issues in src/routes/refresh-token.test.ts:445, src/routes/quotas.ratelimit.test.ts:305, and src/routes/rate-limit.ts:17; those files are not modified here.

Closes #1150

@greatest0fallt1me
greatest0fallt1me merged commit 5a3badb into CalloraOrg:main Aug 27, 2026
1 check passed
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.

[GrantFox][Medium] Enforce OpenAPI runtime contract tests

2 participants