hapi-swaggered icon indicating copy to clipboard operation
hapi-swaggered copied to clipboard

FR: Allow to preprocess description (and perhaps others) field before returning it.

Open mwawrusch opened this issue 9 years ago • 0 comments

Basically, what I would like to do is modifying the description of a route before swagger sends it out, to add some information that can be automatically generated but is not exposed in swagger, like a sentence to remind users that they can paginate through a collection, that kind of stuff.

So for example, the description of the route has "Returns list of customers", and there would be a filter function provided by us; function (routeData...) { return routeData.description + " You can paginate through...." ; }

mwawrusch avatar Oct 21 '15 14:10 mwawrusch