You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
# OpenAPIKit <!-- omit in toc -->
6
6
7
-
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.
7
+
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.
8
8
9
9
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.
10
10
@@ -149,7 +149,7 @@ let newDoc: OpenAPIKit.OpenAPI.Document
// ^ Here we simply fall-back to 3.1.x if loading as 3.0.x failed. You could do a more
155
155
// 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
165
165
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.
166
166
167
167
### OpenAPI Document structure
168
-
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.
168
+
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.
169
169
170
170
#### Document Root
171
171
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(
289
289
```
290
290
291
291
#### Specification Extensions
292
-
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.
292
+
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.
293
293
294
294
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.
Copy file name to clipboardexpand all lines: Sources/OpenAPIKit/Document/Document.swift
+5-5
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ import OpenAPIKitCore
10
10
extensionOpenAPI{
11
11
/// The root of an OpenAPI 3.1 document.
12
12
///
13
-
/// See [OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md).
13
+
/// See [OpenAPI Specification](https://spec.openapis.org/oas/v3.1.1.html).
14
14
///
15
15
/// An OpenAPI Document can say a _lot_ about the API it describes.
16
16
/// A read-through of the specification is highly recommended because
@@ -100,7 +100,7 @@ extension OpenAPI {
100
100
///
101
101
/// 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.
102
102
/// 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
103
-
/// See [OpenAPI Webhook Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#fixed-fields)
103
+
/// See [OpenAPI Webhook Object](https://spec.openapis.org/oas/v3.1.1.html#fixed-fields)
/// The **OpenAPI**` `operationRef` or `operationId` field, depending on whether
21
21
/// a `URL` of a remote or local Operation Object or a `operationId` (String) of an
@@ -24,7 +24,7 @@ extension OpenAPI {
24
24
/// A map from parameter names to either runtime expressions that evaluate to values or
25
25
/// constant values (`AnyCodable`).
26
26
///
27
-
/// 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.
27
+
/// See the docuemntation for the [OpenAPI Link Object](https://spec.openapis.org/oas/v3.1.1.html#link-object) for more details.
28
28
///
29
29
/// Empty dictionaries will be omitted from encoding.
0 commit comments