Skip to content
Last updated

jsonSamplesDepth

The jsonSamplesDepth option sets the default depth for rendering JSON samples in the protocol binding panels (such as channel, operation, and message bindings) of your AsyncAPI documentation. Use this option to set the depth to a comfortable default value for the data structure of your API.

Options

OptionTypeDescription
jsonSamplesDepthnumberSets the default depth for rendering JSON samples. Default: 3.

Examples

The following example sets the depth for JSON samples to five levels.

redocly.yaml
asyncapi:
  jsonSamplesDepth: 5

Using this setting, the samples display up to five levels of nested data.

Resources

  • AsyncAPI configuration - Complete guide to AsyncAPI configuration options for customizing API reference documentation
  • AsyncAPI Specification - Official AsyncAPI Specification documentation for understanding event-driven API description standards
  • Layout - Control the layout of the AsyncAPI documentation page to complement how samples are displayed
  • Configuration options - Explore other project configuration options for comprehensive documentation customization