How to use the @tsed/swagger.Title function in @tsed/swagger

To help you get started, we’ve selected a few @tsed/swagger examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TypedProject / ts-express-decorators / test / integration / app / models / Event.ts View on Github external
import {Any, IgnoreProperty, JsonProperty, Property, PropertyType, Required} from "@tsed/common";
import {Description, Example, Title} from "@tsed/swagger";

export class Task {
  @JsonProperty() public name: string = "";

  @JsonProperty() public percent: number;
}

@Title("EventModel Title")
export class EventModel {
  @Title("iD")
  @Description("Description of event model id")
  @Example("1FDCHZKH")
  @JsonProperty()
  public id: string;

  @Required()
  @Example("example1", "2017-10-15T17:05:58.106Z")
  public startDate: Date;

  @JsonProperty()
  @Required()
  // @Format("date")
  public endDate: Date;
github TypedProject / ts-express-decorators / test / integration / app / models / Event.ts View on Github external
import {Any, IgnoreProperty, JsonProperty, Property, PropertyType, Required} from "@tsed/common";
import {Description, Example, Title} from "@tsed/swagger";

export class Task {
  @JsonProperty() public name: string = "";

  @JsonProperty() public percent: number;
}

@Title("EventModel Title")
export class EventModel {
  @Title("iD")
  @Description("Description of event model id")
  @Example("1FDCHZKH")
  @JsonProperty()
  public id: string;

  @Required()
  @Example("example1", "2017-10-15T17:05:58.106Z")
  public startDate: Date;

  @JsonProperty()
  @Required()
  // @Format("date")
  public endDate: Date;

  @JsonProperty("Name")
  @Required()
github TypedProject / ts-express-decorators / test / integration / app / models / Calendar.ts View on Github external
import {Property, Required} from "@tsed/common";
import {Description, Example, Title} from "@tsed/swagger";

export class CalendarModel {
  @Title("iD")
  @Description("Description of calendar model id")
  @Example("example1", "Description example")
  @Property()
  public id: string;

  @Property()
  @Required()
  public name: string;
}