diff --git a/src/oas.md b/src/oas.md index 430c1c6f5f..714dd73920 100644 --- a/src/oas.md +++ b/src/oas.md @@ -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. @@ -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. @@ -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. @@ -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 | diff --git a/src/schemas/validation/dialect.yaml b/src/schemas/validation/dialect.yaml index 1986c9e8f8..138d41f96a 100644 --- a/src/schemas/validation/dialect.yaml +++ b/src/schemas/validation/dialect.yaml @@ -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 @@ -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 diff --git a/src/schemas/validation/meta.yaml b/src/schemas/validation/meta.yaml index ca512c4353..7cbfec96e6 100644 --- a/src/schemas/validation/meta.yaml +++ b/src/schemas/validation/meta.yaml @@ -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 @@ -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 diff --git a/src/schemas/validation/schema-base.yaml b/src/schemas/validation/schema-base.yaml index 195ae5ed43..bdfd579b5c 100644 --- a/src/schemas/validation/schema-base.yaml +++ b/src/schemas/validation/schema-base.yaml @@ -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' diff --git a/src/schemas/validation/schema.yaml b/src/schemas/validation/schema.yaml index 05e5704fe1..e2f6bbdc8d 100644 --- a/src/schemas/validation/schema.yaml +++ b/src/schemas/validation/schema.yaml @@ -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 @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: '^/': @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -528,7 +528,7 @@ $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' @@ -536,7 +536,7 @@ $defs: 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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -1089,7 +1089,7 @@ $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 @@ -1097,7 +1097,7 @@ $defs: 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 diff --git a/tests/schema/fail/encoding-enc-item-exclusion.yaml b/tests/schema/fail/encoding-enc-item-exclusion.yaml index e0c7e03b8e..d2ec2fd59f 100644 --- a/tests/schema/fail/encoding-enc-item-exclusion.yaml +++ b/tests/schema/fail/encoding-enc-item-exclusion.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/fail/encoding-enc-prefix-exclusion.yaml b/tests/schema/fail/encoding-enc-prefix-exclusion.yaml index 9ed8c09c18..7e788957d6 100644 --- a/tests/schema/fail/encoding-enc-prefix-exclusion.yaml +++ b/tests/schema/fail/encoding-enc-prefix-exclusion.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/fail/example-examples.yaml b/tests/schema/fail/example-examples.yaml index aa8227817d..884b5a1032 100644 --- a/tests/schema/fail/example-examples.yaml +++ b/tests/schema/fail/example-examples.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 # this example should fail, as example cannot be used together with examples. diff --git a/tests/schema/fail/example-object-old-exclusions.yaml b/tests/schema/fail/example-object-old-exclusions.yaml index 37be07da1c..c52d4d9988 100644 --- a/tests/schema/fail/example-object-old-exclusions.yaml +++ b/tests/schema/fail/example-object-old-exclusions.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/fail/example-object-old-vs-data.yaml b/tests/schema/fail/example-object-old-vs-data.yaml index f52e7feb0e..a73917f1ed 100644 --- a/tests/schema/fail/example-object-old-vs-data.yaml +++ b/tests/schema/fail/example-object-old-vs-data.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/fail/example-object-old-vs-ser.yaml b/tests/schema/fail/example-object-old-vs-ser.yaml index 43ba991e4e..206146bd05 100644 --- a/tests/schema/fail/example-object-old-vs-ser.yaml +++ b/tests/schema/fail/example-object-old-vs-ser.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/fail/example-object-ser-exclusions.yaml b/tests/schema/fail/example-object-ser-exclusions.yaml index 3a6bc01e21..605fbc94f3 100644 --- a/tests/schema/fail/example-object-ser-exclusions.yaml +++ b/tests/schema/fail/example-object-ser-exclusions.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/fail/invalid_schema_types.yaml b/tests/schema/fail/invalid_schema_types.yaml index b3aa50a6c8..4bf326945e 100644 --- a/tests/schema/fail/invalid_schema_types.yaml +++ b/tests/schema/fail/invalid_schema_types.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 # this example shows invalid types for the schemaObject diff --git a/tests/schema/fail/media-type-enc-item-exclusion.yaml b/tests/schema/fail/media-type-enc-item-exclusion.yaml index 5bcf06a94d..d30e841aef 100644 --- a/tests/schema/fail/media-type-enc-item-exclusion.yaml +++ b/tests/schema/fail/media-type-enc-item-exclusion.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/fail/media-type-enc-prefix-exclusion.yaml b/tests/schema/fail/media-type-enc-prefix-exclusion.yaml index 2f19064c22..30ceecb2df 100644 --- a/tests/schema/fail/media-type-enc-prefix-exclusion.yaml +++ b/tests/schema/fail/media-type-enc-prefix-exclusion.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/fail/no_containers.yaml b/tests/schema/fail/no_containers.yaml index 3c38be021d..698edebd31 100644 --- a/tests/schema/fail/no_containers.yaml +++ b/tests/schema/fail/no_containers.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 # this example should fail as there are no paths, components or webhooks containers (at least one of which must be present) diff --git a/tests/schema/fail/operation-object-query-with-querystring.yaml b/tests/schema/fail/operation-object-query-with-querystring.yaml index 5046d9c73c..35e201abcb 100644 --- a/tests/schema/fail/operation-object-query-with-querystring.yaml +++ b/tests/schema/fail/operation-object-query-with-querystring.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/fail/operation-object-two-querystrings.yaml b/tests/schema/fail/operation-object-two-querystrings.yaml index 35cebf0a3c..c56c368266 100644 --- a/tests/schema/fail/operation-object-two-querystrings.yaml +++ b/tests/schema/fail/operation-object-two-querystrings.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/fail/parameter-object-content-not-with-style.yaml b/tests/schema/fail/parameter-object-content-not-with-style.yaml index 7a16b89aa8..3730f9f6f2 100644 --- a/tests/schema/fail/parameter-object-content-not-with-style.yaml +++ b/tests/schema/fail/parameter-object-content-not-with-style.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/fail/parameter-object-querystring-not-with-schema.yaml b/tests/schema/fail/parameter-object-querystring-not-with-schema.yaml index 4f4cf98666..321cadbb87 100644 --- a/tests/schema/fail/parameter-object-querystring-not-with-schema.yaml +++ b/tests/schema/fail/parameter-object-querystring-not-with-schema.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/fail/path-item-object-conflicting-additional-operation.yaml b/tests/schema/fail/path-item-object-conflicting-additional-operation.yaml index f068406b68..1301f9613a 100644 --- a/tests/schema/fail/path-item-object-conflicting-additional-operation.yaml +++ b/tests/schema/fail/path-item-object-conflicting-additional-operation.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/fail/path-item-object-query-with-querystring.yaml b/tests/schema/fail/path-item-object-query-with-querystring.yaml index 6efbda4468..521fd70820 100644 --- a/tests/schema/fail/path-item-object-query-with-querystring.yaml +++ b/tests/schema/fail/path-item-object-query-with-querystring.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/fail/path-item-object-two-querystrings.yaml b/tests/schema/fail/path-item-object-two-querystrings.yaml index daf5caa494..e7a84bfd58 100644 --- a/tests/schema/fail/path-item-object-two-querystrings.yaml +++ b/tests/schema/fail/path-item-object-two-querystrings.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/fail/server_enum_empty.yaml b/tests/schema/fail/server_enum_empty.yaml index db4b970ced..c6acba2ace 100644 --- a/tests/schema/fail/server_enum_empty.yaml +++ b/tests/schema/fail/server_enum_empty.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 # this example should fail as the server variable enum is empty, and so does not contain the default value diff --git a/tests/schema/fail/servers.yaml b/tests/schema/fail/servers.yaml index 1b5e2d5fc8..ce172e31be 100644 --- a/tests/schema/fail/servers.yaml +++ b/tests/schema/fail/servers.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 # this example should fail, as servers must be an array, not an object diff --git a/tests/schema/fail/unknown_container.yaml b/tests/schema/fail/unknown_container.yaml index c0a4b8bb7e..23a9d6a896 100644 --- a/tests/schema/fail/unknown_container.yaml +++ b/tests/schema/fail/unknown_container.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 # this example should fail as overlays is not a valid top-level object/keyword diff --git a/tests/schema/fail/xml-attr-exclusion.yaml b/tests/schema/fail/xml-attr-exclusion.yaml index b48a02d1a5..519388a29a 100644 --- a/tests/schema/fail/xml-attr-exclusion.yaml +++ b/tests/schema/fail/xml-attr-exclusion.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/fail/xml-wrapped-exclusion.yaml b/tests/schema/fail/xml-wrapped-exclusion.yaml index 74f8ea512e..5406431c9f 100644 --- a/tests/schema/fail/xml-wrapped-exclusion.yaml +++ b/tests/schema/fail/xml-wrapped-exclusion.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/callback-object-examples.yaml b/tests/schema/pass/callback-object-examples.yaml index 7a7f86f070..64cba81877 100644 --- a/tests/schema/pass/callback-object-examples.yaml +++ b/tests/schema/pass/callback-object-examples.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/comp_pathitems.yaml b/tests/schema/pass/comp_pathitems.yaml index 5178c1f56b..45b0e00030 100644 --- a/tests/schema/pass/comp_pathitems.yaml +++ b/tests/schema/pass/comp_pathitems.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/components-object-example.yaml b/tests/schema/pass/components-object-example.yaml index 33a56e608f..d2c968031b 100644 --- a/tests/schema/pass/components-object-example.yaml +++ b/tests/schema/pass/components-object-example.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/example-object-examples.yaml b/tests/schema/pass/example-object-examples.yaml index af8cc255f0..e512f97df4 100644 --- a/tests/schema/pass/example-object-examples.yaml +++ b/tests/schema/pass/example-object-examples.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/header-object-examples.yaml b/tests/schema/pass/header-object-examples.yaml index 4122c75c61..ad91d1bfb6 100644 --- a/tests/schema/pass/header-object-examples.yaml +++ b/tests/schema/pass/header-object-examples.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/info-object-example.yaml b/tests/schema/pass/info-object-example.yaml index 1d36bef06c..e3d00ee549 100644 --- a/tests/schema/pass/info-object-example.yaml +++ b/tests/schema/pass/info-object-example.yaml @@ -1,5 +1,5 @@ # including External Documentation Object Example -openapi: 3.2.0 +openapi: 4.0.0 $self: https://example.com/openapi info: title: Example Pet Store App diff --git a/tests/schema/pass/info_summary.yaml b/tests/schema/pass/info_summary.yaml index 6697751d56..49654d43fe 100644 --- a/tests/schema/pass/info_summary.yaml +++ b/tests/schema/pass/info_summary.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API summary: My lovely API diff --git a/tests/schema/pass/json_schema_dialect.yaml b/tests/schema/pass/json_schema_dialect.yaml index fa054c9b89..254b853c78 100644 --- a/tests/schema/pass/json_schema_dialect.yaml +++ b/tests/schema/pass/json_schema_dialect.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: summary: Testing jsonSchemaDialect title: My API @@ -6,10 +6,10 @@ info: license: name: Apache 2.0 identifier: Apache-2.0 -jsonSchemaDialect: https://spec.openapis.org/oas/3.2/dialect/WORK-IN-PROGRESS +jsonSchemaDialect: https://spec.openapis.org/oas/4.0/dialect/WORK-IN-PROGRESS components: schemas: WithDollarSchema: $id: "locked-metaschema" - $schema: https://spec.openapis.org/oas/3.2/dialect/WORK-IN-PROGRESS + $schema: https://spec.openapis.org/oas/4.0/dialect/WORK-IN-PROGRESS paths: {} diff --git a/tests/schema/pass/license_identifier.yaml b/tests/schema/pass/license_identifier.yaml index 20d5e4368e..97840c928b 100644 --- a/tests/schema/pass/license_identifier.yaml +++ b/tests/schema/pass/license_identifier.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API summary: My lovely API diff --git a/tests/schema/pass/link-object-examples.yaml b/tests/schema/pass/link-object-examples.yaml index 9d471f0a03..8c109c363f 100644 --- a/tests/schema/pass/link-object-examples.yaml +++ b/tests/schema/pass/link-object-examples.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/media-type-examples.yaml b/tests/schema/pass/media-type-examples.yaml index 6ace84a8d5..035753805a 100644 --- a/tests/schema/pass/media-type-examples.yaml +++ b/tests/schema/pass/media-type-examples.yaml @@ -1,5 +1,5 @@ # including Encoding Object examples -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/mega.yaml b/tests/schema/pass/mega.yaml index 8304fbe199..9f4659e974 100644 --- a/tests/schema/pass/mega.yaml +++ b/tests/schema/pass/mega.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: summary: My API's summary title: My API diff --git a/tests/schema/pass/minimal_comp.yaml b/tests/schema/pass/minimal_comp.yaml index 8f81f7e05e..957d30a7f2 100644 --- a/tests/schema/pass/minimal_comp.yaml +++ b/tests/schema/pass/minimal_comp.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/minimal_hooks.yaml b/tests/schema/pass/minimal_hooks.yaml index 0e44257ad0..82acd7013d 100644 --- a/tests/schema/pass/minimal_hooks.yaml +++ b/tests/schema/pass/minimal_hooks.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/minimal_paths.yaml b/tests/schema/pass/minimal_paths.yaml index c332bba18c..3944b68b68 100644 --- a/tests/schema/pass/minimal_paths.yaml +++ b/tests/schema/pass/minimal_paths.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/non-oauth-scopes.yaml b/tests/schema/pass/non-oauth-scopes.yaml index 45506616b4..3c2d203516 100644 --- a/tests/schema/pass/non-oauth-scopes.yaml +++ b/tests/schema/pass/non-oauth-scopes.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: Non-oAuth Scopes example version: 1.0.0 diff --git a/tests/schema/pass/operation-object-example.yaml b/tests/schema/pass/operation-object-example.yaml index 1e5bac29f1..24f2a9780d 100644 --- a/tests/schema/pass/operation-object-example.yaml +++ b/tests/schema/pass/operation-object-example.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/parameter-object-examples.yaml b/tests/schema/pass/parameter-object-examples.yaml index 8a3db655ba..d87e9d6431 100644 --- a/tests/schema/pass/parameter-object-examples.yaml +++ b/tests/schema/pass/parameter-object-examples.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/path-item-object-example.yaml b/tests/schema/pass/path-item-object-example.yaml index 0ecc2d64fa..fcf6fcda7c 100644 --- a/tests/schema/pass/path-item-object-example.yaml +++ b/tests/schema/pass/path-item-object-example.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/path_item_servers_parameters.yaml b/tests/schema/pass/path_item_servers_parameters.yaml index 7cedc5d16c..b914807613 100644 --- a/tests/schema/pass/path_item_servers_parameters.yaml +++ b/tests/schema/pass/path_item_servers_parameters.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/path_no_response.yaml b/tests/schema/pass/path_no_response.yaml index e4876799c9..cce0faca35 100644 --- a/tests/schema/pass/path_no_response.yaml +++ b/tests/schema/pass/path_no_response.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/path_var_empty_pathitem.yaml b/tests/schema/pass/path_var_empty_pathitem.yaml index e79b7cd4fe..92dd0df37f 100644 --- a/tests/schema/pass/path_var_empty_pathitem.yaml +++ b/tests/schema/pass/path_var_empty_pathitem.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/paths-object-example.yaml b/tests/schema/pass/paths-object-example.yaml index 2ee08e581e..f1d0d2ddf4 100644 --- a/tests/schema/pass/paths-object-example.yaml +++ b/tests/schema/pass/paths-object-example.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/request-body-examples.yaml b/tests/schema/pass/request-body-examples.yaml index 4da1d41bd4..722480db2e 100644 --- a/tests/schema/pass/request-body-examples.yaml +++ b/tests/schema/pass/request-body-examples.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/response-object-examples.yaml b/tests/schema/pass/response-object-examples.yaml index f55d5733ed..3f104e25aa 100644 --- a/tests/schema/pass/response-object-examples.yaml +++ b/tests/schema/pass/response-object-examples.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/schema-object-deprecated-example-keyword.yaml b/tests/schema/pass/schema-object-deprecated-example-keyword.yaml index 969e66f283..fe4ef0e6a6 100644 --- a/tests/schema/pass/schema-object-deprecated-example-keyword.yaml +++ b/tests/schema/pass/schema-object-deprecated-example-keyword.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/schema.yaml b/tests/schema/pass/schema.yaml index a6d72b9972..0105b62eec 100644 --- a/tests/schema/pass/schema.yaml +++ b/tests/schema/pass/schema.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/security-scheme-object-examples.yaml b/tests/schema/pass/security-scheme-object-examples.yaml index d3472d5a32..4e506a9c4f 100644 --- a/tests/schema/pass/security-scheme-object-examples.yaml +++ b/tests/schema/pass/security-scheme-object-examples.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/servers.yaml b/tests/schema/pass/servers.yaml index 07992113bf..bb76668f97 100644 --- a/tests/schema/pass/servers.yaml +++ b/tests/schema/pass/servers.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/specification-extensions.yaml b/tests/schema/pass/specification-extensions.yaml index 8148462f83..c83f377205 100644 --- a/tests/schema/pass/specification-extensions.yaml +++ b/tests/schema/pass/specification-extensions.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/tag-object-example.yaml b/tests/schema/pass/tag-object-example.yaml index 6e740c8df0..53f86cc9b1 100644 --- a/tests/schema/pass/tag-object-example.yaml +++ b/tests/schema/pass/tag-object-example.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: API version: 1.0.0 diff --git a/tests/schema/pass/valid_schema_types.yaml b/tests/schema/pass/valid_schema_types.yaml index 43e7cdc782..b393422539 100644 --- a/tests/schema/pass/valid_schema_types.yaml +++ b/tests/schema/pass/valid_schema_types.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.1 +openapi: 4.0.1 # this example shows that top-level schemaObjects MAY be booleans diff --git a/tests/schema/pass/webhook-example.yaml b/tests/schema/pass/webhook-example.yaml index c0b505ac63..f948895a90 100644 --- a/tests/schema/pass/webhook-example.yaml +++ b/tests/schema/pass/webhook-example.yaml @@ -1,4 +1,4 @@ -openapi: 3.2.0 +openapi: 4.0.0 info: title: Webhook Example version: 1.0.0 diff --git a/tests/schema/schema.test.mjs b/tests/schema/schema.test.mjs index ad42b15e71..24729f7fc0 100644 --- a/tests/schema/schema.test.mjs +++ b/tests/schema/schema.test.mjs @@ -13,12 +13,12 @@ await registerOasSchema(); await registerSchema("./src/schemas/validation/schema.yaml"); const fixtures = './tests/schema'; -describe("v3.2", () => { +describe("v4.0", () => { test("schema.yaml schema test", async () => { // Files in the pass/fail folders get run against schema-base.yaml. // This instance is instead run against schema.yaml. const oad = { - openapi: "3.2.0", + openapi: "4.0.0", info: { title: "API", version: "1.0.0"