theoomoregbee / sails-hook-swagger-generator

A tool to help generate Swagger specification documentation based on OAS 3.0 for Sails APIs
MIT License
78 stars 33 forks source link

Customizing Responses #35

Closed RotemBot closed 4 years ago

RotemBot commented 6 years ago

How can I customize responses? Change error codes, display custom error messages and show the structure of a returned object.

For now, all of my responses in Swagger UI look like this: image

sudograce commented 5 years ago

I have the same problem! @theo4u, will be glad to your help!

sudograce commented 5 years ago

@theo4u Could we have possibility to customize (override) model parameters as we do it in body?

theoomoregbee commented 5 years ago

yeah, need to find a good way to allow users to pass in these params for response here:https://github.com/theo4u/sails-hook-swagger-generator/blob/a5e58a645333d5c8b5e1026acc83de834f1888a6/lib/generators.js#L264

sudograce commented 5 years ago

@theo4u Can we expect that you implement it in the near future?

theoomoregbee commented 5 years ago

@sudograce yeah very soon, trying to create space for most of the fixes

theoomoregbee commented 4 years ago

should be fixed in #58