Skip to content
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

improve: generate and publish openapi spec in release #3674

Merged
merged 1 commit into from
Nov 18, 2022

Conversation

mxyng
Copy link
Collaborator

@mxyng mxyng commented Nov 18, 2022

Summary

Generate the OpenAPI spec and publish it as part of the release.

@technovangelist
Copy link
Contributor

should we also have the latest always be saved as openapi3.json? So it always creates openapi-version.json and openapi.json. openapi.json just gets overwritten each time.

@@ -62,7 +64,7 @@ jobs:
- run: |
# fail fast if the release does not exist
gh release view v${{ needs.prepare.outputs.release-name }} || exit 1
gh release upload v${{ needs.prepare.outputs.release-name }} *.txt *.zip *.deb *.rpm
gh release upload v${{ needs.prepare.outputs.release-name }} *.txt *.zip *.deb *.rpm *.json
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be more specific of the json file we are uploading? The zip, rpm, and deb files are all clearly built things, but a JSON file could be used elsewhere (ex: some kind of configuration file). It seems this is scoped to output from the build steps though so maybe its ok.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matching the openapi-*.json pattern might be good so that it documents which file we are expecting to upload.

Copy link
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -62,7 +64,7 @@ jobs:
- run: |
# fail fast if the release does not exist
gh release view v${{ needs.prepare.outputs.release-name }} || exit 1
gh release upload v${{ needs.prepare.outputs.release-name }} *.txt *.zip *.deb *.rpm
gh release upload v${{ needs.prepare.outputs.release-name }} *.txt *.zip *.deb *.rpm *.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matching the openapi-*.json pattern might be good so that it documents which file we are expecting to upload.

@mxyng mxyng merged commit 46b48c6 into main Nov 18, 2022
@mxyng mxyng deleted the mxyng/openapi-release branch November 18, 2022 17:54
@mxyng
Copy link
Collaborator Author

mxyng commented Nov 18, 2022

should we also have the latest always be saved as openapi3.json? So it always creates openapi-version.json and openapi.json. openapi.json just gets overwritten each time.

Not as part of the release. This generates the spec just in time to archive it as part of the release. To maintain an ongoing openapi.json we'd need to use the existing mechanisms (make docs/api/openapi3.json) of updating the spec file in the repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants