UNPKG

@tsed/common

Version:
50 lines 1.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Description = void 0; const schema_1 = require("@tsed/schema"); /** * Add description metadata on the decorated element. * * ::: warning * This decorator will be removed in v7. * * For v5 user, use @@Description@@ from @tsed/common instead of @tsed/swagger. * * For v6 user, use @@Description@@ from @tsed/schema instead of @tsed/common. * ::: * * ## Example * * ```typescript * class Model { * @Description("description") * id: string; * } * ``` * * Will produce: * * ```json * { * "type": "object", * "properties": { * "id": { * "type": "string", * "description": "description" * } * } * } * ``` * * @param {string} description * @decorator * @swagger * @schema * @ignore * @deprecated Since v6. Use @Description decorator from @tsed/schema instead of. */ function Description(description) { return schema_1.Description(description); } exports.Description = Description; //# sourceMappingURL=description.js.map