-
Notifications
You must be signed in to change notification settings - Fork 37
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.
public struct ResolvedRoute: Equatable
You can access resolved routes via the
ResolvedDocument
type. You make a ResolvedDocument
from an OpenAPI.Document
by calling:
try document
.locallyDereferenced()
.resolved()
See ResolvedDocument
for more information.
Equatable
Create a ResolvedRoute.
internal init(summary: String?, description: String?, vendorExtensions: [String: AnyCodable], path: OpenAPI.Path, parameters: [DereferencedParameter], servers: [OpenAPI.Server], endpoints: [ResolvedEndpoint])
ResolvedRoute
creation is only publicly
exposed by methods on ResolvedDocument
and DereferencedDocument
.
Important: The endpoints passed in must each be associated with a different HTTP method. Naturally a route can only define one operation for each method.
The summary of this route.
let summary: String?
The description of this route.
let description: String?
The OpenAPI Specification Extensions available on this route.
let vendorExtensions: [String :AnyCodable]
The path at which this route is exposed.
let path: OpenAPI.Path
All parameters that apply to all endpoints at this route. This array does not include parameters that apply to some but not all endpoints.
let parameters: [DereferencedParameter]
For a comprehensive array of parameters
relevant to any particular endpoint, use
the ResolvedEndpoint
parameters
property. That property will contain both
parameters that are relevant to all endpoints
at this route and also parameters only
relevant to the given endpoint.
The list of servers that support this route.
let servers: [OpenAPI.Server]
The HTTP GET
endpoint at this route.
let get: ResolvedEndpoint?
The HTTP PUT
endpoint at this route.
let put: ResolvedEndpoint?
The HTTP POST
endpoint at this route.
let post: ResolvedEndpoint?
The HTTP DELETE
endpoint at this route.
let delete: ResolvedEndpoint?
The HTTP OPTIONS
endpoint at this route.
let options: ResolvedEndpoint?
The HTTP HEAD
endpoint at this route.
let head: ResolvedEndpoint?
The HTTP PATCH
endpoint at this route.
let patch: ResolvedEndpoint?
The HTTP TRACE
endpoint at this route.
let trace: ResolvedEndpoint?
An array of all endpoints at this route.
var endpoints: [ResolvedEndpoint]
Retrieve the endpoint for the given method, if one exists for this route.
public func `for`(_ verb: OpenAPI.HttpMethod) -> ResolvedEndpoint?
.
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