{"action":"opened","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/982","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/982/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/982/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/982/events","html_url":"https://github.com/swagger-api/swagger-codegen/issues/982","id":95255585,"number":982,"title":"Enum support","user":{"login":"samxye","id":9810489,"avatar_url":"https://avatars.githubusercontent.com/u/9810489?v=3","gravatar_id":"","url":"https://api.github.com/users/samxye","html_url":"https://github.com/samxye","followers_url":"https://api.github.com/users/samxye/followers","following_url":"https://api.github.com/users/samxye/following{/other_user}","gists_url":"https://api.github.com/users/samxye/gists{/gist_id}","starred_url":"https://api.github.com/users/samxye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samxye/subscriptions","organizations_url":"https://api.github.com/users/samxye/orgs","repos_url":"https://api.github.com/users/samxye/repos","events_url":"https://api.github.com/users/samxye/events{/privacy}","received_events_url":"https://api.github.com/users/samxye/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-15T18:10:01Z","updated_at":"2015-07-15T18:10:01Z","closed_at":null,"body":"Mustache tags for enums are not being parsed or generated. This seems to be the case only when enum is a property directly under the object. Here is an example from petstore:\r\n\r\n#### - Enum tags generated\r\n\r\n **swagger.json**\r\n```\r\n  \"definitions\": {\r\n    \"Order\": {\r\n      \"type\": \"object\",\r\n      \"properties\": {\r\n        \"status\": {\r\n          \"type\": \"string\",\r\n          \"description\": \"Order Status\",\r\n          \"enum\": [\r\n            \"placed\",\r\n            \"approved\",\r\n            \"delivered\"\r\n          ]\r\n        },\r\n      },\r\n      \"xml\": {\r\n        \"name\": \"Order\"\r\n      }\r\n    },\r\n```\r\n**corresponding \"model info\" output**\r\n```\r\n    }, {\r\n      \"baseName\" : \"status\",\r\n      \"complexType\" : \"string\",\r\n      \"getter\" : \"getStatus\",\r\n      \"setter\" : \"setStatus\",\r\n      \"description\" : \"Order Status\",\r\n      \"datatype\" : \"String\",\r\n      \"datatypeWithEnum\" : \"StatusEnum\",\r\n      \"name\" : \"status\",\r\n      \"defaultValue\" : \"null\",\r\n      \"baseType\" : \"string\",\r\n      \"jsonSchema\" : \"{\\n  \\\"type\\\" : \\\"string\\\",\\n  \\\"description\\\" : \\\"Order Status\\\",\\n  \\\"enum\\\" : [ \\\"placed\\\", \\\"approved\\\", \\\"delivered\\\" ]\\n}\",\r\n      \"hasMore\" : true,\r\n      \"isNotContainer\" : true,\r\n      \"isEnum\" : true,\r\n      \"_enum\" : [ \"placed\", \"approved\", \"delivered\" ],\r\n      \"allowableValues\" : {\r\n        \"values\" : [ \"placed\", \"approved\", \"delivered\" ]\r\n      }\r\n    }, {\r\n```\r\n\r\n#### - Enum tags not generated\r\n\r\n**swagger.json**\r\n```\r\n  \"definitions\": {\r\n    \"status\": {\r\n      \"type\": \"string\",\r\n      \"description\": \"Order Status\",\r\n      \"enum\": [\r\n         \"placed\",\r\n         \"approved\",\r\n         \"delivered\"\r\n      ]\r\n    },\r\n```\r\n**corresponding \"model info\" output**\r\n```\r\n[ {\r\n  \"model\" : {\r\n    \"name\" : \"StatusType\",\r\n    \"classname\" : \"StatusType\",\r\n    \"description\" : \"Order Status\",\r\n    \"classVarName\" : \"StatusType\",\r\n    \"modelJson\" : \"{\\n  \\\"type\\\" : \\\"string\\\",\\n  \\\"description\\\" : \\\"Order Status\\\"\\n}\",\r\n    \"vars\" : [ ],\r\n    \"imports\" : [ ],\r\n    \"emptyVars\" : true\r\n  },\r\n  \"importPath\" : \"StatusType\"\r\n},\r\n```\r\n"}}