{"action":"created","issue":{"url":"https://api.github.com/repos/zalando/play-swagger/issues/33","labels_url":"https://api.github.com/repos/zalando/play-swagger/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/zalando/play-swagger/issues/33/comments","events_url":"https://api.github.com/repos/zalando/play-swagger/issues/33/events","html_url":"https://github.com/zalando/play-swagger/issues/33","id":116637719,"number":33,"title":"Java code generation support","user":{"login":"benmccann","id":322311,"avatar_url":"https://avatars.githubusercontent.com/u/322311?v=3","gravatar_id":"","url":"https://api.github.com/users/benmccann","html_url":"https://github.com/benmccann","followers_url":"https://api.github.com/users/benmccann/followers","following_url":"https://api.github.com/users/benmccann/following{/other_user}","gists_url":"https://api.github.com/users/benmccann/gists{/gist_id}","starred_url":"https://api.github.com/users/benmccann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benmccann/subscriptions","organizations_url":"https://api.github.com/users/benmccann/orgs","repos_url":"https://api.github.com/users/benmccann/repos","events_url":"https://api.github.com/users/benmccann/events{/privacy}","received_events_url":"https://api.github.com/users/benmccann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-12T20:52:24Z","updated_at":"2015-11-17T08:05:37Z","closed_at":null,"body":"I'd like to contribute towards PlayJava support. I don't expect you guys to do work towards adding Java support, but hopefully you don't mind me sending PRs for it. I'm a heavy contributor to Play, so I'm willing to help generally with Play/SBT. I think that supporting both Scala and Java I think it will help in getting more people using and testing the project and I'd much rather combine efforts than make a separate project for my Java code generation.\r\n\r\nQuite a bit of the work is already being done from having Scala support. E.g. parsing the spec and generating an internal representation, which is really nice.\r\n\r\nSome notes about what I'd need to do:\r\n* Introduce SBT enum setting for Java vs Scala compilation. Should probably be added to [PlaySwagger](https://github.com/zalando/play-swagger/blob/newnaming/plugin/src/main/scala/de/zalando/play/swagger/sbt/PlaySwagger.scala)\r\n* In [SwaggerCompiler](https://github.com/zalando/play-swagger/blob/master/compiler/src/main/scala/de/zalando/play/compiler/swaggerCompiler.scala) use the flag to generate only common files in Java mode like the routes file and generate everything in Scala mode\r\n* Add generators for Java models and controllers\r\n* Add scripted tests to verify output of code generation\r\n* Have plugin automatically add spec2 and scalaz (#29) and do this only in Scala mode"},"comment":{"url":"https://api.github.com/repos/zalando/play-swagger/issues/comments/157304118","html_url":"https://github.com/zalando/play-swagger/issues/33#issuecomment-157304118","issue_url":"https://api.github.com/repos/zalando/play-swagger/issues/33","id":157304118,"user":{"login":"slavaschmidt","id":322297,"avatar_url":"https://avatars.githubusercontent.com/u/322297?v=3","gravatar_id":"","url":"https://api.github.com/users/slavaschmidt","html_url":"https://github.com/slavaschmidt","followers_url":"https://api.github.com/users/slavaschmidt/followers","following_url":"https://api.github.com/users/slavaschmidt/following{/other_user}","gists_url":"https://api.github.com/users/slavaschmidt/gists{/gist_id}","starred_url":"https://api.github.com/users/slavaschmidt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slavaschmidt/subscriptions","organizations_url":"https://api.github.com/users/slavaschmidt/orgs","repos_url":"https://api.github.com/users/slavaschmidt/repos","events_url":"https://api.github.com/users/slavaschmidt/events{/privacy}","received_events_url":"https://api.github.com/users/slavaschmidt/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T08:05:37Z","updated_at":"2015-11-17T08:05:37Z","body":"I started to use scalatra lately but not really satisfied with it. The main problem with any template engine i've found so far is that all of them are really HTML-related and not really good for source code generation. You could take a look in newnaming branch to see what i mean."}}