{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/2237","repository_url":"https://api.github.com/repos/swagger-api/swagger-codegen","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/2237/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/2237/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/2237/events","html_url":"https://github.com/swagger-api/swagger-codegen/issues/2237","id":136261504,"number":2237,"title":"[java] invalid java code gen for Map<String, Object>","user":{"login":"dantran","id":705836,"avatar_url":"https://avatars.githubusercontent.com/u/705836?v=3","gravatar_id":"","url":"https://api.github.com/users/dantran","html_url":"https://github.com/dantran","followers_url":"https://api.github.com/users/dantran/followers","following_url":"https://api.github.com/users/dantran/following{/other_user}","gists_url":"https://api.github.com/users/dantran/gists{/gist_id}","starred_url":"https://api.github.com/users/dantran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dantran/subscriptions","organizations_url":"https://api.github.com/users/dantran/orgs","repos_url":"https://api.github.com/users/dantran/repos","events_url":"https://api.github.com/users/dantran/events{/privacy}","received_events_url":"https://api.github.com/users/dantran/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/Client:%20Java","name":"Client: Java","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/milestones/10","html_url":"https://github.com/swagger-api/swagger-codegen/milestones/v2.1.6","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/milestones/10/labels","id":1488305,"number":10,"title":"v2.1.6","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":89,"closed_issues":301,"state":"open","created_at":"2016-01-06T20:41:39Z","updated_at":"2016-03-02T02:50:55Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2016-02-25T03:01:13Z","updated_at":"2016-03-02T03:16:27Z","closed_at":null,"body":"swagger spec is like this\r\n\r\n    \"attributes\" : {\r\n          \"type\" : \"object\",\r\n          \"additionalProperties\" : {\r\n            \"type\" : \"object\"\r\n          }\r\n      },\r\n\r\ncodegen: maps it to   Map\\<String, SomeName\\>\r\n\r\n      package xxx.SomeName;\r\n\r\n      import java.util.Objects;\r\n\r\n\r\n    @javax.annotation.Generated(value = \"class io.swagger.codegen.languages.JavaClientCodegen\",   date = \"2016-02-24T18:46:14.064-08:00\")\r\n    public class SomeName{\r\n  \r\n    @Override\r\n    public boolean equals(Object o) {\r\n      if (this == o) {\r\n        return true;\r\n      }\r\n      if (o == null || getClass() != o.getClass()) {\r\n        return false;\r\n      }\r\n      SomeName someName= (SomeName) o;\r\n      return true;\r\n    }\r\n\r\n    @Override\r\n    public int hashCode() {\r\n      return Objects.hash();\r\n    }\r\n\r\n    @Override\r\n    public String toString() {\r\n      StringBuilder sb = new StringBuilder();\r\n      sb.append(\"class SomeName{\\n\");\r\n    \r\n      sb.append(\"}\");\r\n      return sb.toString();\r\n    }\r\n\r\n    /**\r\n     * Convert the given object to string with each line indented by 4 spaces\r\n     * (except the first line).\r\n     */\r\n    private String toIndentedString(Object o) {\r\n      if (o == null) {\r\n        return \"null\";\r\n      }\r\n      return o.toString().replace(\"\\n\", \"\\n    \");\r\n    }\r\n    }\r\n\r\nWhich does not do much\r\n\r\nMy current pay load is just a map of String to primitive ( string/int)\r\n\r\nRun with 2.1.5 and 2.1.6 SNAPSHOT\r\n\r\nswagger-codegen 2.1.4 map it to Map\\<String,Object\\> but this version is not usable for me\r\n"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/comments/191034324","html_url":"https://github.com/swagger-api/swagger-codegen/issues/2237#issuecomment-191034324","issue_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/2237","id":191034324,"user":{"login":"wing328","id":934260,"avatar_url":"https://avatars.githubusercontent.com/u/934260?v=3","gravatar_id":"","url":"https://api.github.com/users/wing328","html_url":"https://github.com/wing328","followers_url":"https://api.github.com/users/wing328/followers","following_url":"https://api.github.com/users/wing328/following{/other_user}","gists_url":"https://api.github.com/users/wing328/gists{/gist_id}","starred_url":"https://api.github.com/users/wing328/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wing328/subscriptions","organizations_url":"https://api.github.com/users/wing328/orgs","repos_url":"https://api.github.com/users/wing328/repos","events_url":"https://api.github.com/users/wing328/events{/privacy}","received_events_url":"https://api.github.com/users/wing328/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T03:16:27Z","updated_at":"2016-03-02T03:16:27Z","body":"OK. I'll take a deeper look.\r\n\r\nI think it's related to adding the support of inline schema object (which automatically creates an object when \"type: object\" has neither property nor $ref."}}