Instance Methodswift-openapi-runtime 1.6.0OpenAPIRuntime
encode(to:)
Encodes the OpenAPIValueContainer
into a format that can be stored or transmitted via the given encoder.
func encode(to encoder: any Encoder) throws
Parameters
- encoder
The encoder used to perform the encoding.
Throws
An error if the encoding process encounters an issue or if the data does not match the expected format.
Other members in extension
Type members
init(
) Creates a new empty container.
init(from: any Decoder
) throws Creates an
OpenAPIValueContainer
by decoding it from a single-value container in a given decoder.init(unvalidatedValue: [String : (any Sendable)?]
) throws Creates a new container with the given unvalidated value.
static func == (lhs: OpenAPIObjectContainer, rhs: OpenAPIObjectContainer
) -> Bool Compares two
OpenAPIObjectContainer
instances for equality by comparing their inner key-value dictionaries.
Instance members
var value: [String : (any Sendable)?]
The underlying dynamic dictionary value.
func hash(into: inout Hasher
) Hashes the
OpenAPIObjectContainer
instance into the providedHasher
.