Skip to content

fix: allow missing paths in OAS 3.1 if components or webhooks present#11

Open
probelabs[bot] wants to merge 1 commit intomasterfrom
fix-oas31-missing-paths
Open

fix: allow missing paths in OAS 3.1 if components or webhooks present#11
probelabs[bot] wants to merge 1 commit intomasterfrom
fix-oas31-missing-paths

Conversation

@probelabs
Copy link

@probelabs probelabs bot commented Mar 11, 2026

Problem / Task

Fixes TT-16565. When importing an OAS 3.1 document with webhooks but no paths, it fails with "invalid paths: must be an object". In OpenAPI 3.1, the paths object is optional as long as either components or webhooks is present.

Changes

  • Updated openapi3/openapi3.go to check if the OpenAPI version is 3.1.x and if components or webhooks are present before returning an error for missing paths.
  • Added a failing test in openapi3/openapi3_test.go to verify that an OpenAPI 3.1 document with webhooks but no paths validates successfully.

Testing

  • Added tests for OAS 3.1 missing paths but has components/webhooks.
  • Ran go test ./... to verify all tests pass.

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.

1 participant