api: move scripts to generate and validate swagger to api module

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

revert api/swagger.yaml to undo formatting

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

refactor(api): update Dockerfile and Makefile with newline at the EOF and use current best practices

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

refactor validations and swagger generation flow

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

shfmt

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

refactor generate-swagger-api.sh to use absolute path

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

add validate-api-swagger job for GitHub Actions

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

fix validate-api-swagger ci workflow

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

update go version and redoc in api module

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Rafael Camelo
2025-10-26 17:20:28 -04:00
committed by Sebastiaan van Stijn
parent 4dc87c55c7
commit 0666108ebf
12 changed files with 193 additions and 86 deletions

View File

@@ -153,6 +153,29 @@ jobs:
run: |
make -o build validate-${{ matrix.script }}
validate-api-swagger:
runs-on: ubuntu-24.04
timeout-minutes: 10 # guardrails timeout for the whole job
defaults:
run:
working-directory: api
needs:
- validate-dco
name: validate (api-swagger)
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Build api module image
run: |
make build GO_VERSION=${{ env.GO_VERSION }}
-
name: Validate swagger
run: |
make validate-swagger
make validate-swagger-gen
smoke-prepare:
runs-on: ubuntu-24.04
timeout-minutes: 10 # guardrails timeout for the whole job