-
Notifications
You must be signed in to change notification settings - Fork 3
chore: Add build and publish OpenAPI UI workflow #261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Add build and publish OpenAPI UI workflow #261
Conversation
bfb724a
to
9cd1e78
Compare
1a85b7f
to
9d54034
Compare
9d54034
to
9a6eac4
Compare
526859e
to
7f9442d
Compare
7f9442d
to
4c0f580
Compare
e13525c
to
078ba20
Compare
078ba20
to
ebd211b
Compare
262f2fe
to
beb4325
Compare
"build:swagger": "npx ts-node -r tsconfig-paths/register apps/api/src/build-openapi.ts", | ||
"build:metadata": "npx ts-node apps/api/src/generate-metadata.ts", | ||
"generate-swagger-ui": "npx --yes @redocly/cli build-docs swagger.json --output=./docs/index.html", | ||
"build:swagger": "set -a ; . ./env.template ; npx ts-node -r tsconfig-paths/register apps/api/src/build-openapi.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added env.template
to each service openapi build because the build was failing without the environment variables.
- name: Generate Swagger Metadata | ||
run: npm run build:metadata | ||
shell: bash | ||
working-directory: ./services/${{ inputs.service }} | ||
|
||
- name: Generate OpenAPI/Swagger JSON | ||
run: npm run build:swagger | ||
shell: bash | ||
working-directory: ./services/${{ inputs.service }} | ||
|
||
- name: Generate OpenAPI/Swagger UI | ||
run: npm run generate-swagger-ui | ||
shell: bash | ||
working-directory: ./services/${{ inputs.service }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I'm about to publish a PR standardizing on the following pattern for these targets:
generate:metadata
generate:openapi
generate:swagger-ui
Once this is merged, I'll pull into my PR & update the workflows.
Problem
OpenAPI specs need to be published in the mono-repo.
Closes #260
Solution
Steps to Verify: