z0mt3c / node-restify-swagger

Swagger generation for REST-Services built with node-restify and node.js based on validation schemas of node-restify-validation.
MIT License
29 stars 16 forks source link

How can I add responses documentation? #20

Open bbuhler opened 9 years ago

bbuhler commented 9 years ago

I tried:

app.server.get
  (
    {
      url: '/login',
      swagger:
      {
        summary: 'get session',
        docPath: 'Login'
      },
      validation: {},
      responses:
      {
        200: { schema: { type: 'SessionModel' } }
      }
    },
    function(req, res, next)
    {
      .....

Is it possible to declare the status responses + response model with node-restify-swagger?

If yes, how? I don't find anything about it.