# `sortRequiredPropsFirst`

By default, fields display in the order they appear in the API description.
The `sortRequiredPropsFirst` option moves required fields to the top of each schema section.

## Options

| Option | Type | Description |
| --- | --- | --- |
| sortRequiredPropsFirst | boolean | Sort required schema properties before optional ones. Default: `false`. |

## Examples

The following example shows required properties first:

```yaml
openapi:
  sortRequiredPropsFirst: true
```

## Resources

- **[OpenAPI configuration](/docs/realm/config/openapi)** - All the options you can set under `openapi`
- **[OpenAPI Specification](https://spec.openapis.org/oas/latest.html)** - The official standard for API descriptions
- **[OpenAPI visual reference](https://redocly.com/learn/openapi/openapi-visual-reference)** - A visual map of every part of an OpenAPI description
- **[Configuration options](/docs/realm/config)** - All the other options for your project
