UNPKG

@sleekify/sleekify

Version:

A TypeScript decorator driven approach for developing web applications.

21 lines (20 loc) 796 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Schema = void 0; const Annotation_1 = require("./Annotation"); /** * You may apply this decorator to your resource class or the resource class's * methods to provide the default schema object for requests and responses. If * this is present on both the class and a class method, then the decorator on * the method will have higher precedence. * * @param schemaObject The optional OpenAPI schema object definition */ function Schema(schemaObject) { return function (target, propertyKey, _descriptor) { Annotation_1.Annotation.set(target, propertyKey, Schema, schemaObject); }; } exports.Schema = Schema; ; Annotation_1.Annotation.register(Schema, '633be8e8-2058-44f0-bf9a-379be0856b0d');