ad-on-is / adonis-autoswagger

Auto-Generate swagger docs for AdonisJS
MIT License
129 stars 41 forks source link

How to modify the Response Body data #136

Closed rnwonder closed 2 weeks ago

rnwonder commented 2 weeks ago

Thank you for this library It works smoothly

However, I just need clarification on how to modify the data returned in @responseBody

so I have something like this

@responseBody 200 - {"message": "Order status updated successfully", "order": <Order>.with(seller)}

This returns all the data in Order Model and Seller Model

What I want is to like modify it so it returns specific data like only id, quantity, status and seller for Order

then for seller instead of all the data in Seller Model order.seller should have only firstName, lastName and the likes

rnwonder commented 2 weeks ago

Seen it on the docs. Apologies