{"action":"created","issue":{"url":"https://api.github.com/repos/zalando-stups/swagger-codegen-tooling/issues/7","labels_url":"https://api.github.com/repos/zalando-stups/swagger-codegen-tooling/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/zalando-stups/swagger-codegen-tooling/issues/7/comments","events_url":"https://api.github.com/repos/zalando-stups/swagger-codegen-tooling/issues/7/events","html_url":"https://github.com/zalando-stups/swagger-codegen-tooling/issues/7","id":91167976,"number":7,"title":"Builder Pattern for generated models","user":{"login":"tknerr","id":365744,"avatar_url":"https://avatars.githubusercontent.com/u/365744?v=3","gravatar_id":"","url":"https://api.github.com/users/tknerr","html_url":"https://github.com/tknerr","followers_url":"https://api.github.com/users/tknerr/followers","following_url":"https://api.github.com/users/tknerr/following{/other_user}","gists_url":"https://api.github.com/users/tknerr/gists{/gist_id}","starred_url":"https://api.github.com/users/tknerr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tknerr/subscriptions","organizations_url":"https://api.github.com/users/tknerr/orgs","repos_url":"https://api.github.com/users/tknerr/repos","events_url":"https://api.github.com/users/tknerr/events{/privacy}","received_events_url":"https://api.github.com/users/tknerr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-06-26T06:19:28Z","updated_at":"2015-07-02T10:10:17Z","closed_at":null,"body":"It would be awesome (and low hanging fruit probably ;-)) if the generated models could be contructed via Builder pattern, e.g. `BlogPost p = new BlogPostBuilder().title(\"foo\").content(\"bar\").author(\"baz\").build();`\r\n\r\nWhat do you think?"},"comment":{"url":"https://api.github.com/repos/zalando-stups/swagger-codegen-tooling/issues/comments/117989607","html_url":"https://github.com/zalando-stups/swagger-codegen-tooling/issues/7#issuecomment-117989607","issue_url":"https://api.github.com/repos/zalando-stups/swagger-codegen-tooling/issues/7","id":117989607,"user":{"login":"SunriseJJJ","id":5870672,"avatar_url":"https://avatars.githubusercontent.com/u/5870672?v=3","gravatar_id":"","url":"https://api.github.com/users/SunriseJJJ","html_url":"https://github.com/SunriseJJJ","followers_url":"https://api.github.com/users/SunriseJJJ/followers","following_url":"https://api.github.com/users/SunriseJJJ/following{/other_user}","gists_url":"https://api.github.com/users/SunriseJJJ/gists{/gist_id}","starred_url":"https://api.github.com/users/SunriseJJJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SunriseJJJ/subscriptions","organizations_url":"https://api.github.com/users/SunriseJJJ/orgs","repos_url":"https://api.github.com/users/SunriseJJJ/repos","events_url":"https://api.github.com/users/SunriseJJJ/events{/privacy}","received_events_url":"https://api.github.com/users/SunriseJJJ/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T10:10:17Z","updated_at":"2015-07-02T10:10:17Z","body":"Hi!\r\nThanks for enabling Java 1.7 again! I can now use your plugin again.\r\n\r\nSo, after enabling builders, now i see that for entity like this:\r\n```\r\n\"accountDetails\": {\r\n    \"type\": \"object\",\r\n    \"properties\": {\r\n        \"systemId\": {\r\n            \"type\": \"string\",\r\n        },\r\n        \"clientId\": {\r\n            \"type\": \"string\",\r\n        },\r\n        \"accountType\": {\r\n            \"type\": \"string\",\r\n            \"enum\": [\r\n                \"Single\",\r\n                \"Joint\"\r\n            ],\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nbuilder was not generated correctly. builder neither contains this enum nor tries to import this (i can understand why, because this enum now can be generated only as inline enum [and even not in one place] by swagger-codegen, i talking with swagger-codegen devs in topic https://github.com/swagger-api/swagger-codegen/issues/315).\r\nso with this issue code can not even compile. if codegen devs add this feature - i think second option can be implemented.\r\nAs temporary solution, i may recommend to add this enum also to builder or try to import enum from parent entity (accountDetails in example)"}}