By default, fields are rendered in the order they appear in the API description.
The sortRequiredPropsFirst
option changes the order to display required fields first in each schema section.
Option | Type | Description |
---|---|---|
sortRequiredPropsFirst | boolean | Sort the required schema properties before the optional ones. Default value is false . |
The following example configures Redoc to show required properties first:
redocly.yaml
openapi:
sortRequiredPropsFirst: true
- 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 property ordering principles
- Configuration options - Explore other project configuration options for comprehensive documentation customization