init
TypeScriptstatic initReferenceTo(name: string): DynamicGenerationSchemaSwift declarationinit(referenceTo name: String)Creates a reference schema. - Parameters: - name: The name of the ``DynamicGenerationSchema`` this is a reference to.
struct · iOS 26.0+ · SDK 27.1
struct DynamicGenerationSchemaThe dynamic counterpart to the generation schema type that you use to construct schemas at runtime. An individual schema may reference other schemas by name, and references are resolved when converting a set of dynamic schemas into a ``GenerationSchema``.
static initReferenceTo(name: string): DynamicGenerationSchemaSwift declarationinit(referenceTo name: String)Creates a reference schema. - Parameters: - name: The name of the ``DynamicGenerationSchema`` this is a reference to.
static initNameDescriptionProperties(name: string, description: (string) | null, properties: Array<DynamicGenerationSchema_Property>): DynamicGenerationSchemaSwift declarationinit(name: String, description: String? = nil, properties: [DynamicGenerationSchema.Property])Creates an object schema. - Parameters: - name: A name this dynamic schema can be referenced by. - description: A natural language description of this schema. - properties: The properties associated with this schema.
static initNameDescriptionRepresentNilExplicitlyInGeneratedContentProperties(name: string, description: (string) | null, explicitNil: boolean, properties: Array<DynamicGenerationSchema_Property>): DynamicGenerationSchemaSwift declarationinit(name: String, description: String? = nil, representNilExplicitlyInGeneratedContent explicitNil: Bool, properties: [DynamicGenerationSchema.Property])Creates an object schema. - Parameters: - name: A name this dynamic schema can be referenced by. - description: A natural language description of this schema. - representNilExplicitlyInGeneratedContent: If `true`, the model represents `nil` explicitly. - properties: The properties associated with this schema.
static initNameDescriptionAnyOf(name: string, description: (string) | null, choices: Array<DynamicGenerationSchema>): DynamicGenerationSchemaSwift declarationinit(name: String, description: String? = nil, anyOf choices: [DynamicGenerationSchema])Creates an any-of schema. - Parameters: - name: A name this schema can be referenced by. - description: A natural language description of this ``DynamicGenerationSchema``. - choices: An array of schemas this one will be a union of.
static initNameDescriptionAnyOf6353(name: string, description: (string) | null, choices: Array<string>): DynamicGenerationSchemaSwift declarationinit(name: String, description: String? = nil, anyOf choices: [String])Creates an enum schema. - Parameters: - name: A name this schema can be referenced by. - description: A natural language description of this ``DynamicGenerationSchema``. - choices: An array of strings this one will be a union of.
static get null(): DynamicGenerationSchemaSwift declarationstatic var null: DynamicGenerationSchema { get }Creates a null schema. You can use null schemas as a way to express types that cannot be absent, but may have an empty value. let person = DynamicGenerationSchema( name: "Person", properties: [] DynamicGenerationSchema.Property( name: "fullName", schema: DynamicGenerationSchema(type: String.self) ) ] ) let nullablePerson = DynamicGenerationSchema( name: "NullablePerson", anyOf: [person, .null] ) let schema = try GenerationSchema(root: nullablePerson, dependencies: [])
static initArrayOfMinimumElementsMaximumElements(itemSchema: DynamicGenerationSchema, minimumElements?: (number) | null, maximumElements?: (number) | null): DynamicGenerationSchemaSwift declarationinit(arrayOf itemSchema: DynamicGenerationSchema, minimumElements: Int? = nil, maximumElements: Int? = nil)Creates an array schema. - Parameters: - itemSchema: A schema to use as the elements of the array. - minimumElements: A minimum number of elements the array should contain. - maximumElements: The maximum number of element the array should contain.
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
DynamicGenerationSchema.init(type:guides:)
Passing a Swift type itself is not supported.