Skip to content

feat(mbe): add unified api spec for mbe#30

Merged
mohammadalfaiyazbitgo merged 1 commit intomasterfrom
WP-000000/qol-api-specs
Jun 16, 2025
Merged

feat(mbe): add unified api spec for mbe#30
mohammadalfaiyazbitgo merged 1 commit intomasterfrom
WP-000000/qol-api-specs

Conversation

@mohammadalfaiyazbitgo
Copy link
Copy Markdown
Contributor

Ticket: WP-000000

Copy link
Copy Markdown

Copilot AI left a 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 implements a unified API specification for the mbe, aligning route definitions within the API spec with their mounting in the Express application.

  • Removed the hardcoded '/api' mount prefix from master.ts to align with the API spec endpoints.
  • Updated masterApiSpec.ts to include the '/api' prefix in route paths.
  • Consolidated API specifications in a new index.ts and added a script to generate the OpenAPI spec output in package.json.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/routes/master.ts Changed mounting of the master API router to remove '/api' to use the spec-defined paths.
src/masterBitgoExpress/routers/masterApiSpec.ts Updated route paths to include '/api' for consistency with spec requirements.
src/masterBitgoExpress/routers/index.ts Combined API specs and exported the OpenAPI spec for internal and external usage.
package.json Added an OpenAPI generation script and modified the test ssl command.
masterBitgoExpress.json Generated OpenAPI JSON spec reflecting the new API definitions.
Comments suppressed due to low confidence (1)

package.json:17

  • The trailing comma inside the openssl command string may cause unintended behavior when executing the command. Consider removing the extra comma.
    "generate-test-ssl": "openssl req -x509 -newkey rsa:2048 -keyout test-ssl-key.pem -out test-ssl-cert.pem -days 365 -nodes -subj '/CN=localhost',"

@mohammadalfaiyazbitgo mohammadalfaiyazbitgo marked this pull request as ready for review June 13, 2025 15:09
@mohammadalfaiyazbitgo mohammadalfaiyazbitgo merged commit ac13c78 into master Jun 16, 2025
3 checks passed
@mohammadalfaiyazbitgo mohammadalfaiyazbitgo deleted the WP-000000/qol-api-specs branch June 16, 2025 14:58
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.

3 participants