You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Extra models#
In order to define additional models that should be inspected by Swagger module, use the @ApiExtraModels() decorator:
@ApiExtraModels(ExtraModel)
export class CreateCatDto {}
Is not working, and I also get some warning 'MyPet' was used before it was defined.eslint@typescript-eslint/no-use-before-define
Only way is working is defining in main.ts on SwaggerModule.createDocument(app, options,{ extraModels: []});
What I want to have is an response formed by some metadata and entity
I think what was confusing me is this line from the documentation Both Cat and Dog must be defined as extra models using the @ApiExtraModels() decorator (at the class-level).
I'm submitting a...
[ ] Regression
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
How is this supposed to work (paste from documentation)
https://docs.nestjs.com/recipes/swagger#extra-models
Is not working, and I also get some warning 'MyPet' was used before it was defined.eslint@typescript-eslint/no-use-before-define
Only way is working is defining in main.ts on
SwaggerModule.createDocument(app, options,{ extraModels: []});
What I want to have is an response formed by some metadata and entity
Thanks
The text was updated successfully, but these errors were encountered: