Skip to content
Last updated

The jsonSamplesExpandLevel option sets the default expand level for JSON payload samples (response and request body). The maximum supported value is '+Infinity'. It can also be configured as a string with the special value "all" that expands all levels.

Options

OptionTypeDescription
jsonSamplesExpandLevelnumber | string | 'all'Sets the default expand level for JSON payload samples. Default value is 2.

Examples

The following example expands the JSON payload samples to a depth of five levels.

redocly.yaml
openapi:
  jsonSamplesExpandLevel: 5

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 JSON sample expansion configuration
  • Configuration options - Explore other project configuration options for comprehensive documentation customization