3.0.3 • Published 3 years ago
@hangxingliu/ts-openapi
Licence
Apache-2.0
Version
3.0.3
Deps
3
Size
183 kB
Vulns
0
Weekly
0
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