@nestjs/swagger
Version:
Nest - modern, fast, powerful node.js web framework (@swagger)
54 lines (45 loc) • 955 B
text/typescript
import { ApiProperty } from '../../../../lib';
import { LettersEnum } from '../dto/pagination-query.dto';
export class Cat {
({ example: 'Kitty', description: 'The name of the Cat' })
name: string;
({ example: 1, minimum: 0, description: 'The age of the Cat' })
age: number;
({
example: 'Maine Coon',
description: 'The breed of the Cat'
})
breed: string;
({
name: '_tags',
type: [String]
})
tags?: string[];
({
type: String,
isArray: true
})
urls?: string[];
({
name: '_options',
type: 'array',
items: {
type: 'object',
properties: {
isReadonly: {
type: 'string'
}
}
}
})
options?: Record<string, any>[];
({
enum: LettersEnum
})
enum: LettersEnum;
({
enum: LettersEnum,
isArray: true
})
enumArr: LettersEnum;
}