5e-srd-api
5e-srd-api copied to clipboard
Automate OpenAPI Spec & Postman collection generation & include in releases
Regenerating the OpenAPI Spec files and the Postman collection for the API is a task which is easy to forget when working on a PR for this repo. Instead, these build artifacts could be generated automatically as part of the CI pipeline.
This can be achieved by adding a step to the github-release
job of the CI workflow to generate the files, and adding an assets
field to the .releaserc.json
to inform Semantic Release to include the artifacts in the release.
The existing artifacts currently being tracked (/src/swagger/api-spec/*
and /collection.postman.json
) should be deleted and added to the .gitignore
. The /src/swagger/dist/
folder should also be deleted, and the gen-postman
script updated, as the built specs now live in api-spec/
.