Introduction
Generate OpenAPI compliant specifications powered by openapi-metadata for you Adonis Application.
import { } from '@foadonis/openapi/decorators'
export default class {
@()
declare : number
@()
declare : string
@({ : false, : })
declare ?: string
}import { , } from '@foadonis/openapi/decorators'
import from '#models/post'
export default class {
@({ : 'List all posts' })
@({ : [] })
() {
return .query()
}
@({ : 'Create a new Post' })
@({ : })
() {
return .create()
}
}Features
✔ OpenAPI V3 specifications
✔ Fully typesafe
✔ Automatically infer types
✔ Automatically loads your controller from Adonis Router
✔ Supports Scalar, Swagger UI and Rapidoc
✔ Supports schema generation from Luxon and VineJS