The @nestjs/swagger
doc describes here that defining an extra model should be done this way:
@ApiExtraModels(ExtraModel)
export class CreateCatDto {}
But what is ExtraModel
here ? The doc is not very clear about this.
I ran into the same uncertainity. After googling https://github.com/nestjs/swagger/pull/355/files I understood the documentation:
import { ExtraModel } from '<filename>'
(<--- so this is lacking in the docs BTW)I guess you had the same mind-twister as me that the ApiExtraModels
-decorator acts on the model ...
Cheers, Stephan