-
Notifications
You must be signed in to change notification settings - Fork 38
Home
mattpolzin edited this page Dec 25, 2020
·
21 revisions
-
AnyCodable:
A type-erased
Codable
value. - OpenAPI.CallbackURL: A URL template where the placeholders are OpenAPI Runtime Expressions instead of named variables.
- OpenAPI.Components.ReferenceError
- OpenAPI.Components: OpenAPI Spec "Components Object".
- OpenAPI.ComponentKey: A key for one of the component dictionaries.
- OpenAPI.Content: OpenAPI Spec "Media Type Object"
- OpenAPI.Content.Encoding: OpenAPI Spec "Encoding Object"
- OpenAPI.ContentType
-
DereferencedContent:
An
OpenAPI.Content
type that guarantees itsschema
,encoding
, andexamples
are inlined instead of referenced. -
DereferencedContentEncoding:
An
OpenAPI.Content.Encoding
type that guarantees itsheaders
are inlined instead of referenced - OpenAPI.Discriminator: OpenAPI Spec "Disciminator Object"
-
DereferencedDocument:
An
OpenAPI.Document
type that guarantees itspaths
andsecurity
are inlined instead of referenced. You create aDereferencedDocument
by calling thelocallyDereferenced()
method on anOpenAPI.Document
. - DereferencedDocument.Route: The pairing of a path and the path item that describes the route at that path.
- OpenAPI.Document: The root of an OpenAPI 3.0 document.
-
OpenAPI.Document.Route:
A
Route
is the combination of a path (where the route lives) and a path item (the definition of the route). - OpenAPI.Document.Version: The OpenAPI Specification version.
- OpenAPI.Document.Info: OpenAPI Spec "Info Object"
- OpenAPI.Document.Info.Contact: OpenAPI Spec "Contact Object"
- OpenAPI.Document.Info.License: OpenAPI Spec "License Object"
-
ResolvedDocument:
A resolved document is a fully dereferenced
OpenAPI document that has been further distilled
to canonical representations of each component. You
create a
ResolvedDocument
by calling theresolved()
method on aDereferencedDocument
. - EitherDecodeNoTypesMatchedError
- EitherDecodeNoTypesMatchedError.IndividualFailure
-
Either:
Can contain a value of either type
A
or typeB
. - OpenAPI.Error.Decoding.Document
- OpenAPI.Error.Decoding.Document.Context
- InconsistencyError: This error type is thrown when a problem during encoding or decoding but the problem is not inherent to the types or structures but rather specific to the OpenAPI specification rules.
- OpenAPI.Error.Decoding
- ErrorCategory
- ErrorCategory.KeyValue
-
OpenAPI.Error:
An
OpenAPI.Error
can be constructed from any error thrown while decoding an OpenAPI document. This wrapper provides a superior human-readable error and a human readable coding path. - OpenAPI.Error.Decoding.Operation
- OpenAPI.Error.Decoding.Operation.Context
- OpenAPI.Error.Decoding.Path
- OpenAPI.Error.Decoding.Path.Context
- OpenAPI.Error.Decoding.Request
- OpenAPI.Error.Decoding.Request.Context
- OpenAPI.Error.Decoding.Response
- OpenAPI.Error.Decoding.Response.Context
- OpenAPI.Example: OpenAPI Spec "Example Object"
- OpenAPI.ExternalDocumentation: OpenAPI Spec "External Documentation Object"
-
DereferencedHeader:
An
OpenAPI.Header
type that guarantees itsschemaOrContent
is inlined instead of referenced. - OpenAPI.Header: OpenAPI Spec "Header Object"
- OpenAPI.HttpMethod: Represents the HTTP methods supported by the OpenAPI Specification.
- JSONReference: A reference following the JSON Reference specification.
- JSONReference.InternalReference: The context for a JSONReference that points to something within the same document as the reference itself.
- JSONReference.Path: A JSON Reference path.
- JSONReference.PathComponent: A JSON Reference path component, as described by the JSON pointer specification.
- OpenAPI: The OpenAPI namespace
-
DereferencedOperation:
An
OpenAPI.Operation
type that guarantees itsparameters
,requestBody
,responses
, andsecurity
are inlined instead of referenced. -
DereferencedOperation.ResponseOutcome:
A
ResponseOutcome
is the combination of a status code and a response. - OpenAPI.Operation: OpenAPI Spec "Operation Object"
-
OpenAPI.Operation.ResponseOutcome:
A
ResponseOutcome
is the combination of a status code and a response. - ResolvedEndpoint: The canonical definition of an endpoint. All information from throughout the OpenAPI document that is relevant to a particular endpoint is collected and exposed in this type.
-
OrderedDictionary:
A simple implementation of an Ordered Dictionary based
on the existing Foundation
Dictionary
andArray
types. Undoubtedly not the fastest performer, but should be sufficient for the purposes of this library. - OrderedDictionary.Iterator
-
DereferencedParameter:
An
OpenAPI.Parameter
type that guarantees itsschemaOrContent
is inlined instead of referenced. -
DereferencedSchemaContext:
A
SchemaContext
type that guarantees itsschema
andexamples
are inlined instead of referenced. - OpenAPI.Parameter: OpenAPI Spec "Parameter Object"
- OpenAPI.Parameter.Context: OpenAPI Spec "Parameter Object" location-specific configuration.
- OpenAPI.Parameter.Context.Location
- OpenAPI.Parameter.SchemaContext: OpenAPI Spec "Parameter Object" schema and style configuration.
- OpenAPI.Parameter.SchemaContext.Style
-
DereferencedPathItem:
An
OpenAPI.PathItem
type that guarantees itsparameters
and operations are inlined instead of referenced. -
DereferencedPathItem.Endpoint:
An
Endpoint
is the combination of an HTTP method and an operation. - OpenAPI.Path: OpenAPI Spec "Paths Object" path field pattern support.
- OpenAPI.PathItem: OpenAPI Spec "Path Item Object"
-
OpenAPI.PathItem.Endpoint:
An
Endpoint
is the combination of an HTTP method and an operation. - ResolvedRoute: The canonical definition of a route. All information from throughout the OpenAPI document that is relevant to a particular route is collected and exposed in this type.
-
DereferencedRequest:
An
OpenAPI.Request
type that guarantees itscontent
is inlined instead of referenced. - OpenAPI.Request: OpenAPI Spec "Request Body Object"
-
DereferencedResponse:
An
OpenAPI.Response
type that guarantees itsheaders
andcontent
are inlined instead of referenced. - OpenAPI.Response: OpenAPI Spec "Response Object"
- OpenAPI.Response.StatusCode: An HTTP Status code or status code range.
- OpenAPI.Response.StatusCode.Range
- OpenAPI.RuntimeExpression: OpenAPI Spec "Runtime Expression"
- OpenAPI.RuntimeExpression.Source
-
DereferencedJSONSchema:
A
JSONSchema
type that guarantees none of its nodes are references. -
DereferencedJSONSchema.ArrayContext:
The context that only applies to
.array
schemas. -
DereferencedJSONSchema.ObjectContext:
The context that only applies to
.object
schemas. - JSONSchemaResolutionError
- JSONSchema: OpenAPI "Schema Object"
- JSONSchema.CoreContext: The context that applies to all schemas.
- JSONSchema.CoreContext.Permissions
-
JSONSchema.NumericContext:
The context that only applies to
.number
schemas. - JSONSchema.NumericContext.Bound
-
JSONSchema.IntegerContext:
The context that only applies to
.integer
schemas. - JSONSchema.IntegerContext.Bound
-
JSONSchema.StringContext:
The context that only applies to
.string
schemas. -
JSONSchema.ArrayContext:
The context that only applies to
.array
schemas. -
JSONSchema.ObjectContext:
The context that only applies to
.object
schemas. - JSONType: The raw types supported by JSON Schema.
- JSONTypeFormat: The combination of a JSON Schema type and format.
- JSONTypeFormat.AnyFormat: A format used when no type is known or any type is allowed.
-
JSONTypeFormat.BooleanFormat:
The allowed "format" properties for
.boolean
schemas. -
JSONTypeFormat.ObjectFormat:
The allowed "format" properties for
.object
schemas. -
JSONTypeFormat.ArrayFormat:
The allowed "format" properties for
.array
schemas. -
JSONTypeFormat.NumberFormat:
The allowed "format" properties for
.number
schemas. -
JSONTypeFormat.IntegerFormat:
The allowed "format" properties for
.integer
schemas. -
JSONTypeFormat.StringFormat:
The allowed "format" properties for
.string
schemas. -
JSONTypeFormat.StringFormat.Extended:
Popular non-standard "format" properties for
.string
schemas. -
JSONTypeFormat.IntegerFormat.Extended:
Popular non-standard "format" properties for
.integer
schemas. -
DereferencedSecurityRequirement:
An
OpenAPI.SecurityRequirement
type that contains the actual security schemas it would otherwise just be referencing with the keys of the Security Requirement dictionary. -
DereferencedSecurityRequirement.ScopedScheme:
A combination of a
SecurityScheme
and the scopes on that scheme that are required. - OpenAPI.OAuthFlows: OpenAPI Spec "Oauth Flows Object"
- OpenAPI.OAuthFlows.CommonFields
- OpenAPI.OAuthFlows.Implicit
- OpenAPI.OAuthFlows.Password
- OpenAPI.OAuthFlows.ClientCredentials
- OpenAPI.OAuthFlows.AuthorizationCode
- OpenAPI.SecurityScheme: OpenAPI Spec "Security Scheme Object"
- OpenAPI.SecurityScheme.SecurityType
- OpenAPI.SecurityScheme.Location
- OpenAPI.SecurityScheme.SecurityType.Name
- OpenAPI.Server: OpenAPI Spec "Server Object"
- OpenAPI.Server.Variable: OpenAPI Spec "Server Variable Object"
- OpenAPI.Tag: OpenAPI Spec "Tag Object"
- URLTemplate: A URL that may contain variable placeholders.
- URLTemplate.Component: URL Template components are either variables that can take on different values depending on the context or they are constant unchanging parts of the URL.
- ValidationContext: The context in which a validation can be applied.
-
Validation:
Holds a function to determine if a validation
applies (
predicate
) and a function that applies a validation (validate
). - ValidationError: Validation errors are just a textual reason for validation failure and a coding path where the validation error occurred.
-
ValidationErrorCollection:
Collects
ValidationErrors
. -
Validator:
A validator that works by traversing an
Encodable
object and validating any values that match an included validation's type and pass that validation's predicate. - Validator.CodingKey
- OpenAPI.XML: OpenAPI Spec "XML Object"
-
VendorExtendable:
A
VendorExtendable
type is a type that supports arbitrary additions as long as those additions are keyed by strings starting with "x-" (e.g. "x-customThing"). - ComponentDictionaryLocatable: Anything conforming to ComponentDictionaryLocatable knows where to find resources of its type in the Components Dictionary.
-
LocallyDereferenceable:
A dereferenceable type can be recursively looked up in
the
OpenAPI.Components
until there are noJSONReferences
left in it or any of its properties. - OpenAPIError
-
_OpenAPIReference:
Used as a quick check internally in this library to determine if a type is
a reference (which only
JSONReference
should be). -
OpenAPISchemaType:
Anything conforming to
OpenAPISchemaType
can provide an OpenAPI schema representing itself. - JSONSchemaContext: A schema context stores information about a schema. All schemas can have the contextual information in this protocol.
- SwiftTyped: An OpenAPI type with an associated value representing its Swift type.
- OpenAPIFormat: OpenAPI formats represent the valid formats a raw type can take on to better specify its allowed values and intended semantics.
-
Validatable:
A Marker protocol that indicates a type can be used
as the subject of a
Validation
.
- ~=(lhs:rhs:)
- &&(lhs:rhs:)
- ||(lhs:rhs:)
- &&(lhs:rhs:)
- ||(lhs:rhs:)
- ==(lhs:rhs:)
- !=(lhs:rhs:)
- >(lhs:rhs:)
- >=(lhs:rhs:)
- <(lhs:rhs:)
- <=(lhs:rhs:)
- ==(lhs:rhs:)
- !=(lhs:rhs:)
- >(lhs:rhs:)
- >=(lhs:rhs:)
- <(lhs:rhs:)
- <=(lhs:rhs:)
- take(_:check:): Create a validation or predicate function from a KeyPath and a function operating on that value.
- take(_:check:): Create a validation or predicate function from a KeyPath and a function operating on that value.
- lift(_:into:): Lift the value the KeyPath points to into any number of validations on that value producing a new validation function that operates on the type of the root of the KeyPath and results in all the given validations being run.
- lift(_:into:): Lift the value the KeyPath points to into any number of validations on that value producing a new validation function that operates on the type of the root of the KeyPath and results in all the given validations being run.
-
unwrap(_:into:description:):
Unwrap the value pointed to by the KeyPath. Fail
with a
ValidationError
if the value isnil
or pass onto each validation provided otherwise. -
unwrap(_:into:description:):
Unwrap the value pointed to by the KeyPath. Fail
with a
ValidationError
if the value isnil
or pass onto each validation provided otherwise. - all(_:): Apply all of the given validations to the current context.
.
Types
- AnyCodable
- DereferencedContent
- DereferencedContentEncoding
- DereferencedDocument
- DereferencedDocument.Route
- DereferencedHeader
- DereferencedJSONSchema
- DereferencedJSONSchema.ArrayContext
- DereferencedJSONSchema.ObjectContext
- DereferencedOperation
- DereferencedOperation.ResponseOutcome
- DereferencedParameter
- DereferencedPathItem
- DereferencedPathItem.Endpoint
- DereferencedRequest
- DereferencedResponse
- DereferencedSchemaContext
- DereferencedSecurityRequirement
- DereferencedSecurityRequirement.ScopedScheme
- Either
- EitherDecodeNoTypesMatchedError
- EitherDecodeNoTypesMatchedError.IndividualFailure
- ErrorCategory
- ErrorCategory.KeyValue
- InconsistencyError
- JSONReference
- JSONReference.InternalReference
- JSONReference.Path
- JSONReference.PathComponent
- JSONSchema
- JSONSchema.ArrayContext
- JSONSchema.CoreContext
- JSONSchema.CoreContext.Permissions
- JSONSchema.IntegerContext
- JSONSchema.IntegerContext.Bound
- JSONSchema.NumericContext
- JSONSchema.NumericContext.Bound
- JSONSchema.ObjectContext
- JSONSchema.StringContext
- JSONSchemaResolutionError
- JSONType
- JSONTypeFormat
- JSONTypeFormat.AnyFormat
- JSONTypeFormat.ArrayFormat
- JSONTypeFormat.BooleanFormat
- JSONTypeFormat.IntegerFormat
- JSONTypeFormat.IntegerFormat.Extended
- JSONTypeFormat.NumberFormat
- JSONTypeFormat.ObjectFormat
- JSONTypeFormat.StringFormat
- JSONTypeFormat.StringFormat.Extended
- OpenAPI
- OpenAPI.CallbackURL
- OpenAPI.ComponentKey
- OpenAPI.Components
- OpenAPI.Components.ReferenceCycleError
- OpenAPI.Components.ReferenceError
- OpenAPI.Content
- OpenAPI.Content.Encoding
- OpenAPI.ContentType
- OpenAPI.Discriminator
- OpenAPI.Document
- OpenAPI.Document.Info
- OpenAPI.Document.Info.Contact
- OpenAPI.Document.Info.License
- OpenAPI.Document.Route
- OpenAPI.Document.Version
- OpenAPI.Error
- OpenAPI.Error.Decoding
- OpenAPI.Error.Decoding.Document
- OpenAPI.Error.Decoding.Document.Context
- OpenAPI.Error.Decoding.Operation
- OpenAPI.Error.Decoding.Operation.Context
- OpenAPI.Error.Decoding.Path
- OpenAPI.Error.Decoding.Path.Context
- OpenAPI.Error.Decoding.Request
- OpenAPI.Error.Decoding.Request.Context
- OpenAPI.Error.Decoding.Response
- OpenAPI.Error.Decoding.Response.Context
- OpenAPI.Example
- OpenAPI.ExternalDocumentation
- OpenAPI.Header
- OpenAPI.HttpMethod
- OpenAPI.Link
- OpenAPI.OAuthFlows
- OpenAPI.OAuthFlows.AuthorizationCode
- OpenAPI.OAuthFlows.ClientCredentials
- OpenAPI.OAuthFlows.CommonFields
- OpenAPI.OAuthFlows.Implicit
- OpenAPI.OAuthFlows.Password
- OpenAPI.Operation
- OpenAPI.Operation.ResponseOutcome
- OpenAPI.Parameter
- OpenAPI.Parameter.Context
- OpenAPI.Parameter.Context.Location
- OpenAPI.Parameter.SchemaContext
- OpenAPI.Parameter.SchemaContext.Style
- OpenAPI.Path
- OpenAPI.PathItem
- OpenAPI.PathItem.Endpoint
- OpenAPI.Request
- OpenAPI.Response
- OpenAPI.Response.StatusCode
- OpenAPI.Response.StatusCode.Range
- OpenAPI.RuntimeExpression
- OpenAPI.RuntimeExpression.Source
- OpenAPI.SecurityScheme
- OpenAPI.SecurityScheme.Location
- OpenAPI.SecurityScheme.SecurityType
- OpenAPI.SecurityScheme.SecurityType.Name
- OpenAPI.Server
- OpenAPI.Server.Variable
- OpenAPI.Tag
- OpenAPI.XML
- OrderedDictionary
- OrderedDictionary.Iterator
- ResolvedDocument
- ResolvedEndpoint
- ResolvedRoute
- URLTemplate
- URLTemplate.Component
- Validation
- ValidationContext
- ValidationError
- ValidationErrorCollection
- Validator
- Validator.CodingKey
Protocols
Global Functions
Extensions
- Array
- Bool
- Dictionary
- Double
- Float
- Int
- Int32
- Int64
- OpenAPI.Callbacks
- OpenAPI.Content.Encoding
- OpenAPI.Document.Info
- OpenAPI.Document.Info.Contact
- OpenAPI.Document.Info.License
- OpenAPI.Error.Decoding
- OpenAPI.Error.Decoding.Document
- OpenAPI.Error.Decoding.Operation
- OpenAPI.Error.Decoding.Path
- OpenAPI.Error.Decoding.Request
- OpenAPI.Error.Decoding.Response
- OpenAPI.OAuthFlows.AuthorizationCode
- OpenAPI.OAuthFlows.ClientCredentials
- OpenAPI.OAuthFlows.CommonFields
- OpenAPI.OAuthFlows.Implicit
- OpenAPI.OAuthFlows.Password
- OpenAPI.Parameter.Context
- OpenAPI.Parameter.SchemaContext
- OpenAPI.Response.StatusCode
- OpenAPI.Server.Variable
- Optional
- String
- URL
- UUID