---
title: DynamicGenerationSchema
framework: foundationmodels
role: symbol
role_heading: Structure
path: foundationmodels/dynamicgenerationschema
---

# DynamicGenerationSchema

The dynamic counterpart to the generation schema type that you use to construct schemas at runtime.

## Declaration

```swift
struct DynamicGenerationSchema
```

## Mentioned in

Generating Swift data structures with guided generation

## Overview

Overview An individual schema may reference other schemas by name, and references are resolved when converting a set of dynamic schemas into a GenerationSchema.

## Topics

### Creating a dynamic schema

- [init(arrayOf:minimumElements:maximumElements:)](foundationmodels/dynamicgenerationschema/init(arrayof:minimumelements:maximumelements:).md)
- [init(name:description:anyOf:)](foundationmodels/dynamicgenerationschema/init(name:description:anyof:).md)
- [init(name:description:properties:)](foundationmodels/dynamicgenerationschema/init(name:description:properties:).md)
- [init(name:description:representNilExplicitlyInGeneratedContent:properties:)](foundationmodels/dynamicgenerationschema/init(name:description:representnilexplicitlyingeneratedcontent:properties:).md)
- [init(referenceTo:)](foundationmodels/dynamicgenerationschema/init(referenceto:).md)
- [init(type:guides:)](foundationmodels/dynamicgenerationschema/init(type:guides:).md)
- [DynamicGenerationSchema.Property](foundationmodels/dynamicgenerationschema/property.md)

### Creating a null schema

- [null](foundationmodels/dynamicgenerationschema/null.md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Structured output

- [Generating Swift data structures with guided generation](foundationmodels/generating-swift-data-structures-with-guided-generation.md)
- [Generable](foundationmodels/generable.md)
- [GenerationSchema](foundationmodels/generationschema.md)
- [GeneratedContent](foundationmodels/generatedcontent.md)
- [ConvertibleToGeneratedContent](foundationmodels/convertibletogeneratedcontent.md)
- [ConvertibleFromGeneratedContent](foundationmodels/convertiblefromgeneratedcontent.md)
