Skip to content

3.2: bump spec version in schema files #4367

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

Merged
merged 5 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions src/schemas/validation/dialect.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
$id: https://spec.openapis.org/oas/3.1/dialect/WORK-IN-PROGRESS
$id: https://spec.openapis.org/oas/3.2/dialect/WORK-IN-PROGRESS
$schema: https://json-schema.org/draft/2020-12/schema

title: OpenAPI 3.1 Schema Object Dialect
description: A JSON Schema dialect describing schemas found in OpenAPI v3.1 Descriptions
title: OpenAPI 3.2 Schema Object Dialect
description: A JSON Schema dialect describing schemas found in OpenAPI v3.2.x Descriptions

$dynamicAnchor: meta

Expand All @@ -14,8 +14,8 @@ $vocabulary:
https://json-schema.org/draft/2020-12/vocab/meta-data: true
https://json-schema.org/draft/2020-12/vocab/unevaluated: true
https://json-schema.org/draft/2020-12/vocab/validation: true
https://spec.openapis.org/oas/3.1/vocab/base: false
https://spec.openapis.org/oas/3.2/vocab/base: false

allOf:
- $ref: https://json-schema.org/draft/2020-12/schema
- $ref: https://spec.openapis.org/oas/3.1/meta/WORK-IN-PROGRESS
- $ref: https://spec.openapis.org/oas/3.2/meta/WORK-IN-PROGRESS
6 changes: 3 additions & 3 deletions src/schemas/validation/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
$id: https://spec.openapis.org/oas/3.1/meta/WORK-IN-PROGRESS
$id: https://spec.openapis.org/oas/3.2/meta/WORK-IN-PROGRESS
$schema: https://json-schema.org/draft/2020-12/schema

title: OAS Base Vocabulary
description: A JSON Schema Vocabulary used in the OpenAPI Schema Dialect
description: A JSON Schema Vocabulary used in the OpenAPI JSON Schema Dialect

$dynamicAnchor: meta

$vocabulary:
https://spec.openapis.org/oas/3.1/vocab/base: true
https://spec.openapis.org/oas/3.2/vocab/base: true

type:
- object
Expand Down
10 changes: 5 additions & 5 deletions src/schemas/validation/schema-base.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
$id: 'https://spec.openapis.org/oas/3.1/schema-base/WORK-IN-PROGRESS'
$id: 'https://spec.openapis.org/oas/3.2/schema-base/WORK-IN-PROGRESS'
$schema: 'https://json-schema.org/draft/2020-12/schema'

description: The description of OpenAPI v3.1.x Documents using the OpenAPI JSON Schema dialect
description: The description of OpenAPI v3.2.x Documents using the OpenAPI JSON Schema dialect

$ref: 'https://spec.openapis.org/oas/3.1/schema/WORK-IN-PROGRESS'
$ref: 'https://spec.openapis.org/oas/3.2/schema/WORK-IN-PROGRESS'
properties:
jsonSchemaDialect:
$ref: '#/$defs/dialect'

$defs:
dialect:
const: 'https://spec.openapis.org/oas/3.1/dialect/WORK-IN-PROGRESS'
const: 'https://spec.openapis.org/oas/3.2/dialect/WORK-IN-PROGRESS'

schema:
$dynamicAnchor: meta
$ref: 'https://spec.openapis.org/oas/3.1/dialect/WORK-IN-PROGRESS'
$ref: 'https://spec.openapis.org/oas/3.2/dialect/WORK-IN-PROGRESS'
properties:
$schema:
$ref: '#/$defs/dialect'
62 changes: 31 additions & 31 deletions src/schemas/validation/schema.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
$id: 'https://spec.openapis.org/oas/3.1/schema/WORK-IN-PROGRESS'
$id: 'https://spec.openapis.org/oas/3.2/schema/WORK-IN-PROGRESS'
$schema: 'https://json-schema.org/draft/2020-12/schema'

description: The description of OpenAPI v3.1.x Documents without Schema Object validation
description: The description of OpenAPI v3.2.x Documents without Schema Object validation

type: object
properties:
openapi:
type: string
pattern: '^3\.1\.\d+(-.+)?$'
pattern: '^3\.2\.\d+(-.+)?$'
info:
$ref: '#/$defs/info'
jsonSchemaDialect:
type: string
format: uri
default: 'https://spec.openapis.org/oas/3.1/dialect/WORK-IN-PROGRESS'
default: 'https://spec.openapis.org/oas/3.2/dialect/WORK-IN-PROGRESS'
servers:
type: array
items:
Expand Down Expand Up @@ -53,7 +53,7 @@ unevaluatedProperties: false

