feat: add automated RAML 1.0 package generation to CI/CD pipeline
Docs Check / Markdown lint (push) Successful in 1m6s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m20s
Build and Push Docker Image / build (push) Successful in 1m35s
CI / Swagger Validation & Coverage (push) Failing after 2m0s
CI / Security audit (push) Successful in 2m6s
Docs Check / Mermaid diagram parse check (push) Successful in 2m20s
CI / Tests & coverage (push) Failing after 2m30s

- Add RAML generation scripts (generate-openapi, downgrade-openapi, simple-raml-converter, package-raml)
- Add /api/swagger.json endpoint to server/app.js
- Add minimal .spectral.yml ruleset for OpenAPI linting
- Add npm scripts for OpenAPI/RAML generation and packaging
- Extend CI swagger job with RAML generation steps
- Upload raml-package artifact with 14-day retention
- Update CHANGELOG.md for v1.7.1
This commit is contained in:
2026-05-21 14:26:21 +01:00
parent 1a4ff73067
commit 37bed1cd4e
5 changed files with 323 additions and 2 deletions
+30
View File
@@ -6,6 +6,36 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
---
## [1.7.1] - 2026-05-21
### Added
#### RAML 1.0 Package Generation
- **Automated RAML generation in CI/CD** — Added RAML 1.0 package generation to the existing `swagger` job in `.gitea/workflows/ci.yml`. The pipeline now generates a downloadable `raml-package` artifact on every push and PR, available from the Actions run page with 14-day retention.
- **RAML generation scripts** — Created three new scripts in `scripts/`:
- `generate-openapi.js` — Bootstraps the Express app in test mode, fetches the merged OpenAPI 3.1 spec from `/api/swagger.json`, and exports it to disk.
- `downgrade-openapi.js` — Downgrades OpenAPI 3.1 to 3.0 for RAML compatibility (existing RAML converters don't support 3.1).
- `simple-raml-converter.js` — Converts OpenAPI 3.0 to RAML 1.0 format using a custom converter (modern RAML converters are unmaintained).
- `package-raml.js` — Creates a versioned tar.gz archive containing the RAML spec, original OpenAPI spec, version metadata, and README.
- **RAML artifact structure** — Each artifact includes:
- `api.raml` — RAML 1.0 specification
- `openapi-merged.json` — Original merged OpenAPI 3.1.0 spec (for reference)
- `version.json` — Metadata (version, commit SHA, timestamp, tool used)
- `README.md` — Origin, conversion details, known limitations, and verification steps
- **npm scripts** — Added three new scripts to `package.json`:
- `generate:openapi` — Generates merged OpenAPI spec
- `generate:raml` — Downgrades and converts to RAML
- `package:raml` — Packages the RAML artifact
- **Spectral ruleset** — Created minimal `.spectral.yml` ruleset to make the existing Spectral lint step functional (previously failing silently due to missing ruleset).
- **OpenAPI JSON endpoint** — Added `/api/swagger.json` endpoint to `server/app.js` to serve the raw merged OpenAPI spec as JSON, enabling programmatic access.
### Changed
- **Dependencies added** — `archiver` (^7.0.1) for creating tar.gz archives.
---
## [1.7.0] - 2026-05-21
### Added