UNPKG

@sleekify/sleekify

Version:

A TypeScript decorator driven approach for developing web applications.

27 lines (26 loc) 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Components = void 0; const Annotation_1 = require("./Annotation"); /** * You may apply this decorator to your resource class to annotate the class * with reusable OpenAPI components which may be referenced in your OpenAPI * specification. These components include things like path parameters, query * parameters, schemas, and headers. You may provide a path such as * "#/components/schemas/Pet" where ever the OpenAPI specification accepts a * reference object. * * Once you define a reusable component with this decorator, that component may * be referenced by the same resource class or any of your other resource * classes. * * @param componentsObject The OpenAPI components object definition */ function Components(componentsObject) { return function (target) { Annotation_1.Annotation.set(target, undefined, Components, componentsObject); }; } exports.Components = Components; ; Annotation_1.Annotation.register(Components, 'b7e07cfe-e8c3-46c6-b6c7-6f8c26354d89');