Skip to content

OpenAPI_Request

mattpolzin edited this page Aug 21, 2023 · 8 revisions

OpenAPI.Request

OpenAPI Spec "Request Body Object"

public struct Request: Equatable, CodableVendorExtendable 

See OpenAPI Request Body Object.

Inheritance

CodableVendorExtendable, ComponentDictionaryLocatable, Decodable, Encodable, Equatable, LocallyDereferenceable

Initializers

init(description:content:required:vendorExtensions:)

public init(
            description: String? = nil,
            content: Content.Map,
            required: Bool = false,
            vendorExtensions: [String: AnyCodable] = [:]
        ) 

init(from:)

public init(from decoder: Decoder) throws 

Properties

openAPIComponentsKey

public static var openAPIComponentsKey: String 

openAPIComponentsKeyPath

public static var openAPIComponentsKeyPath: KeyPath<OpenAPI.Components, OpenAPI.ComponentDictionary<Self>> 

description

public var description: String?

content

public var content: Content.Map

required

public var required: Bool

vendorExtensions

Dictionary of vendor extensions.

public var vendorExtensions: [String: AnyCodable]

These should be of the form: [ "x-extensionKey": <anything>] where the values are anything codable.

Methods

_dereferenced(in:following:dereferencedFromComponentNamed:)

An internal-use method that facilitates reference cycle detection by tracking past references followed in the course of dereferencing.

public func _dereferenced(
        in components: OpenAPI.Components,
        following references: Set<AnyHashable>,
        dereferencedFromComponentNamed name: String?
    ) throws -> DereferencedRequest 

For all external-use, see dereferenced(in:) (provided by the LocallyDereferenceable protocol). All types that provide a _dereferenced(in:following:) implementation have a dereferenced(in:) implementation for free.

encode(to:)

public func encode(to encoder: Encoder) throws 
Types
Protocols
Global Functions
Extensions
Clone this wiki locally