Skip to content

DereferencedOperation

mattpolzin edited this page Jul 3, 2020 · 4 revisions

DereferencedOperation

An OpenAPI.Operation type that guarantees its parameters, requestBody, responses, and security are inlined instead of referenced.

@dynamicMemberLookup public struct DereferencedOperation: Equatable

Inheritance

Equatable

Initializers

init(_:resolvingIn:)

Create a DereferencedOperation if all references in the operation can be found in the given Components Object.

public init(_ operation: OpenAPI.Operation, resolvingIn components: OpenAPI.Components) throws

Throws

ReferenceError.cannotLookupRemoteReference or MissingReferenceError.referenceMissingOnLookup(name:) depending on whether an unresolvable reference points to another file or just points to a component in the same file that cannot be found in the Components Object.

Properties

underlyingOperation

The original OpenAPI.Operation prior to being dereferenced.

let underlyingOperation: OpenAPI.Operation

parameters

A dereferenced array of parameters.

let parameters: [DereferencedParameter]

requestBody

A dereferenced request body.

let requestBody: DereferencedRequest?

responses

A dereferenced map of responses.

let responses: DereferencedResponse.Map

security

An array of dereferenced security requirements.

let security: [DereferencedSecurityRequirement]?

If defined, overrides the security requirements in the root document security array.

Each secutity requirement in this array is an alternative, only one of which must be met for the request to be authorized.

By contrast, all entries in an individual DereferencedSecurityRequirement (which is itself a dictionary) must be met.

nil indicates this operation uses the security requirements defined at the root of the document.

responseOutcomes

Get all response outcomes for this operation.

var responseOutcomes: [ResponseOutcome]

Returns

An array of ResponseOutcomes with the status and the response for the status.

Types
Protocols
Global Functions
Extensions
Clone this wiki locally