mac- / ratify

A Hapi plugin for validating the schema of path, query, request body, and response body params using JSON-schema
MIT License
71 stars 27 forks source link

Add a swagger hook to filter routes #33

Open dschenkelman opened 9 years ago

dschenkelman commented 9 years ago

Pretty useful if you want to hide some things that are available but don't want documented yet. Also having a function allows you to decide if you want it displayed in a local env but not prod.

Would require changing: https://github.com/mac-/ratify/blob/master/lib/SwaggerManager.js#L313 with a filter before the forEach.

I see it's already here: https://github.com/mac-/ratify/blob/master/lib/SwaggerManager.js#L13-L18 but does not allow runtime checks.