Skip to content

Commit

Permalink
fix: use SwaggerHub API create instead of update
Browse files Browse the repository at this point in the history
why need? In order to achieve automatic, swagger docs change will follow the commit hash.

create will generate new swagger docs.
update will update specified version information.
  • Loading branch information
a20688392 committed Jul 3, 2023
1 parent aa357ce commit 0a56db0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
- name: Upload on Swaggerhub - Cophr_test
if: github.ref != 'refs/heads/main'
run: |
swaggerhub api:update "Cophr/test/${GITHUB_SHA::8}" --setdefault --file=swagger-docs.json --visibility=public
swaggerhub api:create "Cophr/test/${GITHUB_SHA::8}" --setdefault --file=swagger-docs.json --visibility=public
- name: Upload on Swaggerhub - Cophr_main
if: github.ref == 'refs/heads/main'
Expand Down

0 comments on commit 0a56db0

Please sign in to comment.