Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 3.1 Path Item schema #3355

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions schemas/v3.1/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ properties:
webhooks:
type: object
additionalProperties:
$ref: '#/$defs/path-item-or-reference'
$ref: '#/$defs/path-item'
components:
$ref: '#/$defs/components'
security:
Expand Down Expand Up @@ -192,7 +192,7 @@ $defs:
pathItems:
type: object
additionalProperties:
$ref: '#/$defs/path-item-or-reference'
$ref: '#/$defs/path-item'
patternProperties:
'^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$':
$comment: Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected
Expand All @@ -214,6 +214,9 @@ $defs:
$comment: https://spec.openapis.org/oas/v3.1.0#path-item-object
type: object
properties:
$ref:
type: string
format: uri-reference
summary:
type: string
description:
Expand Down Expand Up @@ -245,16 +248,6 @@ $defs:
$ref: '#/$defs/specification-extensions'
unevaluatedProperties: false

path-item-or-reference:
if:
type: object
required:
- $ref
then:
$ref: '#/$defs/reference'
else:
$ref: '#/$defs/path-item'

operation:
$comment: https://spec.openapis.org/oas/v3.1.0#operation-object
type: object
Expand Down Expand Up @@ -617,7 +610,7 @@ $defs:
type: object
$ref: '#/$defs/specification-extensions'
additionalProperties:
$ref: '#/$defs/path-item-or-reference'
$ref: '#/$defs/path-item'

callbacks-or-reference:
if:
Expand Down