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