Tags are used in Redoc to group operations together to help users to navigate the API reference. Mark the tags that serve a purpose other than navigation as "traits". These tags:
- are displayed at the end of the documentation, including in the navigation
- show up with their description text
- don't include operations in their section
Apply the x-traitTag
to any Tag item to indicate it is a trait tag rather than a navigation tag.
Option | Type | Description |
---|---|---|
x-traitTag | boolean | Set to true to indicate that this tag is not used for the purpose of navigation grouping. Default is false . |
Consider an OpenAPI description where operations that return collections are tagged "Collection" in addition to their section tags. The following example marks the Collection tag as a trait. This displays the tag's heading and description without repeating the endpoints in that section:
openapi: 3.1.0
tags:
- name: Users
- name: Orders
- name: Collection
description: |
All collections are returned with the data in a field named `payload`, using JSON format.
Use the `page` query parameter to advance between pages (default value is 1).
x-traitTag: true
- x-displayName extension - Give tags better human-readable display names for improved navigation and user experience
- x-tagGroups extension - Group tags into logical sections for improved navigation structure and organization
- Show extensions configuration - Control which extensions are included in your API reference documentation for optimal presentation
- OpenAPI configuration settings - Complete reference for all available OpenAPI configuration options and customization settings
- Supported OpenAPI extensions - Complete list of all OpenAPI extensions supported by Redocly for enhanced API documentation