Hi there,
Picking up the discussion here after having some time to think on how this might best be implemented.
I think I've decided that a traditional swagger code generator, like the ones that swagger-codegen uses, probably isn't a good option because it would only be used once in all practicality.
After researching the ways in which Play can be integrated with Swagger I think there are two choices here.
We could either:
Enable swagger spec generation from written code: I'm not quite sure exactly how we'd do this yet, but I can imagine some kind of data structure in the REST helper that could be used to generate a Swagger spec from the API.
or
Consume a swagger spec and generate a Lift RestHelper from it: I think this would be significantly easier. I'm thinking we'd use a macro to ultimately implement this. I think in code it would look something like...
@SwaggerAPI("/path/to/swagger/file")
object APIv1 extends RestHelper
... and the macro would take care of defining the API models and the rest of the actual API. To the rest of the Lift application the APIv1 object would look like a totally normally defined RestHelper.
What do y'all think about the above?