3.0.3 • Published 1 year ago
@hangxingliu/ts-openapi v3.0.3
Typescript OpenAPI Utils
npm install @hangxingliu/ts-openapi
# or
yarn add @hangxingliu/ts-openapi
Usage
Most cases start from OpenApiDocument
,
Then adding api by OpenApiDocument#editPath
,
and describe the api by method chains.
In a nutshell:
const docs = new OpenAPIDocumentBuilder();
docs.editPath('get', '/user/:userId')
.tags(["User"])
.jsonResponse('200', [UserEntity]);
TODO
- Add documents, js2doc
- Add unit tests for TypeORM