im trying to figure out that there is option to hide some fields by class serialize interceptor and see these excluded fields in swagger?
Now i have my own dectorator to serialize output but everytime i must write own DTO to transform response and create response type for swagger.
I speaking about scenario where we have product entity and for not logged user on route
/products/xyz/
response will be
{
id: 1,
name: “some product”,
}
and for logged user which bought product
/user/products/
response will be
[
{
id: 1,
name: “some product”,
file: “https://someurl”
}
]