docs: publish versioned OpenAPI specification#279
Open
charliechinedu19-netizen wants to merge 2 commits into
Open
docs: publish versioned OpenAPI specification#279charliechinedu19-netizen wants to merge 2 commits into
charliechinedu19-netizen wants to merge 2 commits into
Conversation
|
@charliechinedu19-netizen 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! 🚀 |
faf7d80 to
52772e7
Compare
52772e7 to
f870a79
Compare
Author
|
Hi @robertocarlous this is still up. Please review and merge. |
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.
Publish a versioned OpenAPI spec for the public and authenticated routes
Closes #188
What
Complete rewrite and modernization of the OpenAPI specification, covering all 38 HTTP endpoints across the entire API surface. The spec is now served at runtime via Swagger UI and included as a build artifact.
Changes
docs/openapi.yaml— Full rewrite (OpenAPI 3.1.0):POST /api/v1/auth/challenge(was incorrectly documented as GET)GET /api/v1/portfolio/{userId}(was missing theuserIdpath param)POST /api/v1/portfolio/queryagent,whatsapp,protocols,vault/state,vault/balance,vault/build-transactionportfoliosub-routes (/{userId}/history,/{userId}/earnings)transactions/detail/{txHash},transactions/{id}/eventsanalytics/apy-history,analytics/user-yield,analytics/protocol-performancestellar/metricsdlq/inspect,dlq/retry,dlq/resolve,dlq/replay,stellar/backfill,keys(CRUD),wallets/rotation-status,stellar/metricsagent/status,metricsAdminTokensecurity scheme to note bothAuthorization: Bearerand legacyX-Admin-TokensupportresponsesforUnauthorized,Forbidden,BadRequest,NotFound,Conflictsrc/index.ts— Runtime Swagger UI serving:docs/openapi.yamlat startup viajs-yaml/api/v1/docsand/docs/api/v1/openapi.yamland/openapi.yamlpackage.json— Build automation:validate:spec— validates spec via@apidevtools/swagger-parserbuild:spec— copies spec todist/docs/openapi.yaml+ runs validationprebuildnow includesbuild:spec(spec is always validated and bundled)README.md— Updated documentation:validate:speccommand referenceBreaking changes
None. This is purely additive — all existing routes continue to work identically. The only spec corrections (method fix for
/auth/challenge, path fixes for/portfolio) bring the spec in line with existing behavior.How to verify
npm run devhttp://localhost:3000/api/v1/docsin a browsercurl http://localhost:3000/api/v1/openapi.yamlnpm run validate:spec