Last updated

OpenAPI extensions

OpenAPI supports extensions to the specification.

The list of extensions supported in OpenAPI by Redoc is as follows:

  • x-additionalPropertiesName - Display a field name for an additionalProperties description.
  • x-assertionType - Specify the OAuth Flow assertion type for the operation.
  • x-badges - Add visible badges as indicators to API operations.
  • x-codeSamples - Provide the code sample to display for an operation.
  • x-displayName - Use a human-friendly display name for a tag.
  • x-enumDescriptions - Readable labels for enum values.
  • x-hideReplay - Disable the Replay for the specific operation.
  • x-metadata - Add custom metadata at the top of the info section.
  • x-rbac - Control access to OpenAPI objects.
  • x-traitTag - Indicate tags that label operations rather than grouping them.
  • x-tagGroups - Higher-level grouping for tags, used in the sidebar.
  • x-tags - Add individual schemas to navigation sections alongside operations.
  • x-summary - Add short summary of the response.
  • x-webhooks - Add webhooks support to older API description (3.0 or earlier).

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.

Resources