Adonis Open Swagger

Quick Start

Getting Started with Adonis Open Swagger

Get your AdonisJS API documentation up and running in minutes. Adonis Open Swagger automatically generates beautiful, interactive API docs from your code—no manual documentation needed.

Requirements

Before you begin, ensure you have:

  • Node.js 20+ installed
  • An AdonisJS v6 project
  • Basic familiarity with AdonisJS routing and controllers

Installation

Install and configure the package with a single command:

node ace add adonis-open-swagger

This command will:

  • Install the package automatically
  • Register the service provider
  • Create a configuration file at config/swagger.ts
  • Set up default routes for documentation

Troubleshooting

Documentation Not Showing Routes?

  1. Check decorators: Ensure your controller methods have @SwaggerInfo() decorators
  2. Verify route patterns: Check your include/exclude patterns in config/swagger.ts
  3. Restart server: Changes to decorators require a server restart

Need Help?

Last updated on