diff --git a/README.md b/README.md index ae17c51a1..e279b0d23 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ # OpenAPIKit -A library containing Swift types that encode to- and decode from [OpenAPI 3.0.x](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md) and [OpenAPI 3.1.x](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md) Documents and their components. +A library containing Swift types that encode to- and decode from [OpenAPI 3.0.x](https://spec.openapis.org/oas/v3.0.4.html) and [OpenAPI 3.1.x](https://spec.openapis.org/oas/v3.1.1.html) Documents and their components. OpenAPIKit follows semantic versioning despite the fact that the OpenAPI specificaiton does not. The following chart shows which OpenAPI specification versions and key features are supported by which OpenAPIKit versions. @@ -149,7 +149,7 @@ let newDoc: OpenAPIKit.OpenAPI.Document oldDoc = try? JSONDecoder().decode(OpenAPI.Document.self, from: someFileData) -newDoc = oldDoc?.convert(to: .v3_1_0) ?? +newDoc = oldDoc?.convert(to: .v3_1_1) ?? (try! JSONDecoder().decode(OpenAPI.Document.self, from: someFileData)) // ^ Here we simply fall-back to 3.1.x if loading as 3.0.x failed. You could do a more // graceful job of this by determining up front which version to attempt to load or by @@ -165,7 +165,7 @@ If retaining order is important for your use-case, I recommend the [**Yams**](ht The Foundation JSON encoding and decoding will be the most stable and battle-tested option with Yams as a pretty well established and stable option as well. FineJSON is lesser used (to my knowledge) but I have had success with it in the past. ### OpenAPI Document structure -The types used by this library largely mirror the object definitions found in the OpenAPI specification [version 3.1.0](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md) (`OpenAPIKit` module) and [version 3.0.3](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md) (`OpenAPIKit30` module). The [Project Status](#project-status) lists each object defined by the spec and the name of the respective type in this library. The project status page currently focuses on OpenAPI 3.1.x but for the purposes of determining what things are named and what is supported you can mostly infer the status of the OpenAPI 3.0.x support as well. +The types used by this library largely mirror the object definitions found in the OpenAPI specification [version 3.1.1](https://spec.openapis.org/oas/v3.1.1.html) (`OpenAPIKit` module) and [version 3.0.4](https://spec.openapis.org/oas/v3.0.4.html) (`OpenAPIKit30` module). The [Project Status](#project-status) lists each object defined by the spec and the name of the respective type in this library. The project status page currently focuses on OpenAPI 3.1.x but for the purposes of determining what things are named and what is supported you can mostly infer the status of the OpenAPI 3.0.x support as well. #### Document Root At the root there is an `OpenAPI.Document`. In addition to some information that applies to the entire API, the document contains `OpenAPI.Components` (essentially a dictionary of reusable components that can be referenced with `JSONReferences` and `OpenAPI.References`) and an `OpenAPI.PathItem.Map` (a dictionary of routes your API defines). @@ -289,7 +289,7 @@ let document = OpenAPI.Document( ``` #### Specification Extensions -Many OpenAPIKit types support [Specification Extensions](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#specification-extensions). As described in the OpenAPI Specification, these extensions must be objects that are keyed with the prefix "x-". For example, a property named "specialProperty" on the root OpenAPI Object (`OpenAPI.Document`) is invalid but the property "x-specialProperty" is a valid specification extension. +Many OpenAPIKit types support [Specification Extensions](https://spec.openapis.org/oas/v3.1.1.html#specification-extensions). As described in the OpenAPI Specification, these extensions must be objects that are keyed with the prefix "x-". For example, a property named "specialProperty" on the root OpenAPI Object (`OpenAPI.Document`) is invalid but the property "x-specialProperty" is a valid specification extension. You can get or set specification extensions via the `vendorExtensions` property on any object that supports this feature. The keys are `Strings` beginning with the aforementioned "x-" prefix and the values are `AnyCodable`. If you set an extension without using the "x-" prefix, the prefix will be added upon encoding. diff --git a/Sources/OpenAPIKit/Callbacks.swift b/Sources/OpenAPIKit/Callbacks.swift index 7a671bdeb..2d0019ac4 100644 --- a/Sources/OpenAPIKit/Callbacks.swift +++ b/Sources/OpenAPIKit/Callbacks.swift @@ -13,7 +13,7 @@ extension OpenAPI { /// A map from runtime expressions to path items to be used as /// callbacks for the API. The OpenAPI Spec "Callback Object." /// - /// See [OpenAPI Callback Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#callback-object). + /// See [OpenAPI Callback Object](https://spec.openapis.org/oas/v3.1.1.html#callback-object). /// public typealias Callbacks = OrderedDictionary, PathItem>> diff --git a/Sources/OpenAPIKit/Components Object/Components.swift b/Sources/OpenAPIKit/Components Object/Components.swift index cc1996b68..73ca5d480 100644 --- a/Sources/OpenAPIKit/Components Object/Components.swift +++ b/Sources/OpenAPIKit/Components Object/Components.swift @@ -11,7 +11,7 @@ import Foundation extension OpenAPI { /// OpenAPI Spec "Components Object". /// - /// See [OpenAPI Components Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#components-object). + /// See [OpenAPI Components Object](https://spec.openapis.org/oas/v3.1.1.html#components-object). /// /// This is a place to put reusable components to /// be referenced from other parts of the spec. diff --git a/Sources/OpenAPIKit/Content/Content.swift b/Sources/OpenAPIKit/Content/Content.swift index e782c9818..2bdcd9321 100644 --- a/Sources/OpenAPIKit/Content/Content.swift +++ b/Sources/OpenAPIKit/Content/Content.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// OpenAPI Spec "Media Type Object" /// - /// See [OpenAPI Media Type Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#media-type-object). + /// See [OpenAPI Media Type Object](https://spec.openapis.org/oas/v3.1.1.html#media-type-object). public struct Content: Equatable, CodableVendorExtendable { public var schema: Either, JSONSchema>? public var example: AnyCodable? diff --git a/Sources/OpenAPIKit/Content/ContentEncoding.swift b/Sources/OpenAPIKit/Content/ContentEncoding.swift index 65d55b754..7910b81a6 100644 --- a/Sources/OpenAPIKit/Content/ContentEncoding.swift +++ b/Sources/OpenAPIKit/Content/ContentEncoding.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI.Content { /// OpenAPI Spec "Encoding Object" /// - /// See [OpenAPI Encoding Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#encoding-object). + /// See [OpenAPI Encoding Object](https://spec.openapis.org/oas/v3.1.1.html#encoding-object). public struct Encoding: Equatable { public typealias Style = OpenAPI.Parameter.SchemaContext.Style diff --git a/Sources/OpenAPIKit/Document/DereferencedDocument.swift b/Sources/OpenAPIKit/Document/DereferencedDocument.swift index 7906923fd..eac8afc80 100644 --- a/Sources/OpenAPIKit/Document/DereferencedDocument.swift +++ b/Sources/OpenAPIKit/Document/DereferencedDocument.swift @@ -105,7 +105,7 @@ extension DereferencedDocument { /// each path, traversed in the order the paths appear in /// the document. /// - /// See [Operation Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#operation-object) in the specifcation. + /// See [Operation Object](https://spec.openapis.org/oas/v3.1.1.html#operation-object) in the specifcation. /// public var allOperationIds: [String] { return paths.values diff --git a/Sources/OpenAPIKit/Document/Document.swift b/Sources/OpenAPIKit/Document/Document.swift index d00f4d970..13977f93a 100644 --- a/Sources/OpenAPIKit/Document/Document.swift +++ b/Sources/OpenAPIKit/Document/Document.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// The root of an OpenAPI 3.1 document. /// - /// See [OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md). + /// See [OpenAPI Specification](https://spec.openapis.org/oas/v3.1.1.html). /// /// An OpenAPI Document can say a _lot_ about the API it describes. /// A read-through of the specification is highly recommended because @@ -100,7 +100,7 @@ extension OpenAPI { /// /// Closely related to the callbacks feature, this section describes requests initiated other than by an API call, for example by an out of band registration. /// The key name is a unique string to refer to each webhook, while the (optionally referenced) Path Item Object describes a request that may be initiated by the API provider and the expected responses - /// See [OpenAPI Webhook Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#fixed-fields) + /// See [OpenAPI Webhook Object](https://spec.openapis.org/oas/v3.1.1.html#fixed-fields) public var webhooks: OrderedDictionary, OpenAPI.PathItem>> /// A declaration of which security mechanisms can be used across the API. @@ -142,7 +142,7 @@ extension OpenAPI { public var vendorExtensions: [String: AnyCodable] public init( - openAPIVersion: Version = .v3_1_0, + openAPIVersion: Version = .v3_1_1, info: Info, servers: [Server], paths: PathItem.Map, @@ -229,7 +229,7 @@ extension OpenAPI.Document { /// each path, traversed in the order the paths appear in /// the document. /// - /// See [Operation Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#operation-object) in the specifcation. + /// See [Operation Object](https://spec.openapis.org/oas/v3.1.1.html#operation-object) in the specifcation. /// public var allOperationIds: [String] { return paths.values @@ -413,7 +413,7 @@ extension OpenAPI { /// Multiple entries in this dictionary indicate all schemes named are /// required on the same request. /// - /// See [OpenAPI Security Requirement Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#security-requirement-object). + /// See [OpenAPI Security Requirement Object](https://spec.openapis.org/oas/v3.1.1.html#security-requirement-object). public typealias SecurityRequirement = [JSONReference: [String]] } diff --git a/Sources/OpenAPIKit/Document/DocumentInfo.swift b/Sources/OpenAPIKit/Document/DocumentInfo.swift index ddbf3a3ed..60a25431e 100644 --- a/Sources/OpenAPIKit/Document/DocumentInfo.swift +++ b/Sources/OpenAPIKit/Document/DocumentInfo.swift @@ -11,7 +11,7 @@ import Foundation extension OpenAPI.Document { /// OpenAPI Spec "Info Object" /// - /// See [OpenAPI Info Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#info-object). + /// See [OpenAPI Info Object](https://spec.openapis.org/oas/v3.1.1.html#info-object). public struct Info: Equatable, CodableVendorExtendable { public let title: String public let summary: String? @@ -50,7 +50,7 @@ extension OpenAPI.Document { /// OpenAPI Spec "Contact Object" /// - /// See [OpenAPI Contact Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#contact-object). + /// See [OpenAPI Contact Object](https://spec.openapis.org/oas/v3.1.1.html#contact-object). public struct Contact: Equatable, CodableVendorExtendable { public let name: String? public let url: URL? @@ -78,7 +78,7 @@ extension OpenAPI.Document { /// OpenAPI Spec "License Object" /// - /// See [OpenAPI License Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#license-object). + /// See [OpenAPI License Object](https://spec.openapis.org/oas/v3.1.1.html#license-object). public struct License: Equatable, CodableVendorExtendable { public let name: String public let identifier: Identifier? diff --git a/Sources/OpenAPIKit/Example.swift b/Sources/OpenAPIKit/Example.swift index e9c904f7c..cbd6c4863 100644 --- a/Sources/OpenAPIKit/Example.swift +++ b/Sources/OpenAPIKit/Example.swift @@ -11,7 +11,7 @@ import Foundation extension OpenAPI { /// OpenAPI Spec "Example Object" /// - /// See [OpenAPI Example Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#example-object). + /// See [OpenAPI Example Object](https://spec.openapis.org/oas/v3.1.1.html#example-object). public struct Example: Equatable, CodableVendorExtendable { public let summary: String? public let description: String? diff --git a/Sources/OpenAPIKit/ExternalDocumentation.swift b/Sources/OpenAPIKit/ExternalDocumentation.swift index 6fb8a7761..c46562cc3 100644 --- a/Sources/OpenAPIKit/ExternalDocumentation.swift +++ b/Sources/OpenAPIKit/ExternalDocumentation.swift @@ -11,7 +11,7 @@ import Foundation extension OpenAPI { /// OpenAPI Spec "External Documentation Object" /// - /// See [OpenAPI External Documentation Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#external-documentation-object). + /// See [OpenAPI External Documentation Object](https://spec.openapis.org/oas/v3.1.1.html#external-documentation-object). public struct ExternalDocumentation: Equatable, CodableVendorExtendable { public var description: String? public var url: URL diff --git a/Sources/OpenAPIKit/Header/Header.swift b/Sources/OpenAPIKit/Header/Header.swift index 309901af9..e5c36724a 100644 --- a/Sources/OpenAPIKit/Header/Header.swift +++ b/Sources/OpenAPIKit/Header/Header.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// OpenAPI Spec "Header Object" /// - /// See [OpenAPI Header Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#header-object). + /// See [OpenAPI Header Object](https://spec.openapis.org/oas/v3.1.1.html#header-object). public struct Header: Equatable, CodableVendorExtendable { public typealias SchemaContext = Parameter.SchemaContext diff --git a/Sources/OpenAPIKit/Link.swift b/Sources/OpenAPIKit/Link.swift index 39a1da918..b67cc7574 100644 --- a/Sources/OpenAPIKit/Link.swift +++ b/Sources/OpenAPIKit/Link.swift @@ -15,7 +15,7 @@ import Foundation extension OpenAPI { /// OpenAPI Spec "Link Object" /// - /// See [OpenAPI Link Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#link-object). + /// See [OpenAPI Link Object](https://spec.openapis.org/oas/v3.1.1.html#link-object). public struct Link: Equatable, CodableVendorExtendable { /// The **OpenAPI**` `operationRef` or `operationId` field, depending on whether /// a `URL` of a remote or local Operation Object or a `operationId` (String) of an @@ -24,7 +24,7 @@ extension OpenAPI { /// A map from parameter names to either runtime expressions that evaluate to values or /// constant values (`AnyCodable`). /// - /// See the docuemntation for the [OpenAPI Link Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#link-object) for more details. + /// See the docuemntation for the [OpenAPI Link Object](https://spec.openapis.org/oas/v3.1.1.html#link-object) for more details. /// /// Empty dictionaries will be omitted from encoding. public var parameters: OrderedDictionary> diff --git a/Sources/OpenAPIKit/Operation/Operation.swift b/Sources/OpenAPIKit/Operation/Operation.swift index ab620e00e..763722983 100644 --- a/Sources/OpenAPIKit/Operation/Operation.swift +++ b/Sources/OpenAPIKit/Operation/Operation.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// OpenAPI Spec "Operation Object" /// - /// See [OpenAPI Operation Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#operation-object). + /// See [OpenAPI Operation Object](https://spec.openapis.org/oas/v3.1.1.html#operation-object). public struct Operation: Equatable, CodableVendorExtendable { public var tags: [String]? public var summary: String? diff --git a/Sources/OpenAPIKit/Parameter/Parameter.swift b/Sources/OpenAPIKit/Parameter/Parameter.swift index 9c4cf5611..0805bb807 100644 --- a/Sources/OpenAPIKit/Parameter/Parameter.swift +++ b/Sources/OpenAPIKit/Parameter/Parameter.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// OpenAPI Spec "Parameter Object" /// - /// See [OpenAPI Parameter Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#parameter-object). + /// See [OpenAPI Parameter Object](https://spec.openapis.org/oas/v3.1.1.html#parameter-object). public struct Parameter: Equatable, CodableVendorExtendable { public var name: String @@ -162,7 +162,7 @@ extension OpenAPI.Parameter { /// containing exactly the things that differentiate /// one parameter from another, per the specification. /// - /// See [Parameter Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#parameter-object). + /// See [Parameter Object](https://spec.openapis.org/oas/v3.1.1.html#parameter-object). internal struct ParameterIdentity: Hashable { let name: String let location: Context.Location diff --git a/Sources/OpenAPIKit/Parameter/ParameterContext.swift b/Sources/OpenAPIKit/Parameter/ParameterContext.swift index 27ae9c2c0..5f6c5de3a 100644 --- a/Sources/OpenAPIKit/Parameter/ParameterContext.swift +++ b/Sources/OpenAPIKit/Parameter/ParameterContext.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI.Parameter { /// OpenAPI Spec "Parameter Object" location-specific configuration. /// - /// See [OpenAPI Parameter Locations](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#parameter-locations). + /// See [OpenAPI Parameter Locations](https://spec.openapis.org/oas/v3.1.1.html#parameter-locations). /// /// Query, Header, and Cookie parameters are /// all optional by default unless you pass diff --git a/Sources/OpenAPIKit/Parameter/ParameterSchemaContext.swift b/Sources/OpenAPIKit/Parameter/ParameterSchemaContext.swift index cd65f89c5..98f5e11e9 100644 --- a/Sources/OpenAPIKit/Parameter/ParameterSchemaContext.swift +++ b/Sources/OpenAPIKit/Parameter/ParameterSchemaContext.swift @@ -10,8 +10,8 @@ import OpenAPIKitCore extension OpenAPI.Parameter { /// OpenAPI Spec "Parameter Object" schema and style configuration. /// - /// See [OpenAPI Parameter Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#parameter-object) - /// and [OpenAPI Style Values](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#style-values). + /// See [OpenAPI Parameter Object](https://spec.openapis.org/oas/v3.1.1.html#parameter-object) + /// and [OpenAPI Style Values](https://spec.openapis.org/oas/v3.1.1.html#style-values). public struct SchemaContext: Equatable { public var style: Style public var explode: Bool @@ -132,7 +132,7 @@ extension OpenAPI.Parameter.SchemaContext.Style { /// per the OpenAPI Specification. /// /// See the `style` fixed field under - /// [OpenAPI Parameter Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#parameter-object). + /// [OpenAPI Parameter Object](https://spec.openapis.org/oas/v3.1.1.html#parameter-object). public static func `default`(for location: OpenAPI.Parameter.Context) -> Self { switch location { case .query: diff --git a/Sources/OpenAPIKit/Path Item/PathItem.swift b/Sources/OpenAPIKit/Path Item/PathItem.swift index 71f213c35..ec4003806 100644 --- a/Sources/OpenAPIKit/Path Item/PathItem.swift +++ b/Sources/OpenAPIKit/Path Item/PathItem.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// OpenAPI Spec "Path Item Object" /// - /// See [OpenAPI Path Item Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#path-item-object). + /// See [OpenAPI Path Item Object](https://spec.openapis.org/oas/v3.1.1.html#path-item-object). /// /// In addition to parameters that apply to all endpoints under the current path, /// this type offers access to each possible endpoint operation under properties diff --git a/Sources/OpenAPIKit/Request/Request.swift b/Sources/OpenAPIKit/Request/Request.swift index 9d6df8d4e..346e47a43 100644 --- a/Sources/OpenAPIKit/Request/Request.swift +++ b/Sources/OpenAPIKit/Request/Request.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// OpenAPI Spec "Request Body Object" /// - /// See [OpenAPI Request Body Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#request-body-object). + /// See [OpenAPI Request Body Object](https://spec.openapis.org/oas/v3.1.1.html#request-body-object). public struct Request: Equatable, CodableVendorExtendable { public var description: String? public var content: Content.Map diff --git a/Sources/OpenAPIKit/Response/Response.swift b/Sources/OpenAPIKit/Response/Response.swift index 351d487bf..205072cc6 100644 --- a/Sources/OpenAPIKit/Response/Response.swift +++ b/Sources/OpenAPIKit/Response/Response.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// OpenAPI Spec "Response Object" /// - /// See [OpenAPI Response Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#response-object). + /// See [OpenAPI Response Object](https://spec.openapis.org/oas/v3.1.1.html#response-object). public struct Response: Equatable, CodableVendorExtendable { public var description: String public var headers: Header.Map? diff --git a/Sources/OpenAPIKit/RuntimeExpression.swift b/Sources/OpenAPIKit/RuntimeExpression.swift index ac168bbef..3256ada18 100644 --- a/Sources/OpenAPIKit/RuntimeExpression.swift +++ b/Sources/OpenAPIKit/RuntimeExpression.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// OpenAPI Spec "Runtime Expression" /// - /// See [OpenAPI Runtime Expression[(https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#runtime-expressions). + /// See [OpenAPI Runtime Expression[(https://spec.openapis.org/oas/v3.1.1.html#runtime-expressions). /// public enum RuntimeExpression: RawRepresentable, Equatable { case url diff --git a/Sources/OpenAPIKit/Schema Object/JSONSchema.swift b/Sources/OpenAPIKit/Schema Object/JSONSchema.swift index 599dfcbd1..261561ae1 100644 --- a/Sources/OpenAPIKit/Schema Object/JSONSchema.swift +++ b/Sources/OpenAPIKit/Schema Object/JSONSchema.swift @@ -9,7 +9,7 @@ import OpenAPIKitCore /// OpenAPI "Schema Object" /// -/// See [OpenAPI Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#schema-object). +/// See [OpenAPI Schema Object](https://spec.openapis.org/oas/v3.1.1.html#schema-object). public struct JSONSchema: JSONSchemaContext, HasWarnings { public let warnings: [OpenAPI.Warning] diff --git a/Sources/OpenAPIKit/Schema Object/JSONSchemaContext.swift b/Sources/OpenAPIKit/Schema Object/JSONSchemaContext.swift index e425e4ddc..1c89eacfa 100644 --- a/Sources/OpenAPIKit/Schema Object/JSONSchemaContext.swift +++ b/Sources/OpenAPIKit/Schema Object/JSONSchemaContext.swift @@ -60,7 +60,7 @@ public protocol JSONSchemaContext { /// be placed on a parent object (one level up from an `allOf`, `anyOf`, /// or `oneOf`) as a way to reduce redundancy. /// - /// See [OpenAPI Discriminator Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#discriminator-object). + /// See [OpenAPI Discriminator Object](https://spec.openapis.org/oas/v3.1.1.html#discriminator-object). var discriminator: OpenAPI.Discriminator? { get } /// Get the external docs, if specified. If unspecified, returns `nil`. @@ -1035,7 +1035,7 @@ extension JSONSchema.CoreContext: Decodable { .underlyingError( InconsistencyError( subjectName: "OpenAPI Schema", - details: "Found 'nullable' property. This property is not supported by OpenAPI v3.1.0. OpenAPIKit has translated it into 'type: [\"null\", ...]'.", + details: "Found 'nullable' property. This property is not supported by OpenAPI v3.1.x. OpenAPIKit has translated it into 'type: [\"null\", ...]'.", codingPath: container.codingPath ) ) diff --git a/Sources/OpenAPIKit/Schema Object/TypesAndFormats.swift b/Sources/OpenAPIKit/Schema Object/TypesAndFormats.swift index edb593d96..718b30951 100644 --- a/Sources/OpenAPIKit/Schema Object/TypesAndFormats.swift +++ b/Sources/OpenAPIKit/Schema Object/TypesAndFormats.swift @@ -18,7 +18,7 @@ public protocol SwiftTyped { /// The raw types supported by JSON Schema. /// -/// These are the OpenAPI [data types](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#data-types) +/// These are the OpenAPI [data types](https://spec.openapis.org/oas/v3.1.1.html#data-types) /// and additionally the `object` and `array` /// "compound" data types. /// - boolean @@ -54,7 +54,7 @@ public enum JSONType: String, Codable { /// /// You can also find information on types and /// formats in the OpenAPI Specification's -/// section on [data types](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#data-types). +/// section on [data types](https://spec.openapis.org/oas/v3.1.1.html#data-types). public enum JSONTypeFormat: Equatable { case null case boolean(BooleanFormat) @@ -113,7 +113,7 @@ public enum JSONTypeFormat: Equatable { /// adheres to the [RFC3339](https://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) /// specification for a "date-time." /// -/// See "formats" under the OpenAPI [data type](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#data-types) +/// See "formats" under the OpenAPI [data type](https://spec.openapis.org/oas/v3.1.1.html#data-types) /// documentation. public protocol OpenAPIFormat: SwiftTyped, Codable, Equatable, RawRepresentable, Validatable where RawValue == String { static var unspecified: Self { get } diff --git a/Sources/OpenAPIKit/Security/DereferencedSecurityRequirement.swift b/Sources/OpenAPIKit/Security/DereferencedSecurityRequirement.swift index 1645310a9..1894eae61 100644 --- a/Sources/OpenAPIKit/Security/DereferencedSecurityRequirement.swift +++ b/Sources/OpenAPIKit/Security/DereferencedSecurityRequirement.swift @@ -63,7 +63,7 @@ public struct DereferencedSecurityRequirement: Equatable { /// not require a specified scope. For other security scheme types, /// the array MUST be empty. /// - /// See [Security Requirement Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#security-requirement-object) for more. + /// See [Security Requirement Object](https://spec.openapis.org/oas/v3.1.1.html#security-requirement-object) for more. public let requiredScopes: [String] } } diff --git a/Sources/OpenAPIKit/Security/SecurityScheme.swift b/Sources/OpenAPIKit/Security/SecurityScheme.swift index 8e487bba7..3de41d5dc 100644 --- a/Sources/OpenAPIKit/Security/SecurityScheme.swift +++ b/Sources/OpenAPIKit/Security/SecurityScheme.swift @@ -11,7 +11,7 @@ import Foundation extension OpenAPI { /// OpenAPI Spec "Security Scheme Object" /// - /// See [OpenAPI Security Scheme Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#security-scheme-object). + /// See [OpenAPI Security Scheme Object](https://spec.openapis.org/oas/v3.1.1.html#security-scheme-object). public struct SecurityScheme: Equatable, CodableVendorExtendable { public var type: SecurityType public var description: String? diff --git a/Sources/OpenAPIKit/Server.swift b/Sources/OpenAPIKit/Server.swift index d21a1b5e7..b96c1c15c 100644 --- a/Sources/OpenAPIKit/Server.swift +++ b/Sources/OpenAPIKit/Server.swift @@ -11,7 +11,7 @@ import Foundation extension OpenAPI { /// OpenAPI Spec "Server Object" /// - /// See [OpenAPI Server Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#server-object). + /// See [OpenAPI Server Object](https://spec.openapis.org/oas/v3.1.1.html#server-object). /// public struct Server: Equatable, CodableVendorExtendable { /// OpenAPI Server URLs can have variable placeholders in them. @@ -63,7 +63,7 @@ extension OpenAPI { extension OpenAPI.Server { /// OpenAPI Spec "Server Variable Object" /// - /// See [OpenAPI Server Variable Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#server-variable-object). + /// See [OpenAPI Server Variable Object](https://spec.openapis.org/oas/v3.1.1.html#server-variable-object). /// public struct Variable: Equatable, CodableVendorExtendable { public var `enum`: [String]? diff --git a/Sources/OpenAPIKit/Tag.swift b/Sources/OpenAPIKit/Tag.swift index 73ff53a64..8023549aa 100644 --- a/Sources/OpenAPIKit/Tag.swift +++ b/Sources/OpenAPIKit/Tag.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// OpenAPI Spec "Tag Object" /// - /// See [OpenAPI Tag Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#tag-object). + /// See [OpenAPI Tag Object](https://spec.openapis.org/oas/v3.1.1.html#tag-object). public struct Tag: Equatable, CodableVendorExtendable { public let name: String public let description: String? diff --git a/Sources/OpenAPIKit/Validator/Validation+Builtins.swift b/Sources/OpenAPIKit/Validator/Validation+Builtins.swift index 1fff043a4..bc3354790 100644 --- a/Sources/OpenAPIKit/Validator/Validation+Builtins.swift +++ b/Sources/OpenAPIKit/Validator/Validation+Builtins.swift @@ -14,7 +14,7 @@ extension Validation { /// `PathItem.Map`. /// /// The OpenAPI Specification does not require that the document - /// contain any paths for [security reasons](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#security-filtering) + /// contain any paths for [security reasons](https://spec.openapis.org/oas/v3.1.1.html#security-filtering) /// or even because it only contains webhooks, but authors may still /// want to protect against an empty `PathItem.Map` in some cases. /// @@ -30,7 +30,7 @@ extension Validation { /// one operation. /// /// The OpenAPI Specification does not require that path items - /// contain any operations for [security reasons](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#security-filtering) + /// contain any operations for [security reasons](https://spec.openapis.org/oas/v3.1.1.html#security-filtering) /// but documentation that is public in nature might only ever have /// a `PathItem` with no operations in error. /// @@ -183,7 +183,7 @@ extension Validation { /// Validate that the OpenAPI Document's `Tags` all have unique names. /// /// The OpenAPI Specification requires that tag names on the Document - /// [are unique](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#openapi-object). + /// [are unique](https://spec.openapis.org/oas/v3.1.1.html#openapi-object). /// /// - Important: This is included in validation by default. public static var documentTagNamesAreUnique: Validation { @@ -203,7 +203,7 @@ extension Validation { /// A Path Item Parameter's identity is defined as the pairing of its `name` and /// `location`. /// - /// The OpenAPI Specification requires that these parameters [are unique](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#path-item-object). + /// The OpenAPI Specification requires that these parameters [are unique](https://spec.openapis.org/oas/v3.1.1.html#path-item-object). /// /// - Important: This is included in validation by default. /// @@ -221,7 +221,7 @@ extension Validation { /// An Operation's Parameter's identity is defined as the pairing of its `name` and /// `location`. /// - /// The OpenAPI Specification requires that these parameters [are unique](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#operation-object). + /// The OpenAPI Specification requires that these parameters [are unique](https://spec.openapis.org/oas/v3.1.1.html#operation-object). /// /// - Important: This is included in validation by default. /// @@ -235,7 +235,7 @@ extension Validation { /// Validate that all OpenAPI Operation Ids are unique across the whole Document. /// - /// The OpenAPI Specification requires that Operation Ids [are unique](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#operation-object). + /// The OpenAPI Specification requires that Operation Ids [are unique](https://spec.openapis.org/oas/v3.1.1.html#operation-object). /// /// - Important: This validation does not assert that all path references are valid and found in the /// components for the document. It skips over missing path items. diff --git a/Sources/OpenAPIKit/XML.swift b/Sources/OpenAPIKit/XML.swift index 4793be230..b49d30b0b 100644 --- a/Sources/OpenAPIKit/XML.swift +++ b/Sources/OpenAPIKit/XML.swift @@ -11,7 +11,7 @@ import Foundation extension OpenAPI { /// OpenAPI Spec "XML Object" /// - /// See [OpenAPI XML Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#xml-object). + /// See [OpenAPI XML Object](https://spec.openapis.org/oas/v3.1.1.html#xml-object). public struct XML: Equatable { public let name: String? public let namespace: URL? diff --git a/Sources/OpenAPIKit30/Callbacks.swift b/Sources/OpenAPIKit30/Callbacks.swift index 3e0341915..ada29dc5f 100644 --- a/Sources/OpenAPIKit30/Callbacks.swift +++ b/Sources/OpenAPIKit30/Callbacks.swift @@ -12,7 +12,7 @@ extension OpenAPI { /// A map from runtime expressions to path items to be used as /// callbacks for the API. /// - /// See [OpenAPI Callback Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#callback-object). + /// See [OpenAPI Callback Object](https://spec.openapis.org/oas/v3.0.4.html#callback-object). /// public typealias Callbacks = OrderedDictionary diff --git a/Sources/OpenAPIKit30/Components Object/Components.swift b/Sources/OpenAPIKit30/Components Object/Components.swift index 352f4841b..cfd709ba2 100644 --- a/Sources/OpenAPIKit30/Components Object/Components.swift +++ b/Sources/OpenAPIKit30/Components Object/Components.swift @@ -11,7 +11,7 @@ import Foundation extension OpenAPI { /// OpenAPI Spec "Components Object". /// - /// See [OpenAPI Components Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#components-object). + /// See [OpenAPI Components Object](https://spec.openapis.org/oas/v3.0.4.html#components-object). /// /// This is a place to put reusable components to /// be referenced from other parts of the spec. diff --git a/Sources/OpenAPIKit30/Content/Content.swift b/Sources/OpenAPIKit30/Content/Content.swift index f2dc83f2e..30a6ad70d 100644 --- a/Sources/OpenAPIKit30/Content/Content.swift +++ b/Sources/OpenAPIKit30/Content/Content.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// OpenAPI Spec "Media Type Object" /// - /// See [OpenAPI Media Type Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#media-type-object). + /// See [OpenAPI Media Type Object](https://spec.openapis.org/oas/v3.0.4.html#media-type-object). public struct Content: Equatable, CodableVendorExtendable { public var schema: Either, JSONSchema>? public var example: AnyCodable? diff --git a/Sources/OpenAPIKit30/Content/ContentEncoding.swift b/Sources/OpenAPIKit30/Content/ContentEncoding.swift index 6e61195c4..24317003c 100644 --- a/Sources/OpenAPIKit30/Content/ContentEncoding.swift +++ b/Sources/OpenAPIKit30/Content/ContentEncoding.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI.Content { /// OpenAPI Spec "Encoding Object" /// - /// See [OpenAPI Encoding Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#encoding-object). + /// See [OpenAPI Encoding Object](https://spec.openapis.org/oas/v3.0.4.html#encoding-object). public struct Encoding: Equatable { public typealias Style = OpenAPI.Parameter.SchemaContext.Style diff --git a/Sources/OpenAPIKit30/Document/DereferencedDocument.swift b/Sources/OpenAPIKit30/Document/DereferencedDocument.swift index 4a1008f4b..fed984635 100644 --- a/Sources/OpenAPIKit30/Document/DereferencedDocument.swift +++ b/Sources/OpenAPIKit30/Document/DereferencedDocument.swift @@ -100,7 +100,7 @@ extension DereferencedDocument { /// each path, traversed in the order the paths appear in /// the document. /// - /// See [Operation Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#operation-object) in the specifcation. + /// See [Operation Object](https://spec.openapis.org/oas/v3.0.4.html#operation-object) in the specifcation. /// public var allOperationIds: [String] { return paths.values diff --git a/Sources/OpenAPIKit30/Document/Document.swift b/Sources/OpenAPIKit30/Document/Document.swift index 89159e1eb..2223e83bc 100644 --- a/Sources/OpenAPIKit30/Document/Document.swift +++ b/Sources/OpenAPIKit30/Document/Document.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// The root of an OpenAPI 3.0 document. /// - /// See [OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md). + /// See [OpenAPI Specification](https://spec.openapis.org/oas/v3.0.4.html). /// /// An OpenAPI Document can say a _lot_ about the API it describes. /// A read-through of the specification is highly recommended because @@ -135,7 +135,7 @@ extension OpenAPI { public var vendorExtensions: [String: AnyCodable] public init( - openAPIVersion: Version = .v3_0_0, + openAPIVersion: Version = .v3_0_4, info: Info, servers: [Server], paths: PathItem.Map, @@ -213,7 +213,7 @@ extension OpenAPI.Document { /// each path, traversed in the order the paths appear in /// the document. /// - /// See [Operation Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#operation-object) in the specifcation. + /// See [Operation Object](https://spec.openapis.org/oas/v3.0.4.html#operation-object) in the specifcation. /// public var allOperationIds: [String] { return paths.values @@ -398,7 +398,7 @@ extension OpenAPI { /// Multiple entries in this dictionary indicate all schemes named are /// required on the same request. /// - /// See [OpenAPI Security Requirement Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#security-requirement-object). + /// See [OpenAPI Security Requirement Object](https://spec.openapis.org/oas/v3.0.4.html#security-requirement-object). public typealias SecurityRequirement = [JSONReference: [String]] } diff --git a/Sources/OpenAPIKit30/Document/DocumentInfo.swift b/Sources/OpenAPIKit30/Document/DocumentInfo.swift index 7eda90a3c..035dda515 100644 --- a/Sources/OpenAPIKit30/Document/DocumentInfo.swift +++ b/Sources/OpenAPIKit30/Document/DocumentInfo.swift @@ -11,7 +11,7 @@ import Foundation extension OpenAPI.Document { /// OpenAPI Spec "Info Object" /// - /// See [OpenAPI Info Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#info-object). + /// See [OpenAPI Info Object](https://spec.openapis.org/oas/v3.0.4.html#info-object). public struct Info: Equatable, CodableVendorExtendable { public let title: String public let description: String? @@ -47,7 +47,7 @@ extension OpenAPI.Document { /// OpenAPI Spec "Contact Object" /// - /// See [OpenAPI Contact Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#contact-object). + /// See [OpenAPI Contact Object](https://spec.openapis.org/oas/v3.0.4.html#contact-object). public struct Contact: Equatable, CodableVendorExtendable { public let name: String? public let url: URL? @@ -75,7 +75,7 @@ extension OpenAPI.Document { /// OpenAPI Spec "License Object" /// - /// See [OpenAPI License Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#license-object). + /// See [OpenAPI License Object](https://spec.openapis.org/oas/v3.0.4.html#license-object). public struct License: Equatable, CodableVendorExtendable { public let name: String public let url: URL? diff --git a/Sources/OpenAPIKit30/Example.swift b/Sources/OpenAPIKit30/Example.swift index d28424238..8012c39cf 100644 --- a/Sources/OpenAPIKit30/Example.swift +++ b/Sources/OpenAPIKit30/Example.swift @@ -11,7 +11,7 @@ import Foundation extension OpenAPI { /// OpenAPI Spec "Example Object" /// - /// See [OpenAPI Example Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#example-object). + /// See [OpenAPI Example Object](https://spec.openapis.org/oas/v3.0.4.html#example-object). public struct Example: Equatable, CodableVendorExtendable { public let summary: String? public let description: String? diff --git a/Sources/OpenAPIKit30/ExternalDocumentation.swift b/Sources/OpenAPIKit30/ExternalDocumentation.swift index 84a90a273..b1d1c4b1a 100644 --- a/Sources/OpenAPIKit30/ExternalDocumentation.swift +++ b/Sources/OpenAPIKit30/ExternalDocumentation.swift @@ -11,7 +11,7 @@ import Foundation extension OpenAPI { /// OpenAPI Spec "External Documentation Object" /// - /// See [OpenAPI External Documentation Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#external-documentation-object). + /// See [OpenAPI External Documentation Object](https://spec.openapis.org/oas/v3.0.4.html#external-documentation-object). public struct ExternalDocumentation: Equatable, CodableVendorExtendable { public var description: String? public var url: URL diff --git a/Sources/OpenAPIKit30/Header/Header.swift b/Sources/OpenAPIKit30/Header/Header.swift index 718ed935b..024306f6a 100644 --- a/Sources/OpenAPIKit30/Header/Header.swift +++ b/Sources/OpenAPIKit30/Header/Header.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// OpenAPI Spec "Header Object" /// - /// See [OpenAPI Header Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#header-object). + /// See [OpenAPI Header Object](https://spec.openapis.org/oas/v3.0.4.html#header-object). public struct Header: Equatable, CodableVendorExtendable { public typealias SchemaContext = Parameter.SchemaContext diff --git a/Sources/OpenAPIKit30/Link.swift b/Sources/OpenAPIKit30/Link.swift index c416e97b7..0cfe551c1 100644 --- a/Sources/OpenAPIKit30/Link.swift +++ b/Sources/OpenAPIKit30/Link.swift @@ -15,7 +15,7 @@ import Foundation extension OpenAPI { /// OpenAPI Spec "Link Object" /// - /// See [OpenAPI Link Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#link-object). + /// See [OpenAPI Link Object](https://spec.openapis.org/oas/v3.1.1.html#link-object). public struct Link: Equatable, CodableVendorExtendable { /// The **OpenAPI**` `operationRef` or `operationId` field, depending on whether /// a `URL` of a remote or local Operation Object or a `operationId` (String) of an @@ -24,7 +24,7 @@ extension OpenAPI { /// A map from parameter names to either runtime expressions that evaluate to values or /// constant values (`AnyCodable`). /// - /// See the docuemntation for the [OpenAPI Link Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#link-object) for more details. + /// See the docuemntation for the [OpenAPI Link Object](https://spec.openapis.org/oas/v3.1.1.html#link-object) for more details. /// /// Empty dictionaries will be omitted from encoding. public var parameters: OrderedDictionary> diff --git a/Sources/OpenAPIKit30/Operation/Operation.swift b/Sources/OpenAPIKit30/Operation/Operation.swift index 992f0b3f5..59280467e 100644 --- a/Sources/OpenAPIKit30/Operation/Operation.swift +++ b/Sources/OpenAPIKit30/Operation/Operation.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// OpenAPI Spec "Operation Object" /// - /// See [OpenAPI Operation Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#operation-object). + /// See [OpenAPI Operation Object](https://spec.openapis.org/oas/v3.0.4.html#operation-object). public struct Operation: Equatable, CodableVendorExtendable { public var tags: [String]? public var summary: String? diff --git a/Sources/OpenAPIKit30/Parameter/Parameter.swift b/Sources/OpenAPIKit30/Parameter/Parameter.swift index 045cdb13e..f1663c3b4 100644 --- a/Sources/OpenAPIKit30/Parameter/Parameter.swift +++ b/Sources/OpenAPIKit30/Parameter/Parameter.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// OpenAPI Spec "Parameter Object" /// - /// See [OpenAPI Parameter Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#parameter-object). + /// See [OpenAPI Parameter Object](https://spec.openapis.org/oas/v3.0.4.html#parameter-object). public struct Parameter: Equatable, CodableVendorExtendable { public var name: String @@ -157,7 +157,7 @@ extension OpenAPI.Parameter { /// containing exactly the things that differentiate /// one parameter from another, per the specification. /// - /// See [Parameter Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#parameter-object). + /// See [Parameter Object](https://spec.openapis.org/oas/v3.0.4.html#parameter-object). internal struct ParameterIdentity: Hashable { let name: String let location: Context.Location diff --git a/Sources/OpenAPIKit30/Parameter/ParameterContext.swift b/Sources/OpenAPIKit30/Parameter/ParameterContext.swift index abb134563..112a08273 100644 --- a/Sources/OpenAPIKit30/Parameter/ParameterContext.swift +++ b/Sources/OpenAPIKit30/Parameter/ParameterContext.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI.Parameter { /// OpenAPI Spec "Parameter Object" location-specific configuration. /// - /// See [OpenAPI Parameter Locations](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#parameter-locations). + /// See [OpenAPI Parameter Locations](https://spec.openapis.org/oas/v3.0.4.html#parameter-locations). /// /// Query, Header, and Cookie parameters are /// all optional by default unless you pass diff --git a/Sources/OpenAPIKit30/Parameter/ParameterSchemaContext.swift b/Sources/OpenAPIKit30/Parameter/ParameterSchemaContext.swift index cab0963e8..3b4b2d600 100644 --- a/Sources/OpenAPIKit30/Parameter/ParameterSchemaContext.swift +++ b/Sources/OpenAPIKit30/Parameter/ParameterSchemaContext.swift @@ -10,8 +10,8 @@ import OpenAPIKitCore extension OpenAPI.Parameter { /// OpenAPI Spec "Parameter Object" schema and style configuration. /// - /// See [OpenAPI Parameter Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#parameter-object) - /// and [OpenAPI Style Values](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#style-values). + /// See [OpenAPI Parameter Object](https://spec.openapis.org/oas/v3.0.4.html#parameter-object) + /// and [OpenAPI Style Values](https://spec.openapis.org/oas/v3.0.4.html#style-values). public struct SchemaContext: Equatable { public var style: Style public var explode: Bool @@ -133,7 +133,7 @@ extension OpenAPI.Parameter.SchemaContext.Style { /// per the OpenAPI Specification. /// /// See the `style` fixed field under - /// [OpenAPI Parameter Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#parameter-object). + /// [OpenAPI Parameter Object](https://spec.openapis.org/oas/v3.0.4.html#parameter-object). public static func `default`(for location: OpenAPI.Parameter.Context) -> Self { switch location { case .query: diff --git a/Sources/OpenAPIKit30/Path Item/PathItem.swift b/Sources/OpenAPIKit30/Path Item/PathItem.swift index 5829c6534..f37b1a1cb 100644 --- a/Sources/OpenAPIKit30/Path Item/PathItem.swift +++ b/Sources/OpenAPIKit30/Path Item/PathItem.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// OpenAPI Spec "Path Item Object" /// - /// See [OpenAPI Path Item Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#path-item-object). + /// See [OpenAPI Path Item Object](https://spec.openapis.org/oas/v3.0.4.html#path-item-object). /// /// In addition to parameters that apply to all endpoints under the current path, /// this type offers access to each possible endpoint operation under properties diff --git a/Sources/OpenAPIKit30/Request/Request.swift b/Sources/OpenAPIKit30/Request/Request.swift index 0692215a4..847f386f3 100644 --- a/Sources/OpenAPIKit30/Request/Request.swift +++ b/Sources/OpenAPIKit30/Request/Request.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// OpenAPI Spec "Request Body Object" /// - /// See [OpenAPI Request Body Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#request-body-object). + /// See [OpenAPI Request Body Object](https://spec.openapis.org/oas/v3.0.4.html#request-body-object). public struct Request: Equatable, CodableVendorExtendable { public var description: String? public var content: Content.Map diff --git a/Sources/OpenAPIKit30/Response/Response.swift b/Sources/OpenAPIKit30/Response/Response.swift index 56e057ddc..c13eed62e 100644 --- a/Sources/OpenAPIKit30/Response/Response.swift +++ b/Sources/OpenAPIKit30/Response/Response.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// OpenAPI Spec "Response Object" /// - /// See [OpenAPI Response Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#response-object). + /// See [OpenAPI Response Object](https://spec.openapis.org/oas/v3.0.4.html#response-object). public struct Response: Equatable, CodableVendorExtendable { public var description: String public var headers: Header.Map? diff --git a/Sources/OpenAPIKit30/RuntimeExpression.swift b/Sources/OpenAPIKit30/RuntimeExpression.swift index 960e01ffc..0736f1b3e 100644 --- a/Sources/OpenAPIKit30/RuntimeExpression.swift +++ b/Sources/OpenAPIKit30/RuntimeExpression.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// OpenAPI Spec "Runtime Expression" /// - /// See [OpenAPI Runtime Expression[(https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#runtime-expressions). + /// See [OpenAPI Runtime Expression[(https://spec.openapis.org/oas/v3.0.4.html#runtime-expressions). /// public enum RuntimeExpression: RawRepresentable, Equatable { case url diff --git a/Sources/OpenAPIKit30/Schema Object/JSONSchema.swift b/Sources/OpenAPIKit30/Schema Object/JSONSchema.swift index ff3fa8166..57d2c9319 100644 --- a/Sources/OpenAPIKit30/Schema Object/JSONSchema.swift +++ b/Sources/OpenAPIKit30/Schema Object/JSONSchema.swift @@ -9,7 +9,7 @@ import OpenAPIKitCore /// OpenAPI "Schema Object" /// -/// See [OpenAPI Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#schema-object). +/// See [OpenAPI Schema Object](https://spec.openapis.org/oas/v3.0.4.html#schema-object). public struct JSONSchema: JSONSchemaContext, HasWarnings, VendorExtendable { public let warnings: [OpenAPI.Warning] public let value: Schema diff --git a/Sources/OpenAPIKit30/Schema Object/JSONSchemaContext.swift b/Sources/OpenAPIKit30/Schema Object/JSONSchemaContext.swift index 07a12b1f9..8d2ee88b5 100644 --- a/Sources/OpenAPIKit30/Schema Object/JSONSchemaContext.swift +++ b/Sources/OpenAPIKit30/Schema Object/JSONSchemaContext.swift @@ -60,7 +60,7 @@ public protocol JSONSchemaContext { /// be placed on a parent object (one level up from an `allOf`, `anyOf`, /// or `oneOf`) as a way to reduce redundancy. /// - /// See [OpenAPI Discriminator Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#discriminator-object). + /// See [OpenAPI Discriminator Object](https://spec.openapis.org/oas/v3.0.4.html#discriminator-object). var discriminator: OpenAPI.Discriminator? { get } /// Get the external docs, if specified. If unspecified, returns `nil`. diff --git a/Sources/OpenAPIKit30/Schema Object/TypesAndFormats.swift b/Sources/OpenAPIKit30/Schema Object/TypesAndFormats.swift index 1077135ac..464da411a 100644 --- a/Sources/OpenAPIKit30/Schema Object/TypesAndFormats.swift +++ b/Sources/OpenAPIKit30/Schema Object/TypesAndFormats.swift @@ -18,7 +18,7 @@ public protocol SwiftTyped { /// The raw types supported by JSON Schema. /// -/// These are the OpenAPI [data types](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#data-types) +/// These are the OpenAPI [data types](https://spec.openapis.org/oas/v3.0.4.html#data-types) /// and additionally the `object` and `array` /// "compound" data types. /// - boolean @@ -53,7 +53,7 @@ public enum JSONType: String, Codable { /// /// You can also find information on types and /// formats in the OpenAPI Specification's -/// section on [data types](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#data-types). +/// section on [data types](https://spec.openapis.org/oas/v3.0.4.html#data-types). public enum JSONTypeFormat: Equatable { case boolean(BooleanFormat) case object(ObjectFormat) @@ -107,7 +107,7 @@ public enum JSONTypeFormat: Equatable { /// adheres to the [RFC3339](https://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) /// specification for a "date-time." /// -/// See "formats" under the OpenAPI [data type](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#data-types) +/// See "formats" under the OpenAPI [data type](https://spec.openapis.org/oas/v3.0.4.html#data-types) /// documentation. public protocol OpenAPIFormat: SwiftTyped, Codable, Equatable, RawRepresentable, Validatable where RawValue == String { static var unspecified: Self { get } diff --git a/Sources/OpenAPIKit30/Security/DereferencedSecurityRequirement.swift b/Sources/OpenAPIKit30/Security/DereferencedSecurityRequirement.swift index 7d46b2fe6..20fd0ead3 100644 --- a/Sources/OpenAPIKit30/Security/DereferencedSecurityRequirement.swift +++ b/Sources/OpenAPIKit30/Security/DereferencedSecurityRequirement.swift @@ -63,7 +63,7 @@ public struct DereferencedSecurityRequirement: Equatable { /// not require a specified scope. For other security scheme types, /// the array MUST be empty. /// - /// See [Security Requirement Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#security-requirement-object) for more. + /// See [Security Requirement Object](https://spec.openapis.org/oas/v3.0.4.html#security-requirement-object) for more. public let requiredScopes: [String] } } diff --git a/Sources/OpenAPIKit30/Security/SecurityScheme.swift b/Sources/OpenAPIKit30/Security/SecurityScheme.swift index 22171d097..d8fb46413 100644 --- a/Sources/OpenAPIKit30/Security/SecurityScheme.swift +++ b/Sources/OpenAPIKit30/Security/SecurityScheme.swift @@ -11,7 +11,7 @@ import Foundation extension OpenAPI { /// OpenAPI Spec "Security Scheme Object" /// - /// See [OpenAPI Security Scheme Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#security-scheme-object). + /// See [OpenAPI Security Scheme Object](https://spec.openapis.org/oas/v3.0.4.html#security-scheme-object). public struct SecurityScheme: Equatable, CodableVendorExtendable { public var type: SecurityType public var description: String? diff --git a/Sources/OpenAPIKit30/Server.swift b/Sources/OpenAPIKit30/Server.swift index d44a280bf..71404a904 100644 --- a/Sources/OpenAPIKit30/Server.swift +++ b/Sources/OpenAPIKit30/Server.swift @@ -11,7 +11,7 @@ import Foundation extension OpenAPI { /// OpenAPI Spec "Server Object" /// - /// See [OpenAPI Server Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#server-object). + /// See [OpenAPI Server Object](https://spec.openapis.org/oas/v3.0.4.html#server-object). /// public struct Server: Equatable, CodableVendorExtendable { /// OpenAPI Server URLs can have variable placeholders in them. @@ -63,7 +63,7 @@ extension OpenAPI { extension OpenAPI.Server { /// OpenAPI Spec "Server Variable Object" /// - /// See [OpenAPI Server Variable Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#server-variable-object). + /// See [OpenAPI Server Variable Object](https://spec.openapis.org/oas/v3.0.4.html#server-variable-object). /// public struct Variable: Equatable, CodableVendorExtendable { public var `enum`: [String] diff --git a/Sources/OpenAPIKit30/Tag.swift b/Sources/OpenAPIKit30/Tag.swift index 5669c977c..d88450810 100644 --- a/Sources/OpenAPIKit30/Tag.swift +++ b/Sources/OpenAPIKit30/Tag.swift @@ -10,7 +10,7 @@ import OpenAPIKitCore extension OpenAPI { /// OpenAPI Spec "Tag Object" /// - /// See [OpenAPI Tag Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#tag-object). + /// See [OpenAPI Tag Object](https://spec.openapis.org/oas/v3.0.4.html#tag-object). public struct Tag: Equatable, CodableVendorExtendable { public let name: String public let description: String? diff --git a/Sources/OpenAPIKit30/Validator/Validation+Builtins.swift b/Sources/OpenAPIKit30/Validator/Validation+Builtins.swift index 414d26d24..67151ae52 100644 --- a/Sources/OpenAPIKit30/Validator/Validation+Builtins.swift +++ b/Sources/OpenAPIKit30/Validator/Validation+Builtins.swift @@ -14,7 +14,7 @@ extension Validation { /// `PathItem.Map`. /// /// The OpenAPI Specifcation does not require that the document - /// contain any paths for [security reasons](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#security-filtering) + /// contain any paths for [security reasons](https://spec.openapis.org/oas/v3.0.4.html#security-filtering) /// but documentation that is public in nature might only ever have /// an empty `PathItem.Map` in error. /// @@ -30,7 +30,7 @@ extension Validation { /// one operation. /// /// The OpenAPI Specifcation does not require that path items - /// contain any operations for [security reasons](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#security-filtering) + /// contain any operations for [security reasons](https://spec.openapis.org/oas/v3.0.4.html#security-filtering) /// but documentation that is public in nature might only ever have /// a `PathItem` with no operations in error. /// @@ -160,7 +160,7 @@ extension Validation { /// one response. /// /// The OpenAPI Specifcation requires that Responses Objects - /// contain [at least one response](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#responses-object). + /// contain [at least one response](https://spec.openapis.org/oas/v3.0.4.html#responses-object). /// The specification recommends that if there is only one response then /// it be a successful response. /// @@ -178,7 +178,7 @@ extension Validation { /// Validate that the OpenAPI Document's `Tags` all have unique names. /// /// The OpenAPI Specifcation requires that tag names on the Document - /// [are unique](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#openapi-object). + /// [are unique](https://spec.openapis.org/oas/v3.0.4.html#openapi-object). /// /// - Important: This is included in validation by default. public static var documentTagNamesAreUnique: Validation { @@ -198,7 +198,7 @@ extension Validation { /// A Path Item Parameter's identity is defined as the pairing of its `name` and /// `location`. /// - /// The OpenAPI Specification requires that these parameters [are unique](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#path-item-object). + /// The OpenAPI Specification requires that these parameters [are unique](https://spec.openapis.org/oas/v3.0.4.html#path-item-object). /// /// - Important: This is included in validation by default. /// @@ -216,7 +216,7 @@ extension Validation { /// An Operation's Parameter's identity is defined as the pairing of its `name` and /// `location`. /// - /// The OpenAPI Specification requires that these parameters [are unique](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#operation-object). + /// The OpenAPI Specification requires that these parameters [are unique](https://spec.openapis.org/oas/v3.0.4.html#operation-object). /// /// - Important: This is included in validation by default. /// @@ -230,7 +230,7 @@ extension Validation { /// Validate that all OpenAPI Operation Ids are unique across the whole Document. /// - /// The OpenAPI Specification requires that Operation Ids [are unique](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#operation-object). + /// The OpenAPI Specification requires that Operation Ids [are unique](https://spec.openapis.org/oas/v3.0.4.html#operation-object). /// /// - Important: This is included in validation by default. /// diff --git a/Sources/OpenAPIKit30/XML.swift b/Sources/OpenAPIKit30/XML.swift index 6ee059b49..f7488c309 100644 --- a/Sources/OpenAPIKit30/XML.swift +++ b/Sources/OpenAPIKit30/XML.swift @@ -11,7 +11,7 @@ import Foundation extension OpenAPI { /// OpenAPI Spec "XML Object" /// - /// See [OpenAPI XML Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#xml-object). + /// See [OpenAPI XML Object](https://spec.openapis.org/oas/v3.0.4.html#xml-object). public struct XML: Equatable { public let name: String? public let namespace: URL? diff --git a/Sources/OpenAPIKitCompat/Compat30To31.swift b/Sources/OpenAPIKitCompat/Compat30To31.swift index e7358a667..88192c352 100644 --- a/Sources/OpenAPIKitCompat/Compat30To31.swift +++ b/Sources/OpenAPIKitCompat/Compat30To31.swift @@ -20,7 +20,7 @@ private protocol To31 { } extension OpenAPIKit30.OpenAPI.Document { - fileprivate func to31(version: OpenAPIKit.OpenAPI.Document.Version = .v3_1_0) -> OpenAPIKit.OpenAPI.Document { + fileprivate func to31(version: OpenAPIKit.OpenAPI.Document.Version = .v3_1_1) -> OpenAPIKit.OpenAPI.Document { OpenAPIKit.OpenAPI.Document( openAPIVersion: version, info: info.to31(), diff --git a/Sources/OpenAPIKitCore/Shared/CallbackURL.swift b/Sources/OpenAPIKitCore/Shared/CallbackURL.swift index 5e2d6295d..2da7e90ff 100644 --- a/Sources/OpenAPIKitCore/Shared/CallbackURL.swift +++ b/Sources/OpenAPIKitCore/Shared/CallbackURL.swift @@ -11,7 +11,7 @@ extension Shared { /// A URL template where the placeholders are OpenAPI **Runtime Expressions** instead /// of named variables. /// - /// See [OpenAPI Callback Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#callback-object) and [OpenAPI Runtime Expression](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#runtime-expressions) for more. + /// See [OpenAPI Callback Object](https://spec.openapis.org/oas/v3.0.4.html#callback-object) and [OpenAPI Runtime Expression](https://spec.openapis.org/oas/v3.0.4.html#runtime-expressions) for more. /// public struct CallbackURL: Hashable, RawRepresentable { public let template: URLTemplate diff --git a/Sources/OpenAPIKitCore/Shared/Discriminator.swift b/Sources/OpenAPIKitCore/Shared/Discriminator.swift index 78af32ca3..e2cfe5949 100644 --- a/Sources/OpenAPIKitCore/Shared/Discriminator.swift +++ b/Sources/OpenAPIKitCore/Shared/Discriminator.swift @@ -8,7 +8,7 @@ extension Shared { /// OpenAPI Spec "Disciminator Object" /// - /// See [OpenAPI Discriminator Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#discriminator-object). + /// See [OpenAPI Discriminator Object](https://spec.openapis.org/oas/v3.0.4.html#discriminator-object). public struct Discriminator: Equatable { public let propertyName: String public let mapping: OrderedDictionary? diff --git a/Sources/OpenAPIKitCore/Shared/HttpMethod.swift b/Sources/OpenAPIKitCore/Shared/HttpMethod.swift index 316a15ddd..b5062bcbc 100644 --- a/Sources/OpenAPIKitCore/Shared/HttpMethod.swift +++ b/Sources/OpenAPIKitCore/Shared/HttpMethod.swift @@ -9,7 +9,7 @@ extension Shared { /// Represents the HTTP methods supported by the /// OpenAPI Specification. /// - /// See [OpenAPI Path Item Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#path-item-object) because the supported + /// See [OpenAPI Path Item Object](https://spec.openapis.org/oas/v3.0.4.html#path-item-object) because the supported /// HTTP methods are enumerated as properties on that /// object. public enum HttpMethod: String, CaseIterable { diff --git a/Sources/OpenAPIKitCore/Shared/OAuthFlows.swift b/Sources/OpenAPIKitCore/Shared/OAuthFlows.swift index 1a8253abe..bb977421d 100644 --- a/Sources/OpenAPIKitCore/Shared/OAuthFlows.swift +++ b/Sources/OpenAPIKitCore/Shared/OAuthFlows.swift @@ -10,7 +10,7 @@ import Foundation extension Shared { /// OpenAPI Spec "Oauth Flows Object" /// - /// See [OpenAPI Oauth Flows Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#oauth-flows-object). + /// See [OpenAPI Oauth Flows Object](https://spec.openapis.org/oas/v3.0.4.html#oauth-flows-object). public struct OAuthFlows: Equatable { public let implicit: Implicit? public let password: Password? diff --git a/Sources/OpenAPIKitCore/Shared/Path.swift b/Sources/OpenAPIKitCore/Shared/Path.swift index 4389173e0..0a505b114 100644 --- a/Sources/OpenAPIKitCore/Shared/Path.swift +++ b/Sources/OpenAPIKitCore/Shared/Path.swift @@ -8,8 +8,8 @@ extension Shared { /// OpenAPI Spec "Paths Object" path field pattern support. /// - /// See [OpenAPI Paths Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#paths-object) - /// and [OpenAPI Patterned Fields](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#patterned-fields). + /// See [OpenAPI Paths Object](https://spec.openapis.org/oas/v3.0.4.html#paths-object) + /// and [OpenAPI Patterned Fields](https://spec.openapis.org/oas/v3.0.4.html#patterned-fields). public struct Path: RawRepresentable, Equatable, Hashable { public let components: [String] public let trailingSlash: Bool diff --git a/Sources/OpenAPIKitCore/Shared/ResponseStatusCode.swift b/Sources/OpenAPIKitCore/Shared/ResponseStatusCode.swift index 9c69aeb9e..875097ab2 100644 --- a/Sources/OpenAPIKitCore/Shared/ResponseStatusCode.swift +++ b/Sources/OpenAPIKitCore/Shared/ResponseStatusCode.swift @@ -8,7 +8,7 @@ extension Shared { /// An HTTP Status code or status code range. /// - /// OpenAPI supports one of the following as a key in the [Responses Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#responses-object): + /// OpenAPI supports one of the following as a key in the [Responses Object](https://spec.openapis.org/oas/v3.0.4.html#responses-object): /// - A `default` entry. /// - A specific status code. /// - A status code range. diff --git a/Tests/OpenAPIKit30Tests/Document/DocumentTests.swift b/Tests/OpenAPIKit30Tests/Document/DocumentTests.swift index 0d6d7b23d..ccf4d2c55 100644 --- a/Tests/OpenAPIKit30Tests/Document/DocumentTests.swift +++ b/Tests/OpenAPIKit30Tests/Document/DocumentTests.swift @@ -364,7 +364,7 @@ final class DocumentTests: XCTestCase { let docData = """ { - "openapi": "3.0.0", + "openapi": "3.0.4", "info": { "title": "test", "version": "1.0" @@ -409,7 +409,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.0.0", + "openapi" : "3.0.4", "paths" : { } @@ -426,7 +426,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.0.0", + "openapi" : "3.0.4", "paths" : { } @@ -517,7 +517,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.0.0", + "openapi" : "3.0.4", "paths" : { }, @@ -539,7 +539,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.0.0", + "openapi" : "3.0.4", "paths" : { }, @@ -580,7 +580,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.0.0", + "openapi" : "3.0.4", "paths" : { "\\/test" : { "summary" : "hi" @@ -599,7 +599,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.0.0", + "openapi" : "3.0.4", "paths" : { "\\/test" : { "summary" : "hi" @@ -649,7 +649,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.0.0", + "openapi" : "3.0.4", "paths" : { }, @@ -682,7 +682,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.0.0", + "openapi" : "3.0.4", "paths" : { }, @@ -729,7 +729,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.0.0", + "openapi" : "3.0.4", "paths" : { }, @@ -751,7 +751,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.0.0", + "openapi" : "3.0.4", "paths" : { }, @@ -797,7 +797,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.0.0", + "openapi" : "3.0.4", "paths" : { } @@ -817,7 +817,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.0.0", + "openapi" : "3.0.4", "paths" : { } @@ -859,7 +859,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.0.0", + "openapi" : "3.0.4", "paths" : { }, @@ -883,7 +883,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.0.0", + "openapi" : "3.0.4", "paths" : { }, diff --git a/Tests/OpenAPIKitErrorReportingTests/SchemaErrorTests.swift b/Tests/OpenAPIKitErrorReportingTests/SchemaErrorTests.swift index 99074e0dc..cc344e148 100644 --- a/Tests/OpenAPIKitErrorReportingTests/SchemaErrorTests.swift +++ b/Tests/OpenAPIKitErrorReportingTests/SchemaErrorTests.swift @@ -76,7 +76,7 @@ final class SchemaErrorTests: XCTestCase { XCTAssertEqual(openAPIError.localizedDescription, """ - Inconsistency encountered when parsing `OpenAPI Schema`: Found 'nullable' property. This property is not supported by OpenAPI v3.1.0. OpenAPIKit has translated it into 'type: ["null", ...]'.. at path: .paths['/hello/world'].get.responses.200.content['application/json'].schema + Inconsistency encountered when parsing `OpenAPI Schema`: Found 'nullable' property. This property is not supported by OpenAPI v3.1.x. OpenAPIKit has translated it into 'type: ["null", ...]'.. at path: .paths['/hello/world'].get.responses.200.content['application/json'].schema """) XCTAssertEqual(openAPIError.codingPath.map { $0.stringValue }, [ "paths", diff --git a/Tests/OpenAPIKitTests/Document/DocumentTests.swift b/Tests/OpenAPIKitTests/Document/DocumentTests.swift index c68703e8d..f66e4ecb0 100644 --- a/Tests/OpenAPIKitTests/Document/DocumentTests.swift +++ b/Tests/OpenAPIKitTests/Document/DocumentTests.swift @@ -356,7 +356,7 @@ final class DocumentTests: XCTestCase { let docData = """ { - "openapi": "3.1.0", + "openapi": "3.1.1", "info": { "title": "test", "version": "1.0" @@ -401,7 +401,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.0" + "openapi" : "3.1.1" } """ ) @@ -415,7 +415,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.0", + "openapi" : "3.1.1", "paths" : { } @@ -503,7 +503,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.0", + "openapi" : "3.1.1", "servers" : [ { "url" : "http:\\/\\/google.com" @@ -522,7 +522,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.0", + "openapi" : "3.1.1", "paths" : { }, @@ -563,7 +563,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.0", + "openapi" : "3.1.1", "paths" : { "\\/test" : { "summary" : "hi" @@ -582,7 +582,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.0", + "openapi" : "3.1.1", "paths" : { "\\/test" : { "summary" : "hi" @@ -632,7 +632,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.0", + "openapi" : "3.1.1", "security" : [ { "security" : [ @@ -662,7 +662,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.0", + "openapi" : "3.1.1", "paths" : { }, @@ -709,7 +709,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.0", + "openapi" : "3.1.1", "tags" : [ { "name" : "hi" @@ -728,7 +728,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.0", + "openapi" : "3.1.1", "paths" : { }, @@ -774,7 +774,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.0" + "openapi" : "3.1.1" } """ ) @@ -791,7 +791,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.0", + "openapi" : "3.1.1", "paths" : { } @@ -833,7 +833,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.0", + "openapi" : "3.1.1", "x-specialFeature" : [ "hello", "world" @@ -854,7 +854,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.0", + "openapi" : "3.1.1", "paths" : { }, @@ -894,7 +894,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.0", + "openapi" : "3.1.1", "paths" : { }, @@ -946,7 +946,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.0", + "openapi" : "3.1.1", "webhooks" : { "webhook-test" : { "delete" : { @@ -1014,7 +1014,7 @@ extension DocumentTests { "title": "API", "version": "1.0" }, - "openapi": "3.1.0", + "openapi": "3.1.1", "paths": { }, "webhooks": { @@ -1084,7 +1084,7 @@ extension DocumentTests { "title" : "API", "version" : "1.0" }, - "openapi" : "3.1.0", + "openapi" : "3.1.1", "webhooks" : { "webhook-test" : { "delete" : { @@ -1130,7 +1130,7 @@ extension DocumentTests { "title": "API", "version": "1.0" }, - "openapi": "3.1.0", + "openapi": "3.1.1", "webhooks": { "webhook-test": { "delete": { diff --git a/documentation/specification_coverage.md b/documentation/specification_coverage.md index 097596a5e..e390c7f65 100644 --- a/documentation/specification_coverage.md +++ b/documentation/specification_coverage.md @@ -1,6 +1,6 @@ ## Specification Coverage -The list below is organized like the [OpenAPI Specification 3.1.x](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md) reference. Types that have OpenAPIKit representations are checked off. Types that have different names in OpenAPIKit than they do in the specification have their OpenAPIKit names in parenthesis. +The list below is organized like the [OpenAPI Specification 3.1.x](https://spec.openapis.org/oas/v3.1.1.html) reference. Types that have OpenAPIKit representations are checked off. Types that have different names in OpenAPIKit than they do in the specification have their OpenAPIKit names in parenthesis. For more information on the OpenAPIKit types, see the [full type documentation](https://github.com/mattpolzin/OpenAPIKit/wiki).