-
Notifications
You must be signed in to change notification settings - Fork 300
feat(express): Add openapi-generator support #7247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
9cd98a7 to
be54765
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds OpenAPI generator support to the Express module by introducing custom codec definitions and ensuring all Express endpoints are properly tagged. The changes facilitate API documentation generation by providing custom schema mappings for io-ts types and standardizing endpoint metadata.
Key changes:
- Added
openapi-generator.rc.jsconfiguration file with custom codecs for JSON schema generation - Created
JsonFromStringifiedJsonschema utility to replace inline codec definitions - Added
@tag expressannotations to all Express API endpoints
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 18 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/express/src/typedRoutes/schemas/jsonFromStringifedJson.ts | New schema utility for JSON parsing from stringified JSON |
| modules/express/src/typedRoutes/api/v2/ofcSignPayload.ts | Refactored to use centralized JsonFromStringifiedJson and added express tag |
| modules/express/src/typedRoutes/api/v2/*.ts | Added express tag to v2 API endpoints |
| modules/express/src/typedRoutes/api/v1/*.ts | Added express tag to v1 API endpoints |
| modules/express/src/typedRoutes/api/common/*.ts | Added express tag to common API endpoints |
| modules/express/package.json | Added source field pointing to API index |
| modules/express/openapi-generator.rc.js | Configuration file defining custom codecs for OpenAPI generation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
zahin-mohammad
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot comments seem valid, could we do a quick pass to fix these issues? Other than that lgtm.
157c9ac to
24b9260
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 29 out of 29 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Added
openapi-generator.rc.jsfor custom codecsAdded
expresstags to all express endpointsticket: WP-6196