From b8fa278173459782f23bd4d512bb4b9d907857a4 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sat, 3 Jun 2023 23:32:47 +0100 Subject: [PATCH] finalise auto swagger docs --- .github/workflows/swagger.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/swagger.yml b/.github/workflows/swagger.yml index 4ed4f577..c1e6774e 100644 --- a/.github/workflows/swagger.yml +++ b/.github/workflows/swagger.yml @@ -29,3 +29,9 @@ jobs: run: ./gradlew swaggerhubUpload env: SWAGGERHUB_API_KEY: ${{ secrets.SWAGGERHUB_API_KEY }} + + - name: Set API version as published and default on SwaggerHub + run: | + curl -X PUT -H "Authorization: ${SWAGGERHUB_API_KEY}" "https://api.swaggerhub.com/apis/Frooodle/Stirling-PDF/${{ steps.versionNumber.outputs.versionNumber }}/settings/lifecycle" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"published\":true,\"default\":true}" + env: + SWAGGERHUB_API_KEY: ${{ secrets.SWAGGERHUB_API_KEY }} \ No newline at end of file