Skip to content

feat(materials): add Swagger 2.0 and OpenAPI 3.2 support to OPENAPI_SPEC#3095

Merged
javirln merged 1 commit intochainloop-dev:mainfrom
javirln:chore/validate-api-spec-testdata
May 6, 2026
Merged

feat(materials): add Swagger 2.0 and OpenAPI 3.2 support to OPENAPI_SPEC#3095
javirln merged 1 commit intochainloop-dev:mainfrom
javirln:chore/validate-api-spec-testdata

Conversation

@javirln
Copy link
Copy Markdown
Member

@javirln javirln commented May 6, 2026

Extend the OPENAPI_SPEC material type to accept Swagger 2.0 and OpenAPI 3.2 documents. Swagger 2.0 was previously rejected because the crafter only checked for the openapi key, while Swagger 2.0 uses swagger. OpenAPI 3.2 passed the basic check but failed strict validation due to a missing schema.

Embed the official Swagger 2.0, OpenAPI 3.2, and JSON Schema draft-04 meta-schema files. Update the validation cascade to try 3.2 → 3.1 → 3.0 → 2.0. Handle YAML numeric coercion for unquoted swagger: 2.0 values.

Resolves: PFM-5849

Extend the OPENAPI_SPEC material type to accept Swagger 2.0 and OpenAPI 3.2
documents. Swagger 2.0 was previously rejected because the crafter only
checked for the `openapi` key, while Swagger 2.0 uses `swagger`. OpenAPI 3.2
passed the basic check but failed strict validation due to a missing schema.

Embed the official Swagger 2.0, OpenAPI 3.2, and JSON Schema draft-04
meta-schema files. Update the validation cascade to try 3.2 → 3.1 → 3.0 → 2.0.
Handle YAML numeric coercion for unquoted `swagger: 2.0` values.

Resolves: PFM-5849

Assisted-by: Claude Code
Signed-off-by: Javier Rodriguez <javier@chainloop.dev>
@javirln javirln self-assigned this May 6, 2026
@javirln javirln requested review from jiparis and migmartri May 6, 2026 07:01
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 12 files

@javirln javirln merged commit 8907493 into chainloop-dev:main May 6, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants