# Title Decorator

Module
import { Title } from "@tsed/common"
Source/packages/common/src/jsonschema/decorators/title.ts

# Overview

function Title(title: string): (...parameters: any[]) => any;

# Description

Add title metadata on the decorated element.

# Example

class Model {
   @Title("title")
   id: string;
}
1
2
3
4

Will produce:

{
  "type": "object",
  "properties": {
    "id": {
       "type": "string",
       "title": "title"
    }
  }
}
1
2
3
4
5
6
7
8
9