diff --git a/Sources/OpenAPIKit/Document/Document.swift b/Sources/OpenAPIKit/Document/Document.swift index d2a591c85..ea5812886 100644 --- a/Sources/OpenAPIKit/Document/Document.swift +++ b/Sources/OpenAPIKit/Document/Document.swift @@ -149,7 +149,7 @@ extension OpenAPI { public let conditionalWarnings: [(any Condition, OpenAPI.Warning)] public init( - openAPIVersion: Version = .v3_1_1, + openAPIVersion: Version = .v3_2_0, selfURI: URL? = nil, info: Info, servers: [Server], diff --git a/Tests/OpenAPIKitTests/Document/DocumentTests.swift b/Tests/OpenAPIKitTests/Document/DocumentTests.swift index afd10edcf..dcd31ca67 100644 --- a/Tests/OpenAPIKitTests/Document/DocumentTests.swift +++ b/Tests/OpenAPIKitTests/Document/DocumentTests.swift @@ -520,7 +520,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1" + "openapi" : "3.2.0" } """ ) @@ -534,7 +534,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1", + "openapi" : "3.2.0", "paths" : { } @@ -684,7 +684,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1", + "openapi" : "3.2.0", "servers" : [ { "url" : "http:\\/\\/google.com" @@ -703,7 +703,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1", + "openapi" : "3.2.0", "paths" : { }, @@ -746,7 +746,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1" + "openapi" : "3.2.0" } """ ) @@ -761,7 +761,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1", + "openapi" : "3.2.0", "paths" : { } @@ -798,7 +798,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1", + "openapi" : "3.2.0", "paths" : { "\\/test" : { "summary" : "hi" @@ -817,7 +817,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1", + "openapi" : "3.2.0", "paths" : { "\\/test" : { "summary" : "hi" @@ -867,7 +867,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1", + "openapi" : "3.2.0", "security" : [ { "security" : [ @@ -897,7 +897,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1", + "openapi" : "3.2.0", "paths" : { }, @@ -944,7 +944,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1", + "openapi" : "3.2.0", "tags" : [ { "name" : "hi" @@ -963,7 +963,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1", + "openapi" : "3.2.0", "paths" : { }, @@ -1009,7 +1009,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1" + "openapi" : "3.2.0" } """ ) @@ -1026,7 +1026,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1", + "openapi" : "3.2.0", "paths" : { } @@ -1068,7 +1068,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1", + "openapi" : "3.2.0", "x-specialFeature" : [ "hello", "world" @@ -1089,7 +1089,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1", + "openapi" : "3.2.0", "paths" : { }, @@ -1129,7 +1129,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1", + "openapi" : "3.2.0", "paths" : { }, @@ -1181,7 +1181,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1", + "openapi" : "3.2.0", "webhooks" : { "webhook-test" : { "delete" : { @@ -1252,7 +1252,7 @@ extension DocumentTests { "title": "API", "version": "1.0" }, - "openapi": "3.1.1", + "openapi": "3.2.0", "paths": { }, "webhooks": { @@ -1324,7 +1324,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.1", + "openapi" : "3.2.0", "webhooks" : { "webhook-test" : { "delete" : { @@ -1373,7 +1373,7 @@ extension DocumentTests { "title": "API", "version": "1.0" }, - "openapi": "3.1.1", + "openapi": "3.2.0", "webhooks": { "webhook-test": { "delete": { diff --git a/documentation/migration_guides/v5_migration_guide.md b/documentation/migration_guides/v5_migration_guide.md index 245a119ec..def87f87f 100644 --- a/documentation/migration_guides/v5_migration_guide.md +++ b/documentation/migration_guides/v5_migration_guide.md @@ -26,6 +26,10 @@ statements will need to be updated. If you use `v3_1_x(x: 2)` you should replace it with `v3_1_2`. +The default OAS version of a `Document` has been updated to `v3_2_0`. If you +need to produce a `v3_1_x` document, update your code to specify that version in +the `OpenAPI.Document` constructor. + ### Content Types The `application/x-yaml` media type is officially superseded by `application/yaml`. OpenAPIKit will continue to support reading the