So we have a task to produce documentation for a REST API we are building. We are using Grails and it's all nicely defined in UrlMappings
but that doesn't generate a documentation the way we want.
We thought of using reflection to extract the mappings into some format that we can manipulate through code.
There's also a possibility of maybe parsing the UrlMappings
as a text file and produce some data format that we can manipulate.
For the reflection bit, can we extract info from Closures - such as properties, methods, etc - in Groovy?
Any other ideas would be appreciated.