Skip to content

JSONSchema_StringContext

mattpolzin edited this page Jun 11, 2021 · 4 revisions

JSONSchema.StringContext

The context that only applies to .string schemas.

public struct StringContext: Equatable 

Inheritance

Decodable, Encodable, Equatable

Initializers

init(maxLength:minLength:pattern:)

public init(
            maxLength: Int? = nil,
            minLength: Int? = nil,
            pattern: String? = nil
        ) 

init(from:)

public init(from decoder: Decoder) throws 

Properties

maxLength

public let maxLength: Int?

minLength

public var minLength: Int 

pattern

Regular expression

public let pattern: String?

Methods

encode(to:)

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