Swagger is a de facto standard for automatically generating JSON descriptions of REST API and for generating UI for invoking/experimenting with REST APIs. Swagger codegen is good but not terrific. Alternatives would be welcome. I recommend layering your code gen over swagger.