Closed z0mt3c closed 9 years ago
@z0mt3c I just swapped to hapi-swaggered
and then found this issue.
Did you decide not to implement this? What you proposed is how hapi-swagger
handles it:
{
description: 'Get users.',
notes: 'Returns all users.',
tags: ['api'],
plugins: {
'hapi-swagger': {
responseMessages: [
{ code: 401, message: 'Unauthorized' }
]
}
},
handler: function (request, reply) {
....
}
}
Looks like you're working on it in #7 @ 891aa89c7f7ee7772fb4a62d7d5836df014d7ce8 :+1:
May through handler.config.plugins['hapi-swaggered]? (https://github.com/hapijs/hapi/blob/master/docs/Reference.md#route-options)
"plugins - plugin-specific configuration. Provides a place to pass route-level plugin configuration. The plugins is an object where each key is a plugin name and the value is the state."