Skip to content

OpenAPI_Parameter

mattpolzin edited this page May 23, 2020 · 8 revisions

OpenAPI.Parameter

OpenAPI Spec "Parameter Object"

public struct Parameter: Equatable, CodableVendorExtendable

See OpenAPI Parameter Object.

Inheritance

CodableVendorExtendable, ComponentDictionaryLocatable, Decodable, Encodable, Equatable

Nested Type Aliases

Array

An array of parameters that are Either Parameters or references to parameters.

public typealias Array = [Either<JSONReference<Parameter>, Parameter>]

Initializers

init(name:context:schemaOrContent:description:deprecated:vendorExtensions:)

public init(name: String, context: Context, schemaOrContent: Either<SchemaContext, OpenAPI.Content.Map>, description: String? = nil, deprecated: Bool = false, vendorExtensions: [String: AnyCodable] = [:])

init(name:context:schema:description:deprecated:vendorExtensions:)

public init(name: String, context: Context, schema: SchemaContext, description: String? = nil, deprecated: Bool = false, vendorExtensions: [String: AnyCodable] = [:])

init(name:context:schema:description:deprecated:vendorExtensions:)

public init(name: String, context: Context, schema: JSONSchema, description: String? = nil, deprecated: Bool = false, vendorExtensions: [String: AnyCodable] = [:])

init(name:context:schemaReference:description:deprecated:vendorExtensions:)

public init(name: String, context: Context, schemaReference: JSONReference<JSONSchema>, description: String? = nil, deprecated: Bool = false, vendorExtensions: [String: AnyCodable] = [:])

init(name:context:content:description:deprecated:vendorExtensions:)

public init(name: String, context: Context, content: OpenAPI.Content.Map, description: String? = nil, deprecated: Bool = false, vendorExtensions: [String: AnyCodable] = [:])

init(from:)

public init(from decoder: Decoder) throws

Properties

openAPIComponentsKey

var openAPIComponentsKey: String

openAPIComponentsKeyPath

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

name

var name: String

context

OpenAPI Spec "in" property determines the Context.

var context: Context

description

var description: String?

deprecated

var deprecated: Bool

schemaOrContent

OpenAPI Spec "content" or "schema" properties.

var schemaOrContent: Either<SchemaContext, OpenAPI.Content.Map>

vendorExtensions

Dictionary of vendor extensions.

var vendorExtensions: [String: AnyCodable]

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

required

var required: Bool

location

var location: Context.Location

Methods

encode(to:)

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