Open dennisvdvliet opened 8 years ago
Maybe MyApp.action_routes.each { ... }
?
Why don't we piggyback on the Sinatra way of doing it? Like here: http://stackoverflow.com/questions/13694058/how-to-get-a-list-of-all-routes-used-in-a-sinatra-app
This way we can first get all the routes of the app, and maybe print route definitions from Apiculture as well if they intersect. We can also overload Sinatra::Base#routes
and augment the stuff returned from it with Apicluture metadata if it is available for a specific route. And printing the routes will then be handled externally in any way the user sees fit. Yay?
Something this:
But a little less hacky