onlyRequiredInSamples
By default, the generated request samples include all available fields. The onlyRequiredInSamples
option restricts the request samples to include required fields only. Use this option if you have a large number of optional fields that can make request samples difficult to read.
Options
Option | Type | Description |
---|---|---|
onlyRequiredInSamples | boolean | Show only the required fields in request samples. Default value is false . |
Examples
The following example produces request samples that show the required properties only:
redocly.yaml
openapi: onlyRequiredInSamples: true
Related options
- openapi - Learn more about using
openapi
configuration.