OpenAPI extensions
OpenAPI supports extensions to the specification.
The list of extensions supported in OpenAPI by Redoc is as follows:
- x-codeSamples - Provide the code sample to display for an operation.
- x-tagGroups - Higher-level grouping for tags, used in the sidebar.
- x-badges - Add visible badges as indicators to API operations.
- x-displayName - Use a human-friendly display name for a tag.
- x-traitTag - Indicate tags that label operations rather than grouping them.
- x-enumDescriptions - Readable labels for enum values.
- x-additionalPropertiesName - Display a field name for an
additionalProperties
description. - x-tags - Add individual schemas to navigation sections alongside operations.
- x-metadata - Add custom metadata at the top of the info section.
- x-hideReplay - Disable the Replay for the specific operation.
- x-summary - Add short summary of the response.
Additionally, the following extensions are supported for the older OpenAPI 2.x format:
- x-examples - Add custom examples to a request (make OpenAPI 3
example(s)
keywords available) - x-nullable - Mark schemas as nullable in the API documentation.
- x-servers - Add one or more target hosts for the API.