OAS 3 This guide is for OpenAPI 3.0. If you use OpenAPI 2.0, see our OpenAPI 2.0 guide.
Grouping Operations With Tags
You can assign a list of
tags to each API operation. Tagged operations may be handled differently by tools and libraries. For example, Swagger UI uses
tags to group the displayed operations.
summary: Finds pets by Status
summary: Adds a new pet to the store
summary: Returns pet inventories
Optionally, you can specify
externalDocs for each tag by using the global
tags section on the root level. The tag names here should match those used in operations.
- name: pets
description: Everything about your Pets
- name: store
description: Access to Petstore orders
The tag order in the global tags section also controls the default sorting in Swagger UI. Note that it is possible to use a tag in an operation even if it is not defined on the root level.
Did not find what you were looking for? Ask the community
Found a mistake? Let us know