1.3.1 • Published 3 years ago
joi-openapi-generator v1.3.1
OpenAPI generator
This is a tool for generating OpenAPI schemas from koa-joi-router definitions. It is compatible with joi 17.x.x.
Usage
You can create koa-joi-router as usual and provide some metadata in route definitions.
Router meta options:
name: string- name of the route (will be used asoperationId)group?: stringversiontags- assigned tags to the route can be matched during the build
- tags with prefix
openapi-will be included intagsproperty in the operation object - reserved tags:
ignore-route
Moreover you can provide some meta options in Joi validation schemas.
Joi meta options:
name: string- when set the type will be extracted and exported with this namedeprecated: boolean
Generator also supports many Joi native features, such as examples, description, key presence or various flags.