@hangxingliu/ts-openapi
TypeScript icon, indicating that this package has built-in type declarations

3.0.3 • Public • Published

Typescript OpenAPI Utils

ci

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]);

See test/project/index.ts

TODO

  • [ ] Add documents, js2doc
  • [ ] Add unit tests for TypeORM

Readme

Keywords

none

Package Sidebar

Install

npm i @hangxingliu/ts-openapi

Weekly Downloads

2

Version

3.0.3

License

Apache-2.0

Unpacked Size

187 kB

Total Files

80

Last publish

Collaborators

  • hangxingliu