Skip to content

OpenAPI_CallbackURL

mattpolzin edited this page Jun 11, 2021 · 2 revisions

OpenAPI.CallbackURL

A URL template where the placeholders are OpenAPI Runtime Expressions instead of named variables.

public struct CallbackURL: Hashable, RawRepresentable 

See OpenAPI Callback Object and OpenAPI Runtime Expression for more.

Inheritance

Decodable, Encodable, Hashable, RawRepresentable

Initializers

init?(rawValue:)

Create a CallbackURL from the string if possible.

public init?(rawValue: String) 

init(url:)

public init(url: URL) 

init(from:)

public init(from decoder: Decoder) throws 

Properties

template

public let template: URLTemplate

rawValue

The string value of the URL without variable replacement.

public var rawValue: String 

Variables cannot be replaced based on other information in the OpenAPI document; they are only available at "runtime" which is where the name of the OpenAPI structure CallbackURL represents comes from.

url

Get a URL from the runtime expression if it is a valid URL without variable replacement.

public var url: URL? 

Callback URLs with variables in them will not be valid URLs and are therefore guaranteed to return nil.

Methods

encode(to:)

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