{"action":"closed","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/1992","repository_url":"https://api.github.com/repos/swagger-api/swagger-codegen","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/1992/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/1992/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/1992/events","html_url":"https://github.com/swagger-api/swagger-codegen/issues/1992","id":129221398,"number":1992,"title":"[Swift] Ensure that enumeration types do not conflict with variable name","user":{"login":"jaz-ah","id":13263369,"avatar_url":"https://avatars.githubusercontent.com/u/13263369?v=3","gravatar_id":"","url":"https://api.github.com/users/jaz-ah","html_url":"https://github.com/jaz-ah","followers_url":"https://api.github.com/users/jaz-ah/followers","following_url":"https://api.github.com/users/jaz-ah/following{/other_user}","gists_url":"https://api.github.com/users/jaz-ah/gists{/gist_id}","starred_url":"https://api.github.com/users/jaz-ah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaz-ah/subscriptions","organizations_url":"https://api.github.com/users/jaz-ah/orgs","repos_url":"https://api.github.com/users/jaz-ah/repos","events_url":"https://api.github.com/users/jaz-ah/events{/privacy}","received_events_url":"https://api.github.com/users/jaz-ah/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:%20Swift","name":"Client: Swift","color":"fad8c7"}],"state":"closed","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":62,"closed_issues":171,"state":"open","created_at":"2016-01-06T20:41:39Z","updated_at":"2016-02-10T12:38:16Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2016-01-27T17:57:42Z","updated_at":"2016-02-10T12:38:16Z","closed_at":"2016-02-10T12:38:16Z","body":"Swagger generator: 2.1.5\r\nLanguage: swift\r\n\r\n(This is w/ Swift 2 on XCode7.2)\r\n\r\nIf we have a swagger specification like this:\r\n\r\nhttps://gist.github.com/jaz-ah/f6394360065650000c96\r\n\r\nThe generated code produced is:\r\n\r\n    public enum EnumTest: String {\r\n        case Abc = \"abc\"\r\n        case Def = \"def\"\r\n    }\r\n\r\n    public var EnumTest: EnumTest?\r\n\r\nwhich produces a complier error:\r\n\r\n 'EnumTest' used within its own type\r\n\r\nWe need to protect against this condition by ensuring our enumeration name always is different than the variable name.\r\n"}}