Title
@tsed/schema
Usage
typescript
import { Title } from "@tsed/schema";
See /packages/specs/schema/src/types/decorators/common/title.ts.
Overview
ts
function Title(title: string): (...args: any[]) => any;
Description
Add title metadata on the decorated element.
WARNING
For v6 user, use Title from @tsed/schema instead of @tsed/platform-http.
Example
typescript
class Model {
@Title("title")
id: string;
}
Will produce:
json
{
"type": "object",
"properties": {
"id": {
"type": "string",
"title": "title"
}
}
}