OpenAPI 3.1.0 · AdonisJS · TypeScript

Your API docs,
written by your code.

AdopenAPI reads your AdonisJS routes and TypeScript Abstract Syntax Tree to generate a complete OpenAPI 3.1.0 spec — automatically. No decorators. No comments. No manual schemas. Ever.

One-time payment · Lifetime access · No subscription

UsersController.ts
export default class UsersController {
  async index(): Promise<User[]> {
    return User.all()
  }

  async show({ params }: HttpContext): Promise<User> {
    return User.findOrFail(params.id)
  }
}

// ↑ That's literally all you write.
// AdopenAPI generates the full spec below ↓
0
Decorators needed
OpenAPI 3.1
Latest spec
100%
TypeScript-native
AST
Powered parser
Routes supported

Stop writing
what TypeScript already knows.

Every type annotation you write is documentation waiting to be published. AdopenAPI reads it so you don't have to repeat yourself.

Before Without AdopenAPI — manual OpenAPI
// 🔴 You write all of this BY HAND

const userSchema = {
  type: 'object',
  properties: {
    id:    { type: 'number' },
    name:  { type: 'string' },
    email: { type: 'string', format: 'email' },
  }
}

const spec = {
  paths: {
    '/users': {
      get: {
        responses: {
          '200': {
            content: {
              'application/json': {
                schema: {
                  type: 'array',
                  items: { $ref: '#/components/schemas/User' }
                }
              }
            }
          }
        }
      }
    }
  }
}
Duplicated work — schema drifts from code. Every model change requires updating the spec manually.
~40+ lines of boilerplate per endpoint
After With AdopenAPI — zero config
// ✅ Just write your controller normally

export default class UsersController {

  async index(): Promise<User[]> {
    return User.all()
  }

  async show({ params }: HttpContext): Promise<User> {
    return User.findOrFail(params.id)
  }

}



// AdopenAPI reads `: Promise<User[]>`
// → introspects the User model fields
// → generates the full OpenAPI spec
// → serves it at /api/docs
Single source of truth — always in sync. Update your model, the spec updates automatically.
0 extra lines — spec generated automatically

Everything you need.
Nothing you don't.

AdopenAPI is surgical — it does one thing exceptionally well and integrates into your existing AdonisJS workflow without friction.

🔍

AST-Powered Analysis

Parses your TypeScript source files using a full AST parser — not regex hacks. It understands generics, intersections, unions, and complex type hierarchies.

🛣️

Route-Aware Generation

Reads your AdonisJS router config to discover all endpoints, their HTTP verbs, path parameters, and controller method bindings automatically.

Return Type Inference

Introspects your controller method return types — including Lucid models, custom interfaces, and utility types — and converts them to JSON Schema automatically.

📐

OpenAPI 3.1.0 Compliant

Generates spec that fully conforms to the OpenAPI 3.1.0 standard, including proper $ref usage, component schemas, and JSON Schema vocabulary.

🔄

Always In Sync

Because the spec is generated from your actual code, it can never drift out of date. Change a model field and the spec reflects it on the next request.

📦

Zero Runtime Overhead

Spec generation happens at startup or on-demand. Your production request path is completely unaffected — no middleware, no reflection, no performance cost.

🎛️

VineJS Request Validation

If you use VineJS for request validation, AdopenAPI reads your validators and maps them to OpenAPI request body schemas and query parameter definitions.

🖥️

Swagger UI Included

Serves a beautiful Swagger UI documentation explorer out of the box. Your team gets a live, interactive API reference the moment they open the browser.

🔧

Fully Configurable

Override generated schemas, add metadata, exclude routes, or extend with custom transformers — full control when you need it, sensible defaults when you don't.

Three steps.
One command.

AdopenAPI plugs into your AdonisJS project with a single install. No config file needed to get started.

1
Install

Add the package to your project

Install AdopenAPI via npm and configure it with the built-in Ace command. It registers itself as an AdonisJS provider automatically.

$ node ace add @melchyore/adonis-open-api
2
Write

Write controllers as you normally would

No changes to your workflow. Write your AdonisJS controllers with proper TypeScript return types — which you should be doing anyway. AdopenAPI does the rest.

// app/controllers/posts_controller.ts
export default class PostsController {
  async index(): Promise<Post[]> {
    return Post.query().preload('author')
  }
  async store({ request }: HttpContext): Promise<Post> {
    const data = await request.validateUsing(createPostValidator)
    return Post.create(data)
  }
}
3
Ship

Your docs are live at /api/docs

