@loopback/openapi-v3
Version:
Decorators that annotate LoopBack artifacts with OpenAPI v3 metadata and utilities that transform LoopBack metadata to OpenAPI v3 specifications
22 lines (21 loc) • 517 B
TypeScript
import { ControllerSpec } from '../controller-spec';
/**
* Decorate the given Controller constructor with metadata describing
* the HTTP/REST API the Controller implements/provides.
*
* `@api` can be applied to controller classes.
*
* @example
*
* ```ts
* @api({basePath: '/my'})
* class MyController {
* // ...
* }
* ```
*
* @param spec - OpenAPI specification describing the endpoints
* handled by this controller
*
*/
export declare function api(spec: Partial<ControllerSpec>): ClassDecorator;