The generatedSamplesMaxDepth
option controls how many schema levels automatically generated for payload samples. The default is 8 which works well for most APIs, but you can adjust it if necessary for your use case.
Option | Type | Description |
---|---|---|
generatedSamplesMaxDepth | number | Set the number of levels to generate payload samples. Default value is 8 . |
The following example produces automatically generated payload samples with 3 levels:
redocly.yaml
openapi:
generatedSamplesMaxDepth: 3
- OpenAPI configuration - Complete guide to OpenAPI configuration options for customizing API reference documentation
- OpenAPI Specification - Official OpenAPI Specification documentation for understanding API description standards
- OpenAPI visual reference - Visual guide to OpenAPI specification structure and sample generation depth configuration
- Configuration options - Explore other project configuration options for comprehensive documentation customization