Add OpenAPI examples for /api/gateway [b#086] - #1141
Open
EmperorNexus wants to merge 1 commit into
Open
Conversation
….yaml
- Document GET /api/gateway cursor-paginated listing with cursor/limit
query parameter examples and populated/empty response bodies
- Document GET /api/gateway/health/{apiSlug} with healthy, no-traffic,
and open-breaker latency examples plus a 404 not-found example
- Document the authenticated proxy route (/api/gateway/{apiId}) for GET
and POST with forwarded body examples, a pass-through 200 response, and
StandardErrorEnvelope examples for 401/402/403/429/502/503/504
- Add typed component schemas: GatewayEndpointPricing, GatewayApiEntry,
GatewayListResponse, GatewayHealthResponse, GatewayProxyRequest,
GatewayProxyResponse
- Add src/routes/gateway.openapi.test.ts contract test asserting all
gateway paths, operations, and schemas are documented
Closes CalloraOrg#951
|
@EmperorNexus Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Summary
Adds typed request/response examples for the
/api/gatewaysurface insrc/openapi.yaml, following the same pattern used by the/api/webhooksexamples (GrantFox FWC26).Changes
GET /api/gateway— cursor-paginated listingcursor/limitquery parameter examplesnextCursor: null) response bodiesGET /api/gateway/health/{apiSlug}— per-API upstream health404unknown-slug example withStandardErrorEnvelopeGET/POST /api/gateway/{apiId}— authenticated proxy routex-api-keyheader examples and forwarded request-body examples200response exampleStandardErrorEnvelopeexamples for401,402,403,429(withRetry-Afterheader),502,503, and504GatewayEndpointPricing,GatewayApiEntry,GatewayListResponse,GatewayHealthResponse,GatewayProxyRequest,GatewayProxyResponseTests
src/routes/gateway.openapi.test.ts— contract test asserting every gateway path, operation, and schema is documented. 26/26 tests pass.Documentation
Checklist
Closes #951