Skip to content

JSONSchema_ArrayContext

mattpolzin edited this page Jun 11, 2021 · 4 revisions

JSONSchema.ArrayContext

The context that only applies to .array schemas.

public struct ArrayContext: Equatable 

Inheritance

Decodable, Encodable, Equatable

Initializers

init(items:maxItems:minItems:uniqueItems:)

public init(
            items: JSONSchema? = nil,
            maxItems: Int? = nil,
            minItems: Int? = nil,
            uniqueItems: Bool? = nil
        ) 

init(from:)

public init(from decoder: Decoder) throws 

Properties

items

A JSON Type Node that describes the type of each element in the array.

public let items: JSONSchema?

maxItems

Maximum number of items in array.

public let maxItems: Int?

minItems

Minimum number of items in array. Defaults to 0.

public var minItems: Int 

uniqueItems

Setting to true indicates all elements of the array are expected to be unique. Defaults to false.

public var uniqueItems: Bool 

Methods

encode(to:)

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