Skip to content

OpenAPI_SecurityScheme

mattpolzin edited this page May 23, 2020 · 7 revisions

OpenAPI.SecurityScheme

OpenAPI Spec "Security Scheme Object"

public struct SecurityScheme: Equatable, CodableVendorExtendable

See OpenAPI Security Scheme Object.

Inheritance

CodableVendorExtendable, ComponentDictionaryLocatable, Decodable, Encodable, Equatable

Initializers

init(type:description:vendorExtensions:)

public init(type: SecurityType, description: String? = nil, 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>>

type

var type: SecurityType

description

var description: String?

vendorExtensions

Dictionary of vendor extensions.

var vendorExtensions: [String: AnyCodable]

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

Methods

apiKey(name:location:description:)

public static func apiKey(name: String, location: Location, description: String? = nil) -> SecurityScheme

http(scheme:bearerFormat:description:)

public static func http(scheme: String, bearerFormat: String? = nil, description: String? = nil) -> SecurityScheme

oauth2(flows:description:)

public static func oauth2(flows: OAuthFlows, description: String? = nil) -> SecurityScheme

openIdConnect(url:description:)

public static func openIdConnect(url: URL, description: String? = nil) -> SecurityScheme

encode(to:)

public func encode(to encoder: Encoder) throws

decodeAPIKey(from:)

internal static func decodeAPIKey(from container: KeyedDecodingContainer<OpenAPI.SecurityScheme.CodingKeys>) throws -> (name: String, location: Location)

decodeHTTP(from:)

internal static func decodeHTTP(from container: KeyedDecodingContainer<OpenAPI.SecurityScheme.CodingKeys>) throws -> (scheme: String, bearerFormat: String?)
Types
Protocols
Global Functions
Extensions
Clone this wiki locally