DEV Community

Discussion on: Adding live documentation to YOUR REST API with Swagger and Nest.js

Collapse
 
emlathang007 profile image
Rainbow007

i don't know how to show a custom type like below:

type ExamDto{
exam1: string;
exam2: number;
}

@ApiModelProperty()
id: ExamDto[];

Can you show me how to display detail id with properties of ExamDto ? Thank a lots <3

Collapse
 
softchris profile image
Chris Noring

can't be done on types I'm afraid. It's impossible to reflect Types on TypeScript in runtime. If you can, I recommend using classes