Tags
Organize your API endpoints with tags
Tags help you organize and group related API endpoints in your documentation. They appear as collapsible sections in the Scalar UI, making it easier for users to navigate your API.
What are Tags?
Tags are metadata labels that group related endpoints together. For example, you might have tags for Users, Authentication, Payments, etc. Each tag can have a name and description that appears in your documentation.
Configuration
Define tags in your config/swagger.ts file:
import { defineConfig } from "adonis-open-swagger";
export default defineConfig({
tags: [
{
name: "Campaigns",
description: "Campaign management endpoints",
},
{
name: "Campaign Customers",
description: "Campaign customer management endpoints",
},
{
name: "Webhooks",
description: "Webhook endpoints",
},
{
name: "Authentication",
description: "User authentication and authorization",
},
{
name: "Users",
description: "User management and profile operations",
},
],
});Tag Properties
Each tag object supports the following properties:
name (required)
The display name of the tag. This appears as the section header in your documentation.
{
name: "Campaigns";
}description (optional)
A brief description of what endpoints in this tag do. Appears below the tag name in the documentation.
{
name: "Campaigns",
description: "Campaign management endpoints"
}Last updated on