#intercepting for swagger
23 messages · Page 1 of 1 (latest)
returning sample like this
i need default response like {data: Response, status: whatever}
You can define response types for the swagger
can u give me some example pls
Have you read the docs?
yes
So you've seen this: https://docs.nestjs.com/openapi/operations#responses where you can define responses
Why not?
its giving error
What's the error?
What is Response?
I don't think you are referencing the right Response in your UserEntity
what should i do
Actually import your Response interface instead of using the global Response type (which I think belongs to fetch)
Also, as this will be an issue, generics are not properly supported via reflection, and you'll probably not get the right values to populate in your swagger unless you directly define them all
:(
This is literally in the docs though, WE make an explicit mention about generics