$defs:
info:
$comment: https://spec.openapis.org/oas/v3.1#info-object
$comment: https://spec.openapis.org/oas/v3.2#info-object
type: object
properties:
title:
Expand All @@ -78,7 +78,7 @@ $defs:
unevaluatedProperties: false

contact:
$comment: https://spec.openapis.org/oas/v3.1#contact-object
$comment: https://spec.openapis.org/oas/v3.2#contact-object
type: object
properties:
name:
Expand All @@ -93,7 +93,7 @@ $defs:
unevaluatedProperties: false

license:
$comment: https://spec.openapis.org/oas/v3.1#license-object
$comment: https://spec.openapis.org/oas/v3.2#license-object
type: object
properties:
name:
Expand All @@ -114,7 +114,7 @@ $defs:
unevaluatedProperties: false

server:
$comment: https://spec.openapis.org/oas/v3.1#server-object
$comment: https://spec.openapis.org/oas/v3.2#server-object
type: object
properties:
url:
Expand All @@ -131,7 +131,7 @@ $defs:
unevaluatedProperties: false

server-variable:
$comment: https://spec.openapis.org/oas/v3.1#server-variable-object
$comment: https://spec.openapis.org/oas/v3.2#server-variable-object
type: object
properties:
enum:
Expand All @@ -149,7 +149,7 @@ $defs:
unevaluatedProperties: false

components:
$comment: https://spec.openapis.org/oas/v3.1#components-object
$comment: https://spec.openapis.org/oas/v3.2#components-object
type: object
properties:
schemas:
Expand Down Expand Up @@ -201,7 +201,7 @@ $defs:
unevaluatedProperties: false

paths:
$comment: https://spec.openapis.org/oas/v3.1#paths-object
$comment: https://spec.openapis.org/oas/v3.2#paths-object
type: object
patternProperties:
'^/':
Expand All @@ -210,7 +210,7 @@ $defs:
unevaluatedProperties: false

path-item:
$comment: https://spec.openapis.org/oas/v3.1#path-item-object
$comment: https://spec.openapis.org/oas/v3.2#path-item-object
type: object
properties:
$ref:
Expand Down Expand Up @@ -248,7 +248,7 @@ $defs:
unevaluatedProperties: false

operation:
$comment: https://spec.openapis.org/oas/v3.1#operation-object
$comment: https://spec.openapis.org/oas/v3.2#operation-object
type: object
properties:
tags:
Expand Down Expand Up @@ -290,7 +290,7 @@ $defs:
unevaluatedProperties: false

external-documentation:
$comment: https://spec.openapis.org/oas/v3.1#external-documentation-object
$comment: https://spec.openapis.org/oas/v3.2#external-documentation-object
type: object
properties:
description:
Expand All @@ -304,7 +304,7 @@ $defs:
unevaluatedProperties: false

parameter:
$comment: https://spec.openapis.org/oas/v3.1#parameter-object
$comment: https://spec.openapis.org/oas/v3.2#parameter-object
type: object
properties:
name:
Expand Down Expand Up @@ -444,7 +444,7 @@ $defs:
$ref: '#/$defs/parameter'

request-body:
$comment: https://spec.openapis.org/oas/v3.1#request-body-object
$comment: https://spec.openapis.org/oas/v3.2#request-body-object
type: object
properties:
description:
Expand All @@ -470,15 +470,15 @@ $defs:
$ref: '#/$defs/request-body'

content:
$comment: https://spec.openapis.org/oas/v3.1#fixed-fields-10
$comment: https://spec.openapis.org/oas/v3.2#fixed-fields-10
type: object
additionalProperties:
$ref: '#/$defs/media-type'
propertyNames:
format: media-range

media-type:
$comment: https://spec.openapis.org/oas/v3.1#media-type-object
$comment: https://spec.openapis.org/oas/v3.2#media-type-object
type: object
properties:
schema:
Expand All @@ -493,7 +493,7 @@ $defs:
unevaluatedProperties: false

encoding:
$comment: https://spec.openapis.org/oas/v3.1#encoding-object
$comment: https://spec.openapis.org/oas/v3.2#encoding-object
type: object
properties:
contentType:
Expand Down Expand Up @@ -521,7 +521,7 @@ $defs:
unevaluatedProperties: false

responses:
$comment: https://spec.openapis.org/oas/v3.1#responses-object
$comment: https://spec.openapis.org/oas/v3.2#responses-object
type: object
properties:
default:
Expand All @@ -540,7 +540,7 @@ $defs:
required: [default]

