{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/2924","repository_url":"https://api.github.com/repos/swagger-api/swagger-codegen","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/2924/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/2924/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/2924/events","html_url":"https://github.com/swagger-api/swagger-codegen/issues/2924","id":155956929,"number":2924,"title":"allOf needs `$ref` first","user":{"login":"fehguy","id":249413,"avatar_url":"https://avatars.githubusercontent.com/u/249413?v=3","gravatar_id":"","url":"https://api.github.com/users/fehguy","html_url":"https://github.com/fehguy","followers_url":"https://api.github.com/users/fehguy/followers","following_url":"https://api.github.com/users/fehguy/following{/other_user}","gists_url":"https://api.github.com/users/fehguy/gists{/gist_id}","starred_url":"https://api.github.com/users/fehguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fehguy/subscriptions","organizations_url":"https://api.github.com/users/fehguy/orgs","repos_url":"https://api.github.com/users/fehguy/repos","events_url":"https://api.github.com/users/fehguy/events{/privacy}","received_events_url":"https://api.github.com/users/fehguy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/labels/Workaround%20available","name":"Workaround available","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/milestones/9","html_url":"https://github.com/swagger-api/swagger-codegen/milestones/v2.2.0","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/milestones/9/labels","id":1375944,"number":9,"title":"v2.2.0","description":"","creator":{"login":"fehguy","id":249413,"avatar_url":"https://avatars.githubusercontent.com/u/249413?v=3","gravatar_id":"","url":"https://api.github.com/users/fehguy","html_url":"https://github.com/fehguy","followers_url":"https://api.github.com/users/fehguy/followers","following_url":"https://api.github.com/users/fehguy/following{/other_user}","gists_url":"https://api.github.com/users/fehguy/gists{/gist_id}","starred_url":"https://api.github.com/users/fehguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fehguy/subscriptions","organizations_url":"https://api.github.com/users/fehguy/orgs","repos_url":"https://api.github.com/users/fehguy/repos","events_url":"https://api.github.com/users/fehguy/events{/privacy}","received_events_url":"https://api.github.com/users/fehguy/received_events","type":"User","site_admin":false},"open_issues":216,"closed_issues":466,"state":"open","created_at":"2015-10-25T23:43:33Z","updated_at":"2016-06-14T08:54:10Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-05-20T12:55:37Z","updated_at":"2016-06-14T09:52:34Z","closed_at":null,"body":"##### Description\r\n\r\nWhen generating a library with an `allOf` construct in a model definition, the codegen seems to have problems if the first array item is an inline object vs. a model reference\r\n\r\n##### Swagger-codegen version\r\n\r\n2.1.6\r\n\r\n##### Command line used for generation\r\n\r\nOccurs on java with this trace:\r\n\r\n```\r\nException in thread \"main\" java.lang.RuntimeException: Could not process model 'XXXX'\r\n\tat io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:244)\r\n\tat io.swagger.codegen.cmd.Generate.run(Generate.java:223)\r\n\tat io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:36)\r\nCaused by: java.lang.ClassCastException: io.swagger.models.ModelImpl cannot be cast to io.swagger.models.RefModel\r\n\tat io.swagger.codegen.DefaultCodegen.fromModel(DefaultCodegen.java:955)\r\n\tat io.swagger.codegen.languages.JavaClientCodegen.fromModel(JavaClientCodegen.java:541)\r\n\tat io.swagger.codegen.DefaultGenerator.processModels(DefaultGenerator.java:799)\r\n\tat io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:237)\r\n````"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/comments/225833864","html_url":"https://github.com/swagger-api/swagger-codegen/issues/2924#issuecomment-225833864","issue_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/2924","id":225833864,"user":{"login":"alecha","id":5002866,"avatar_url":"https://avatars.githubusercontent.com/u/5002866?v=3","gravatar_id":"","url":"https://api.github.com/users/alecha","html_url":"https://github.com/alecha","followers_url":"https://api.github.com/users/alecha/followers","following_url":"https://api.github.com/users/alecha/following{/other_user}","gists_url":"https://api.github.com/users/alecha/gists{/gist_id}","starred_url":"https://api.github.com/users/alecha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alecha/subscriptions","organizations_url":"https://api.github.com/users/alecha/orgs","repos_url":"https://api.github.com/users/alecha/repos","events_url":"https://api.github.com/users/alecha/events{/privacy}","received_events_url":"https://api.github.com/users/alecha/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T09:52:34Z","updated_at":"2016-06-14T09:52:34Z","body":"same issue here, did you solve?"}}
{"actor":{"display_login":"alecha"}}