{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/5932","repository_url":"https://api.github.com/repos/swagger-api/swagger-codegen","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/5932/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/5932/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/5932/events","html_url":"https://github.com/swagger-api/swagger-codegen/issues/5932","id":238787642,"number":5932,"title":" [JAVA] Bug generating enum values","user":{"login":"acostros","id":18039369,"avatar_url":"https://avatars1.githubusercontent.com/u/18039369?v=4","gravatar_id":"","url":"https://api.github.com/users/acostros","html_url":"https://github.com/acostros","followers_url":"https://api.github.com/users/acostros/followers","following_url":"https://api.github.com/users/acostros/following{/other_user}","gists_url":"https://api.github.com/users/acostros/gists{/gist_id}","starred_url":"https://api.github.com/users/acostros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acostros/subscriptions","organizations_url":"https://api.github.com/users/acostros/orgs","repos_url":"https://api.github.com/users/acostros/repos","events_url":"https://api.github.com/users/acostros/events{/privacy}","received_events_url":"https://api.github.com/users/acostros/received_events","type":"User","site_admin":false},"labels":[{"id":160491762,"url":"https://api.github.com/repos/swagger-api/swagger-codegen/labels/Client:%20Java","name":"Client: Java","color":"fad8c7","default":false},{"id":417609785,"url":"https://api.github.com/repos/swagger-api/swagger-codegen/labels/Feature:%20Enum","name":"Feature: Enum","color":"eeccff","default":false},{"id":410531038,"url":"https://api.github.com/repos/swagger-api/swagger-codegen/labels/General:%20Suggestion","name":"General: Suggestion","color":"66ccff","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/milestones/16","html_url":"https://github.com/swagger-api/swagger-codegen/milestone/16","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/milestones/16/labels","id":2981586,"number":16,"title":"v2.4.0","description":"","creator":{"login":"wing328","id":934260,"avatar_url":"https://avatars2.githubusercontent.com/u/934260?v=4","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},"open_issues":170,"closed_issues":250,"state":"open","created_at":"2017-12-15T09:01:57Z","updated_at":"2018-03-12T16:08:49Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2017-06-27T09:21:05Z","updated_at":"2018-03-13T12:45:52Z","closed_at":"2018-03-09T06:45:12Z","author_association":"NONE","body":"##### Description\r\nGenerating a java client that has enums where the values have a common prefix will lead to generated enums having the common prefix striped off.\r\n\r\nWe make extensive use of enums to show various configuration values. This bug removes he meaning from the enum names and makes the generated clients inconsistent with the API. \r\n\r\ni.e. \r\nON_STARTUP gets replaced with STARTUP , \r\nON_SHUTDOWN gets replaced with SHUTDOWN,\r\n\r\nFIXED_INTEREST_RATE gets replaced with INTEREST_RATE\r\nFIXED_INDEX_RATE gets replaced with INDEX_RATE\r\n\r\nDELETE_USERS turns into USERS \r\nDELETE_PRODUCTS turns into PRODUCTS\r\nDELETE_CLIENTS turns into CLIENTS\r\n\r\n\r\nI think it's clear that the intended meaning of the enum is no longer the same and that this can have a significant impact on any api that makes extensive use of enums.\r\n\r\n##### Swagger-codegen version\r\n group: 'io.swagger', name: 'swagger-codegen-cli', version:2.2.2\r\n\r\n##### Command line used for generation\r\n\r\ngenerate, -i, /Users/user/Desktop/json/swagger.json, -l, java, -o, /Users/user/Desktop/build/JavaSdk/, --library, okhttp-gson, --artifact-id, branches, --group-id, com.client, --artifact-version, 2, --api-package, com.client.api, --model-package, com.client.model, -DapiTests=false, -DmodelTests=false, -DdateLibrary=java8\r\n\r\n<!-- including the language, libraries and various options -->\r\n\r\n##### Steps to reproduce\r\n\r\nAny enum that has all values with a common prefix.\r\n\r\n##### Related issues\r\n\r\nThis was introduced here:\r\n\r\nhttps://github.com/swagger-api/swagger-codegen/pull/1264/commits/6dcaa890cff06badcff86596f0aac3efb0193c8f\r\n\r\n##### Suggest a Fix\r\n\r\nExpose this behaviour into a command line parameter to allow us to have the full enum names that we want. (enum-prefix-stripping, pick a better name if you please).\r\n\r\nThis will allow users that rely on this to continue using it and offer users that don't need this behaviour to skip it."},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/comments/372652846","html_url":"https://github.com/swagger-api/swagger-codegen/issues/5932#issuecomment-372652846","issue_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/5932","id":372652846,"user":{"login":"Dingesken","id":37324435,"avatar_url":"https://avatars1.githubusercontent.com/u/37324435?v=4","gravatar_id":"","url":"https://api.github.com/users/Dingesken","html_url":"https://github.com/Dingesken","followers_url":"https://api.github.com/users/Dingesken/followers","following_url":"https://api.github.com/users/Dingesken/following{/other_user}","gists_url":"https://api.github.com/users/Dingesken/gists{/gist_id}","starred_url":"https://api.github.com/users/Dingesken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dingesken/subscriptions","organizations_url":"https://api.github.com/users/Dingesken/orgs","repos_url":"https://api.github.com/users/Dingesken/repos","events_url":"https://api.github.com/users/Dingesken/events{/privacy}","received_events_url":"https://api.github.com/users/Dingesken/received_events","type":"User","site_admin":false},"created_at":"2018-03-13T12:45:52Z","updated_at":"2018-03-13T12:45:52Z","author_association":"NONE","body":"Looks like a partial solution was provided in #4331 , I can't test it though."}}
{"actor":{"display_login":"Dingesken"}}