Closed Disane87 closed 7 years ago
You can get all registered routes from the router: Router::getRoutes() : Route[]
https://github.com/slimphp/Slim/blob/3.x/Slim/Router.php#L237
You can use those to generate something you like.
Even with expected params?
Mit freundlichen Grüssen / Kind regards Marco Franke
\ Von meinem iPhone gesendet
Am 03.09.2016 um 20:01 schrieb Martijn Wennink notifications@github.com:
You van het All registered routes from the router
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
oh sorry, didnt noticed you had some links. Sorry for my first respond. Will check you link soon :)
I don't think there's a way of doing it automagically - but if this is something you're going to do regularly, you could use a config array to register your routes and then parse this array in a function to write your docs? Admittedly a lot longer than a quick fix you may have been hoping for but once done once, should be reusable in other projects?
Is there any way to auto generate an overview of all registered "endpoints"? I don't want to write an API.Doc for myself, instead I want slim to create that for me.
Is there any chance to get a proper overview?