From 834f728453fb867844ee1562331695cfc83ab768 Mon Sep 17 00:00:00 2001 From: Simon Emms Date: Tue, 21 Jan 2025 14:48:17 +0000 Subject: [PATCH] ci: add check for swagger changes (#538) * ci: add check for swagger changes * chore: update swagger docs --- .github/workflows/testing.yml | 6 ++++++ docs/docs.go | 11 ++++++++++- docs/swagger.json | 11 ++++++++++- docs/swagger.yaml | 8 +++++++- 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 218c7d84..bbbb02f7 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -17,6 +17,12 @@ jobs: uses: actions/setup-go@v5 with: go-version-file: go.mod + - name: Check for Swagger changes + run: | + go install github.com/swaggo/swag/cmd/swag@latest + swag init + swag fmt + git diff --quiet docs || (echo 'Swagger is not up to date - run "swag init" and "swag fmt" to update'; exit 1) - name: Run GolangCI-Lint uses: golangci/golangci-lint-action@v6 with: diff --git a/docs/docs.go b/docs/docs.go index 690d376f..1e1cf377 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1226,10 +1226,13 @@ const docTemplate = `{ "in_progress": { "type": "boolean" }, - "install_tools_check": { + "install_kubefirst_pro": { "description": "Checks", "type": "boolean" }, + "install_tools_check": { + "type": "boolean" + }, "k3s_auth": { "$ref": "#/definitions/types.K3sAuth" }, @@ -1330,6 +1333,9 @@ const docTemplate = `{ } ] }, + "ami_type": { + "type": "string" + }, "aws_auth": { "$ref": "#/definitions/types.AWSAuth" }, @@ -1499,6 +1505,9 @@ const docTemplate = `{ "google_auth": { "$ref": "#/definitions/types.GoogleAuth" }, + "resource_group": { + "type": "string" + }, "vultr_auth": { "$ref": "#/definitions/types.VultrAuth" } diff --git a/docs/swagger.json b/docs/swagger.json index 8ad6e7c3..f87276da 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -1220,10 +1220,13 @@ "in_progress": { "type": "boolean" }, - "install_tools_check": { + "install_kubefirst_pro": { "description": "Checks", "type": "boolean" }, + "install_tools_check": { + "type": "boolean" + }, "k3s_auth": { "$ref": "#/definitions/types.K3sAuth" }, @@ -1324,6 +1327,9 @@ } ] }, + "ami_type": { + "type": "string" + }, "aws_auth": { "$ref": "#/definitions/types.AWSAuth" }, @@ -1493,6 +1499,9 @@ "google_auth": { "$ref": "#/definitions/types.GoogleAuth" }, + "resource_group": { + "type": "string" + }, "vultr_auth": { "$ref": "#/definitions/types.VultrAuth" } diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 70ef06b0..45dd51f5 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -157,9 +157,11 @@ definitions: $ref: '#/definitions/types.GoogleAuth' in_progress: type: boolean - install_tools_check: + install_kubefirst_pro: description: Checks type: boolean + install_tools_check: + type: boolean k3s_auth: $ref: '#/definitions/types.K3sAuth' kbot_setup_check: @@ -221,6 +223,8 @@ definitions: allOf: - $ref: '#/definitions/types.AkamaiAuth' description: Auth + ami_type: + type: string aws_auth: $ref: '#/definitions/types.AWSAuth' azure_auth: @@ -348,6 +352,8 @@ definitions: $ref: '#/definitions/types.DigitaloceanAuth' google_auth: $ref: '#/definitions/types.GoogleAuth' + resource_group: + type: string vultr_auth: $ref: '#/definitions/types.VultrAuth' type: object