response:
$comment: https://spec.openapis.org/oas/v3.1#response-object
$comment: https://spec.openapis.org/oas/v3.2#response-object
type: object
properties:
description:
Expand Down Expand Up @@ -571,7 +571,7 @@ $defs:
$ref: '#/$defs/response'

callbacks:
$comment: https://spec.openapis.org/oas/v3.1#callback-object
$comment: https://spec.openapis.org/oas/v3.2#callback-object
type: object
$ref: '#/$defs/specification-extensions'
additionalProperties:
Expand All @@ -588,7 +588,7 @@ $defs:
$ref: '#/$defs/callbacks'

example:
$comment: https://spec.openapis.org/oas/v3.1#example-object
$comment: https://spec.openapis.org/oas/v3.2#example-object
type: object
properties:
summary:
Expand Down Expand Up @@ -617,7 +617,7 @@ $defs:
$ref: '#/$defs/example'

link:
$comment: https://spec.openapis.org/oas/v3.1#link-object
$comment: https://spec.openapis.org/oas/v3.2#link-object
type: object
properties:
operationRef:
Expand Down Expand Up @@ -651,7 +651,7 @@ $defs:
$ref: '#/$defs/link'

header:
$comment: https://spec.openapis.org/oas/v3.1#header-object
$comment: https://spec.openapis.org/oas/v3.2#header-object
type: object
properties:
description:
Expand Down Expand Up @@ -697,7 +697,7 @@ $defs:
$ref: '#/$defs/header'

tag:
$comment: https://spec.openapis.org/oas/v3.1#tag-object
$comment: https://spec.openapis.org/oas/v3.2#tag-object
type: object
properties:
name:
Expand All @@ -718,7 +718,7 @@ $defs:
unevaluatedProperties: false

reference:
$comment: https://spec.openapis.org/oas/v3.1#reference-object
$comment: https://spec.openapis.org/oas/v3.2#reference-object
type: object
properties:
$ref:
Expand All @@ -730,14 +730,14 @@ $defs:
type: string

schema:
$comment: https://spec.openapis.org/oas/v3.1#schema-object
$comment: https://spec.openapis.org/oas/v3.2#schema-object
$dynamicAnchor: meta
type:
- object
- boolean

security-scheme:
$comment: https://spec.openapis.org/oas/v3.1#security-scheme-object
$comment: https://spec.openapis.org/oas/v3.2#security-scheme-object
type: object
properties:
type:
Expand Down Expand Up @@ -938,15 +938,15 @@ $defs:
unevaluatedProperties: false

security-requirement:
$comment: https://spec.openapis.org/oas/v3.1#security-requirement-object
$comment: https://spec.openapis.org/oas/v3.2#security-requirement-object
type: object
additionalProperties:
type: array
items:
type: string

specification-extensions:
$comment: https://spec.openapis.org/oas/v3.1#specification-extensions
$comment: https://spec.openapis.org/oas/v3.2#specification-extensions
patternProperties:
'^x-': true

Expand Down
2 changes: 1 addition & 1 deletion tests/schema/fail/invalid_schema_types.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.1
openapi: 3.2.0

# this example shows invalid types for the schemaObject

Expand Down
2 changes: 1 addition & 1 deletion tests/schema/fail/no_containers.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.2.0

# this example should fail as there are no paths, components or webhooks containers (at least one of which must be present)

Expand Down
2 changes: 1 addition & 1 deletion tests/schema/fail/server_enum_empty.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.2.0

# this example should fail as the server variable enum is empty, and so does not contain the default value

Expand Down
2 changes: 1 addition & 1 deletion tests/schema/fail/servers.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.2.0

# this example should fail, as servers must be an array, not an object

Expand Down
2 changes: 1 addition & 1 deletion tests/schema/fail/unknown_container.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.2.0

# this example should fail as overlays is not a valid top-level object/keyword

Expand Down
2 changes: 1 addition & 1 deletion tests/schema/pass/comp_pathitems.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.2.0
info:
title: API
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion tests/schema/pass/info_summary.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.2.0
info:
title: API
summary: My lovely API
Expand Down
2 changes: 1 addition & 1 deletion tests/schema/pass/license_identifier.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.2.0
info:
title: API
summary: My lovely API
Expand Down
2 changes: 1 addition & 1 deletion tests/schema/pass/mega.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.2.0
info:
summary: My API's summary
title: My API
Expand Down
2 changes: 1 addition & 1 deletion tests/schema/pass/minimal_comp.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.2.0
info:
title: API
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion tests/schema/pass/minimal_hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.2.0
info:
title: API
version: 1.0.0
Expand Down
Loading