This package contains:
- Decorators that describe LoopBack artifacts as OpenAPI 3.0.0 metadata.
- Utilities that transfer LoopBack metadata to OpenAPI 3.0.0 specifications.
The package has functions described above for LoopBack controller classes. Decorators apply REST api mapping metadata to controller classes and their members. And utilities that inspect controller classes to build OpenAPI 3.0.0 specifications from REST API mapping metadata.
Functions for more artifacts will be added when we need.
npm install --save @loopback/openapi-v3
Currently this package only has spec generator for controllers. It generates
OpenAPI specifications for a given decorated controller class, including
Here is an example of calling function
getControllerSpec to generate the
myControllerSpec will be:
For details of how to apply controller decorators, please check http://loopback.io/doc/en/lb4/Decorators.html#route-decorators
npm test from the root folder.
See all contributors.