trailsjs / sails-swagger

Swagger integration for sails.js
107 stars 47 forks source link

Add support for pluralized routes, body parameters, and nested schemas #20

Closed grocky closed 8 years ago

grocky commented 8 years ago

When models are singular (e.g. User.js) and routes are plural (e.g. /users) the definitions in the generated swagger document are not referenced in route responses.

This uses the pluralize library to derive the singular case when needed.

This adds body parameters to the swagger document for POST and PUT requests.

grocky commented 8 years ago

Hi @tjwebb, I realize this hook is going to be ported over to trails. It would be great to get this merged in if it looks ok to you.

Also, I'd be happy to help out on trailsjs/trailpack-swagger! I'd like to implement some parts of the spec that are missing in this project.

moisesrodriguez commented 8 years ago

:+1:

tjwebb commented 8 years ago

@grocky feel free to get in touch with @konstantinzolotarev about the trailpack-swagger project: https://github.com/trailsjs/trailpack-swagger

You can also join our gitter: https://gitter.im/trailsjs/trails.

Thanks for the PR!