Goal
- TypeScript controllers and models as the single source of truth for your API
-
A valid OpenAPI (formerly Swagger) spec is generated from your controllers and models, including:
- Paths such as
GET /users - Definitions based on TypeScript interfaces and classes
- Required and optional fields inferred directly from TypeScript
- JSDoc support for descriptions and other text metadata
- Paths such as
- Routes are generated for your middleware of choice with request validation built in
What's Here
tsoa-next continues the original
tsoa
project and its contributor-built foundation. Historical migration references may still point upstream where features first landed.
- API Reference generated from the packages in this repository
- Guides and tutorials hosted from this repository
- Repository docs for contribution and project context
Getting Started
npm install tsoa-next reflect-metadata
The published package includes the CLI entrypoint as tsoa, plus the @tsoa-next/runtime and @tsoa-next/cli packages used internally by the monorepo.
import { Controller, Get, Route } from 'tsoa-next';
@Route('users')
export class UsersController extends Controller {
@Get('{id}')
public async getUser(id: number) {
return { id };
}
}
tsoa spec
tsoa routes
Current Documentation Layout
- Landing page: Site home
- API reference: Reference docs
- Guides: Getting started guide