Start your AdonisJS server and navigate to /api/docs. A fully interactive Swagger UI powered by your live OpenAPI 3.1.0 spec is ready for your team, clients, or CI pipeline.

$ node ace serve --hmr

# → Routes analyzed: 24
# → Schemas generated: 8
# → OpenAPI spec ready at /api/docs
# → Swagger UI at /api/docs/ui

What developers are saying

Early adopters who made the switch from manual schema writing.

★★★★★

"We had 40+ endpoints with hand-written swagger. The schemas were always wrong. AdopenAPI replaced all of it in an afternoon and our docs are finally accurate."

TK
Thomas K.
Senior Backend Engineer
★★★★★

"The AST-based approach is brilliant. It actually understands my TypeScript types — not just simple primitives but generics, unions, everything. Absolutely worth the price."

ML
Marie L.
Fullstack Developer, Freelance
★★★★★

"The VineJS integration alone saved us hours. Our request body schemas are generated directly from our validators. No duplication, no drift, no maintenance."

RC
Rayan C.
Tech Lead, SaaS startup

We've got your back.

Multiple ways to get help — from instant self-service docs to direct personal support from the author.

✉️

Priority Email Support

Got a bug, a specific use case, or something that doesn't work as expected? Email us directly and get a personal response from the author — not a bot.

support@adopenapi.dev
📚

Full Documentation

Comprehensive guides covering installation, configuration, type support, VineJS integration, advanced overrides, and real-world examples. Updated with every release.

Read the docs

GitHub Issues

Found a bug? Have a feature request? Open an issue on GitHub. The repository is publicly tracked so you can follow fixes and improvements in real time.

Open an issue
💬

Community Discord

Join the AdonisJS community Discord server. Ask questions, share your setup, and get help from other AdopenAPI users and the broader AdonisJS ecosystem.

Join Discord
< 24h
Email response time (business days)
14 days
Money-back guarantee, no questions asked
Lifetime
Updates included with your purchase
1 person
Direct access to the author

One price.
Yours forever.

No subscriptions. No per-seat fees. No license renewals. Pay once and use AdopenAPI on every project you'll ever build.

AdopenAPI — Lifetime License
Everything you need, once.
99

One-time payment · No recurring fees

  • Unlimited projects & domains — use on every AdonisJS app you build
  • Full OpenAPI 3.1.0 spec generation from TypeScript return types
  • AST-powered route analysis — reads your actual router config
  • VineJS validator integration for request body schemas
  • Built-in Swagger UI served from your AdonisJS app
  • All future updates included — buy once, get everything
  • Priority email support — response within 24h
  • Source code access — no black-box dependencies
Get AdopenAPI — €99 one-time

Secure payment via Paddle · Instant delivery

14-day money-back guarantee. If AdopenAPI doesn't work for your AdonisJS project, email us within 14 days for a full refund — no questions asked.

Questions answered.

AdopenAPI is built for AdonisJS v6 and requires TypeScript 5+. It leverages the latest AdonisJS provider system and the modern module-based router. AdonisJS v5 is not supported.
No — that's the whole point. Zero decorators required. AdopenAPI reads your TypeScript return types directly through AST analysis. If you have proper TypeScript types on your controller methods (which is good practice anyway), you get OpenAPI documentation for free.
AdopenAPI handles primitives, arrays, objects, Lucid models, custom interfaces, type aliases, generics (Promise<T>, Paginator<T>), union types, intersection types, and optional properties. The AST parser gives it a deep understanding of TypeScript's type system.
AdopenAPI detects AdonisJS auth middleware applied to routes and automatically adds the appropriate security requirements to those endpoints in the OpenAPI spec. Bearer token, API key, and session-based auth schemes are supported through the configuration.
Yes. You can override any generated schema, add global metadata (title, description, servers, contact), exclude specific routes, add custom tags, or write schema transformers that run after generation. The escape hatch is always there — but most projects never need it.
Completely safe. The AST analysis happens at startup (or on-demand), not on every request. The generated spec is cached in memory. Your production request path is untouched — no middleware wrapping, no runtime reflection, no overhead whatsoever.
The €99 license covers unlimited projects for a single developer. For teams of 3+, a team license is available — contact us for pricing. All licenses include source code, future updates, and priority support.
14-day money-back guarantee, no questions asked. If AdopenAPI doesn't work for your project within 14 days of purchase, email us and we'll refund you in full. We want you to be confident before you buy.

Stop writing docs.
Start shipping code.

Your TypeScript types already describe your API. It's time your documentation reflected that.

14-day money-back guarantee · Instant delivery · No subscription