Commit Graph
7 Commits
Author SHA1 Message Date
Mend Renovate 80b95abecc fix(deps): update module go.yaml.in/yaml/v3 to v3.0.6
Signed-off-by: Mend Renovate <bot@renovateapp.com>
2026-11-02 18:00:16 +00:00
Paweł Gronowski f2395eeaff api/scripts: Always rerun the Swagger projection check
The Go test cache does not recheck files outside the module root, so
editing only openapi.yaml or swagger.yaml could reuse a cached
TestCheckedInSwagger result and miss a stale projection in a
persistent development container.
Pass -count=1 to disable caching.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2026-10-29 11:34:27 +01:00
Paweł Gronowski 9e5299c63e api: Generate Swagger compatibility output from OpenAPI
Add a Go converter in a separate tooling module and reintroduce
swagger.yaml as generated Swagger 2.0 output. Preserve schema property
order, examples, and generator extensions, and reject unsupported
constructs. Use the union of response media types for Swagger's
operation-wide produces lists.

Leave historical versioned specifications and generated Go models
unchanged.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2026-10-29 11:34:26 +01:00
Florian Stellbrink fdf1048c91 ci(swagger): validate yaml with spec compliant tool
yamllint does not report invalid indentation.

libfyaml passes the yaml test suite and catches these issues.

not replacing yamllint to preserve existing style rules.

Signed-off-by: Florian Stellbrink <flo@stellbr.ink>
2026-09-30 20:48:14 +02:00
Paweł Gronowski 00b5d5918d api/scripts: Allow isolated model generation with an API directory
The model validator changed into a temporary directory, but the
generator derived its output directory from its script location and
still wrote into the source tree.

Accept an optional API-directory argument and pass the temporary
module directory during validation.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2026-09-17 20:41:42 +02:00
Nicolas De Loof caaa9c9bb5 simplify swagger generation
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2025-12-12 09:19:50 +01:00
Rafael Camelo 0666108ebf 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>
2025-12-11 15:16:47 +01:00