Skip to content

Commit

Permalink
ci: add check for swagger changes (#538)
Browse files Browse the repository at this point in the history
* ci: add check for swagger changes

* chore: update swagger docs
  • Loading branch information
mrsimonemms authored Jan 21, 2025
1 parent 9636836 commit 834f728
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 10 additions & 1 deletion docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down Expand Up @@ -1330,6 +1333,9 @@ const docTemplate = `{
}
]
},
"ami_type": {
"type": "string"
},
"aws_auth": {
"$ref": "#/definitions/types.AWSAuth"
},
Expand Down Expand Up @@ -1499,6 +1505,9 @@ const docTemplate = `{
"google_auth": {
"$ref": "#/definitions/types.GoogleAuth"
},
"resource_group": {
"type": "string"
},
"vultr_auth": {
"$ref": "#/definitions/types.VultrAuth"
}
Expand Down
11 changes: 10 additions & 1 deletion docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down Expand Up @@ -1324,6 +1327,9 @@
}
]
},
"ami_type": {
"type": "string"
},
"aws_auth": {
"$ref": "#/definitions/types.AWSAuth"
},
Expand Down Expand Up @@ -1493,6 +1499,9 @@
"google_auth": {
"$ref": "#/definitions/types.GoogleAuth"
},
"resource_group": {
"type": "string"
},
"vultr_auth": {
"$ref": "#/definitions/types.VultrAuth"
}
Expand Down
8 changes: 7 additions & 1 deletion docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -221,6 +223,8 @@ definitions:
allOf:
- $ref: '#/definitions/types.AkamaiAuth'
description: Auth
ami_type:
type: string
aws_auth:
$ref: '#/definitions/types.AWSAuth'
azure_auth:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 834f728

Please sign in to comment.