The generatedSamplesMaxDepth option controls how many schema levels appear in generated payload samples. The default is 8, which works well for most APIs. Adjust it when your schemas need more or less depth.
| Option | Type | Description |
|---|---|---|
| generatedSamplesMaxDepth | number | Set the number of schema levels in generated payload samples. Default: 8. |
The following example generates payload samples with 3 levels:
redocly.yaml
openapi:
generatedSamplesMaxDepth: 3- OpenAPI configuration - All the options you can set under
openapi - OpenAPI Specification - The official standard for API descriptions
- OpenAPI visual reference - A visual map of every part of an OpenAPI description
- Configuration options - All the other options for your project