worked - #656
Merged
Merged
Conversation
|
Someone is attempting to deploy a commit to the smartdevs17's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Wilfred007 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.
What this PR does
Implementation Summary
Installed tsoa and @tsoa/runtime for decorator-based OpenAPI generation
Configured tsoa.json for OpenAPI 3.1 spec generation with controller path globs
Updated tsconfig.json with experimentalDecorators and emitDecoratorMetadata
Created HealthController (src/controllers/health.controller.ts) with TSOA decorators
Created GasController (src/controllers/gas.controller.ts) with comprehensive gas estimation endpoints
Both controllers use proper TypeScript types and return types for automatic schema generation
Updated package.json with tsoa spec command for OpenAPI generation
Successfully generates OpenAPI 3.1 spec to docs/api/openapi/swagger.json
Spec includes security schemes, tags, and proper response schemas
Installed swagger-ui-express and type definitions
Created swaggerRouter (src/routes/swagger.ts) with:
Interactive Swagger UI at /swagger
Raw JSON spec at /swagger/swagger.json
YAML export at /swagger/swagger.yaml
Custom styling and authentication configuration
Integrated into main application at /swagger route
Existing URL-based versioning (/api/v1) already implemented
Header-based versioning support via versionMiddleware
Version detection from multiple headers: API-Version, X-API-Version, Accept-Version
Installed @openapitools/openapi-generator-cli
Created openapi-generator.config.json with configurations for:
TypeScript (axios)
Python
Go
Updated npm scripts for multi-language SDK generation
Created .github/workflows/sdk-generation.yml with:
OpenAPI spec generation job
Breaking change detection using oasdiff
Multi-language SDK generation (TypeScript, Python, Go)
Automated npm publishing for TypeScript SDK
API changelog generation
PR comments for breaking changes
Integrated oasdiff for automated breaking change detection
Compares new OpenAPI spec against previous version
Posts comments on PRs when breaking changes are detected
Integrated conventional-changelog-cli for automated changelog generation
Runs as part of CI workflow
Available Commands
bash
Generate OpenAPI spec
npm run openapi:generate
Generate SDKs
npm run sdk:generate # TypeScript
npm run sdk:generate:python # Python
npm run sdk:generate:go # Go
Access Points
Swagger UI: http://localhost:3001/swagger
OpenAPI Spec: http://localhost:3001/swagger/swagger.json
API Endpoints: http://localhost:3001/api/v1
Changes
Why
How to test
Notes
Closes Refactor API documentation to use OpenAPI 3.1 with automated SDK generation #602
Closes Refactor authentication middleware to support multiple auth strategies #603
Closes Refactor WebSocket server to use event-driven architecture with message queues #604
Closes Refactor testing infrastructure to use test containers and fixtures #605