Overview
swagger.config.ts generates the OpenAPI spec at runtime only. There is no versioned JSON spec checked into the repo or published as a CI artefact, making API integration harder for frontend and third-party consumers.
Background
The spec should be generated during the build step and saved as openapi.json. It should also be versioned alongside the code so breaking changes are visible in PRs.
Specifications
Features:
pm run generate:openapi script that writes docs/openapi.json`n- CI step uploads the spec as a build artefact
- Spec version pinned to the app version in package.json`n
Tasks:
- Add generate:openapi script using NestJS CLI
- Add CI step to generate and upload spec
- Add spec diff check to PR CI to flag breaking changes
Impacted Files:
- BackEnd/package.json
n- .github/workflows/ci.ymln- BackEnd/docs/openapi.json (generated)
Acceptance Criteria:
- docs/openapi.json is generated and committed during CI
- PR diff shows API changes clearly
Overview
swagger.config.ts generates the OpenAPI spec at runtime only. There is no versioned JSON spec checked into the repo or published as a CI artefact, making API integration harder for frontend and third-party consumers.
Background
The spec should be generated during the build step and saved as openapi.json. It should also be versioned alongside the code so breaking changes are visible in PRs.
Specifications
Features:
pm run generate:openapi script that writes docs/openapi.json`n- CI step uploads the spec as a build artefact
Tasks:
Impacted Files:
n- .github/workflows/ci.ymln- BackEnd/docs/openapi.json (generated)Acceptance Criteria: