Skip to content

JSONSchemaFragment

mattpolzin edited this page Jul 25, 2020 · 3 revisions

JSONSchemaFragment

public enum JSONSchemaFragment

Inheritance

Decodable, Encodable, Equatable, JSONSchemaFragmentContext

Nested Type Aliases

GeneralCodingKeys

private typealias GeneralCodingKeys = JSONSchema.ContextCodingKeys

IntegerCodingKeys

private typealias IntegerCodingKeys = JSONSchema.IntegerContext.CodingKeys

NumericCodingKeys

private typealias NumericCodingKeys = JSONSchema.NumericContext.CodingKeys

StringCodingKeys

private typealias StringCodingKeys = JSONSchema.StringContext.CodingKeys

ArrayCodingKeys

private typealias ArrayCodingKeys = JSONSchema.ArrayContext.CodingKeys

ObjectCodingKeys

private typealias ObjectCodingKeys = JSONSchema.ObjectContext.CodingKeys

Initializers

init(from:)

public init(from decoder: Decoder) throws

Enumeration Cases

general

case general(: GeneralContext)

boolean

case boolean(: GeneralContext)

integer

case integer(: GeneralContext, : IntegerContext)

number

case number(: GeneralContext, : NumericContext)

string

case string(: GeneralContext, : StringContext)

array

case array(: GeneralContext, : ArrayContext)

object

case object(: GeneralContext, : ObjectContext)

reference

case reference(: JSONReference<JSONSchema>)

Properties

format

var format: String?

description

var description: String?

title

var title: String?

nullable

var nullable: Bool?

deprecated

var deprecated: Bool?

externalDocs

var externalDocs: OpenAPI.ExternalDocumentation?

allowedValues

var allowedValues: [AnyCodable]?

example

var example: AnyCodable?

readOnly

var readOnly: Bool?

writeOnly

var writeOnly: Bool?

Methods

encodeGeneralProperties(for:to:)

private func encodeGeneralProperties(for type: JSONType?, to encoder: Encoder) throws

encode(to:)

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