Skip to content

Latest commit

 

History

History
executable file
·
71 lines (42 loc) · 794 Bytes

api-model-property.decorator.md

File metadata and controls

executable file
·
71 lines (42 loc) · 794 Bytes

@ApiModelProperty(args?: IApiModelPropertyArgs)

Decorate property in model class.

Example:

@ApiModel({
  description: "Version description",
  name: "Version"
})
export class VersionModel {

  @ApiModelProperty({
    description: "number value",
    enum : ['1', '2']
  })
  number: number;
  ...
}

IApiModelPropertyArgs

required: boolean

Define if property is required.

  • Optional

format: string

Define format.

  • Optional

type: string

Define type of property.

  • Optional

description: string

Define description of property.

  • Optional

enum: string[]

Define enum of property.

  • Optional

model: string

Define model

  • Optional

itemType: string

Define item type.

  • Optional

example: any[]

Define example.

  • Optional