Skip to content
Last updated

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.

Options

OptionTypeDescription
generatedSamplesMaxDepthnumberSet the number of levels to generate payload samples. Default value is 8.

Examples

The following example produces automatically generated payload samples with 3 levels:

redocly.yaml
openapi:
  generatedSamplesMaxDepth: 3

Resources

  • 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