Skip to content
Closed
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
11 changes: 6 additions & 5 deletions src/oas.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OpenAPI Specification

## Version 3.2.0
## Version 4.0.0

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [BCP 14](https://tools.ietf.org/html/bcp14) [RFC2119](https://tools.ietf.org/html/rfc2119) [RFC8174](https://tools.ietf.org/html/rfc8174) when, and only when, they appear in all capitals, as shown here.

Expand Down Expand Up @@ -1692,7 +1692,7 @@ To upload multiple files, a `multipart` media type MUST be used as shown under [

### Encoding Object

A single encoding definition applied to a single value, with the mapping of Encoding Objects to values determined by the [Media Type Object](@media-type-object) as described under [Encoding Usage and Restrictions](#encoding-usage-and-restrictions).
A single encoding definition applied to a single value, with the mapping of Encoding Objects to values determined by the [Media Type Object](#media-type-object) as described under [Encoding Usage and Restrictions](#encoding-usage-and-restrictions).

See [Appendix B](#appendix-b-data-type-conversion) for a discussion of converting values of various types to string representations.

Expand Down Expand Up @@ -1857,7 +1857,7 @@ Using `contentEncoding` for a multipart field is equivalent to specifying an [En
If `contentEncoding` is used for a multipart field that has an Encoding Object with a `headers` field containing `Content-Transfer-Encoding` with a schema that disallows the value from `contentEncoding`, the result is undefined for serialization and parsing.

Note that as stated in [Working with Binary Data](#working-with-binary-data), if the Encoding Object's `contentType`, whether set explicitly or implicitly through its default value rules, disagrees with the `contentMediaType` in a Schema Object, the `contentMediaType` SHALL be ignored.
Because of this, and because the Encoding Object's `contentType` defaulting rules do not take the Schema Object's `contentMediaType` into account, the use of `contentMediaType` with an Encoding Object is NOT RECOMMENDED.
Because of this, and because the Encoding Object's `contentType` defaulting rules do not take the Schema Object's`contentMediaType` into account, the use of `contentMediaType` with an Encoding Object is NOT RECOMMENDED.

Note also that `Content-Transfer-Encoding` is deprecated for `multipart/form-data` ([RFC7578](https://www.rfc-editor.org/rfc/rfc7578.html#section-4.7)) where binary data is supported, as it is in HTTP.

Expand Down Expand Up @@ -4805,8 +4805,9 @@ Certain fields allow the use of Markdown which can contain HTML including script

| Version | Date | Notes |
| ---- | ---- | ---- |
| 3.2.0 | TBD | Release of the OpenAPI Specification 3.2.0 |
| 3.1.2 | TBD | Patch release of the OpenAPI Specification 3.1.2 |
| 4.0.0 | TBD | Release of the OpenAPI Specification 4.0.0 |
| 3.2.0 | 2025-09-19 | Release of the OpenAPI Specification 3.2.0 |
| 3.1.2 | 2025-09-19 | Patch release of the OpenAPI Specification 3.1.2 |
| 3.1.1 | 2024-10-24 | Patch release of the OpenAPI Specification 3.1.1 |
| 3.1.0 | 2021-02-15 | Release of the OpenAPI Specification 3.1.0 |
| 3.1.0-rc1 | 2020-10-08 | rc1 of the 3.1 specification |
Expand Down
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.2/dialect/WORK-IN-PROGRESS
$id: https://spec.openapis.org/oas/4.0/dialect/WORK-IN-PROGRESS
$schema: https://json-schema.org/draft/2020-12/schema

title: OpenAPI 3.2 Schema Object Dialect
description: A JSON Schema dialect describing schemas found in OpenAPI v3.2.x Descriptions
title: OpenAPI 4.0 Schema Object Dialect
description: A JSON Schema dialect describing schemas found in OpenAPI v4.0.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.2/vocab/base: false
https://spec.openapis.org/oas/4.0/vocab/base: false

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

title: OAS Base Vocabulary
Expand All @@ -7,7 +7,7 @@ description: A JSON Schema Vocabulary used in the OpenAPI JSON Schema Dialect
$dynamicAnchor: meta

$vocabulary:
https://spec.openapis.org/oas/3.2/vocab/base: true
https://spec.openapis.org/oas/4.0/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.2/schema-base/WORK-IN-PROGRESS'
$id: 'https://spec.openapis.org/oas/4.0/schema-base/WORK-IN-PROGRESS'
$schema: 'https://json-schema.org/draft/2020-12/schema'

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

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

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

schema:
$dynamicAnchor: meta
$ref: 'https://spec.openapis.org/oas/3.2/dialect/WORK-IN-PROGRESS'
$ref: 'https://spec.openapis.org/oas/4.0/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,13 +1,13 @@
$id: 'https://spec.openapis.org/oas/3.2/schema/WORK-IN-PROGRESS'
$id: 'https://spec.openapis.org/oas/4.0/schema/WORK-IN-PROGRESS'
$schema: 'https://json-schema.org/draft/2020-12/schema'

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

type: object
properties:
openapi:
type: string
pattern: '^3\.2\.\d+(-.+)?$'
pattern: '^4\.0\.\d+(-.+)?$'
$self:
type: string
format: uri-reference
Expand All @@ -18,7 +18,7 @@ properties:
jsonSchemaDialect:
type: string
format: uri-reference
default: 'https://spec.openapis.org/oas/3.2/dialect/WORK-IN-PROGRESS'
default: 'https://spec.openapis.org/oas/4.0/dialect/WORK-IN-PROGRESS'
servers:
type: array
items:
Expand Down Expand Up @@ -58,7 +58,7 @@ unevaluatedProperties: false

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

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

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

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

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

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

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

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

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

external-documentation:
$comment: https://spec.openapis.org/oas/v3.2#external-documentation-object
$comment: https://spec.openapis.org/oas/v4.0#external-documentation-object
type: object
properties:
description:
Expand Down Expand Up @@ -361,7 +361,7 @@ $defs:
maxContains: 1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion tests/schema/fail/encoding-enc-item-exclusion.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.2.0
openapi: 4.0.0
info:
title: API
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion tests/schema/fail/encoding-enc-prefix-exclusion.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.2.0
openapi: 4.0.0
info:
title: API
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion tests/schema/fail/example-examples.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.2.0
openapi: 4.0.0

# this example should fail, as example cannot be used together with examples.

Expand Down
2 changes: 1 addition & 1 deletion tests/schema/fail/example-object-old-exclusions.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.2.0
openapi: 4.0.0
info:
title: API
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion tests/schema/fail/example-object-old-vs-data.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.2.0
openapi: 4.0.0
info:
title: API
version: 1.0.0
Expand Down
Loading