Problem Statement
Swagger is configured at runtime (accessible via /api/docs) but no CI step exports the OpenAPI JSON spec as an artifact.
Evidence
Backend/src/main.ts — SwaggerModule.createDocument generates the spec
- No CI step to export and upload openapi.json
Impact
API consumers must run the application to get the OpenAPI spec. No spec available in CI artifacts for documentation generation.
Proposed Solution
- Add CI step that starts the application and fetches Swagger JSON
- Export the spec as openapi.json artifact
- Add to API docs generation pipeline
Technical Requirements
- Must use the same Swagger config as the application
- Must export both JSON and YAML formats
Acceptance Criteria
- CI step generates openapi.json
- Artifact is available for download
- Spec matches the runtime Swagger documentation
File Inventory
infrastructure/ci/docker-build-pipeline.yml
infrastructure/ci/docs-generation.yml
Dependencies
Issue #23 (API versioning) — spec should match final routes.
Testing Strategy
- Compare CI-generated spec with runtime spec
Security Considerations
OpenAPI spec should not expose internal endpoint details that could aid attackers.
Definition of Done
Problem Statement
Swagger is configured at runtime (accessible via /api/docs) but no CI step exports the OpenAPI JSON spec as an artifact.
Evidence
Backend/src/main.ts— SwaggerModule.createDocument generates the specImpact
API consumers must run the application to get the OpenAPI spec. No spec available in CI artifacts for documentation generation.
Proposed Solution
Technical Requirements
Acceptance Criteria
File Inventory
infrastructure/ci/docker-build-pipeline.ymlinfrastructure/ci/docs-generation.ymlDependencies
Issue #23 (API versioning) — spec should match final routes.
Testing Strategy
Security Considerations
OpenAPI spec should not expose internal endpoint details that could aid attackers.
Definition of Done