{"action":"created","comment":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/comments/185385865","pull_request_review_id":116761209,"id":185385865,"diff_hunk":"@@ -402,10 +402,10 @@ public String toEnumVarName(String value, String datatype) {\n         if (reservedWords.contains(modified)) {\n             return escapeReservedWord(modified);\n         }\n-\n-        return modified;\n+        return sanitizeKotlinSpecificNames(modified);","path":"modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractKotlinCodegen.java","position":6,"original_position":6,"commit_id":"2beb3e9a43c421ddc97c0ddde9618a002176c0b6","original_commit_id":"2beb3e9a43c421ddc97c0ddde9618a002176c0b6","user":{"login":"jimschubert","id":109659,"avatar_url":"https://avatars2.githubusercontent.com/u/109659?v=4","gravatar_id":"","url":"https://api.github.com/users/jimschubert","html_url":"https://github.com/jimschubert","followers_url":"https://api.github.com/users/jimschubert/followers","following_url":"https://api.github.com/users/jimschubert/following{/other_user}","gists_url":"https://api.github.com/users/jimschubert/gists{/gist_id}","starred_url":"https://api.github.com/users/jimschubert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimschubert/subscriptions","organizations_url":"https://api.github.com/users/jimschubert/orgs","repos_url":"https://api.github.com/users/jimschubert/repos","events_url":"https://api.github.com/users/jimschubert/events{/privacy}","received_events_url":"https://api.github.com/users/jimschubert/received_events","type":"User","site_admin":false},"body":"Can you add a comment here about why this is necessary, considering this is called at the start of the method? Otherwise I think it would be confusing to maintainers.\r\n\r\nReading it, I see that the issue is an enum input of `1enum` becomes `_1enum` at the start of the method, then `camelCase` (the default) and `PascalCase` end up removing that beginning underscore, resulting in the invalid `1enum`. I had to look at it for a second to understand the need at the end of the method, but I'm not sure all contributors would pick up on the nuance even with the comments in the case statements.","created_at":"2018-05-02T03:25:27Z","updated_at":"2018-05-02T03:25:31Z","html_url":"https://github.com/swagger-api/swagger-codegen/pull/8117#discussion_r185385865","pull_request_url":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/8117","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/comments/185385865"},"html":{"href":"https://github.com/swagger-api/swagger-codegen/pull/8117#discussion_r185385865"},"pull_request":{"href":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/8117"}}},"pull_request":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/8117","id":185254951,"html_url":"https://github.com/swagger-api/swagger-codegen/pull/8117","diff_url":"https://github.com/swagger-api/swagger-codegen/pull/8117.diff","patch_url":"https://github.com/swagger-api/swagger-codegen/pull/8117.patch","issue_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/8117","number":8117,"state":"open","locked":false,"title":"[Kotlin] Sanitize enum varname","user":{"login":"Zomzog","id":452065,"avatar_url":"https://avatars2.githubusercontent.com/u/452065?v=4","gravatar_id":"","url":"https://api.github.com/users/Zomzog","html_url":"https://github.com/Zomzog","followers_url":"https://api.github.com/users/Zomzog/followers","following_url":"https://api.github.com/users/Zomzog/following{/other_user}","gists_url":"https://api.github.com/users/Zomzog/gists{/gist_id}","starred_url":"https://api.github.com/users/Zomzog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zomzog/subscriptions","organizations_url":"https://api.github.com/users/Zomzog/orgs","repos_url":"https://api.github.com/users/Zomzog/repos","events_url":"https://api.github.com/users/Zomzog/events{/privacy}","received_events_url":"https://api.github.com/users/Zomzog/received_events","type":"User","site_admin":false},"body":"### PR checklist\r\n\r\n- [x] Read the [contribution guidelines](https://github.com/swagger-api/swagger-codegen/blob/master/CONTRIBUTING.md).\r\n- [x] Ran the shell script under `./bin/` to update Petstore sample so that CIs can verify the change. (For instance, only need to run `./bin/{LANG}-petstore.sh` and `./bin/security/{LANG}-petstore.sh` if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in `.\\bin\\windows\\`.\r\n- [x] Filed the PR against the correct branch: `3.0.0` branch for changes related to OpenAPI spec 3.0. Default: `master`.\r\n- [x] Copied the [technical committee](https://github.com/swagger-api/swagger-codegen/#swagger-codegen-technical-committee) to review the pull request if your PR is targeting a particular programming language.\r\n\r\n### Description of the PR\r\n\r\nSanitize enumeration name for adding underscore when it's required.\r\n\r\nIt seems ok for all case but when \"original\" strategy is selected name can be deeply changed (add an underscore, remove space...) \r\n\r\nMust fix #8116\r\n\r\nTechnical committee member: @jimschubert\r\n","created_at":"2018-05-01T19:28:35Z","updated_at":"2018-05-02T03:25:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39d8a7bec6e03d2a6201d3a95bf88302171a9248","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/8117/commits","review_comments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/8117/comments","review_comment_url":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/8117/comments","statuses_url":"https://api.github.com/repos/swagger-api/swagger-codegen/statuses/2beb3e9a43c421ddc97c0ddde9618a002176c0b6","head":{"label":"Zomzog:feature/8116","ref":"feature/8116","sha":"2beb3e9a43c421ddc97c0ddde9618a002176c0b6","user":{"login":"Zomzog","id":452065,"avatar_url":"https://avatars2.githubusercontent.com/u/452065?v=4","gravatar_id":"","url":"https://api.github.com/users/Zomzog","html_url":"https://github.com/Zomzog","followers_url":"https://api.github.com/users/Zomzog/followers","following_url":"https://api.github.com/users/Zomzog/following{/other_user}","gists_url":"https://api.github.com/users/Zomzog/gists{/gist_id}","starred_url":"https://api.github.com/users/Zomzog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zomzog/subscriptions","organizations_url":"https://api.github.com/users/Zomzog/orgs","repos_url":"https://api.github.com/users/Zomzog/repos","events_url":"https://api.github.com/users/Zomzog/events{/privacy}","received_events_url":"https://api.github.com/users/Zomzog/received_events","type":"User","site_admin":false},"repo":{"id":131563482,"name":"swagger-codegen","full_name":"Zomzog/swagger-codegen","owner":{"login":"Zomzog","id":452065,"avatar_url":"https://avatars2.githubusercontent.com/u/452065?v=4","gravatar_id":"","url":"https://api.github.com/users/Zomzog","html_url":"https://github.com/Zomzog","followers_url":"https://api.github.com/users/Zomzog/followers","following_url":"https://api.github.com/users/Zomzog/following{/other_user}","gists_url":"https://api.github.com/users/Zomzog/gists{/gist_id}","starred_url":"https://api.github.com/users/Zomzog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zomzog/subscriptions","organizations_url":"https://api.github.com/users/Zomzog/orgs","repos_url":"https://api.github.com/users/Zomzog/repos","events_url":"https://api.github.com/users/Zomzog/events{/privacy}","received_events_url":"https://api.github.com/users/Zomzog/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Zomzog/swagger-codegen","description":"swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.","fork":true,"url":"https://api.github.com/repos/Zomzog/swagger-codegen","forks_url":"https://api.github.com/repos/Zomzog/swagger-codegen/forks","keys_url":"https://api.github.com/repos/Zomzog/swagger-codegen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Zomzog/swagger-codegen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Zomzog/swagger-codegen/teams","hooks_url":"https://api.github.com/repos/Zomzog/swagger-codegen/hooks","issue_events_url":"https://api.github.com/repos/Zomzog/swagger-codegen/issues/events{/number}","events_url":"https://api.github.com/repos/Zomzog/swagger-codegen/events","assignees_url":"https://api.github.com/repos/Zomzog/swagger-codegen/assignees{/user}","branches_url":"https://api.github.com/repos/Zomzog/swagger-codegen/branches{/branch}","tags_url":"https://api.github.com/repos/Zomzog/swagger-codegen/tags","blobs_url":"https://api.github.com/repos/Zomzog/swagger-codegen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Zomzog/swagger-codegen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Zomzog/swagger-codegen/git/refs{/sha}","trees_url":"https://api.github.com/repos/Zomzog/swagger-codegen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Zomzog/swagger-codegen/statuses/{sha}","languages_url":"https://api.github.com/repos/Zomzog/swagger-codegen/languages","stargazers_url":"https://api.github.com/repos/Zomzog/swagger-codegen/stargazers","contributors_url":"https://api.github.com/repos/Zomzog/swagger-codegen/contributors","subscribers_url":"https://api.github.com/repos/Zomzog/swagger-codegen/subscribers","subscription_url":"https://api.github.com/repos/Zomzog/swagger-codegen/subscription","commits_url":"https://api.github.com/repos/Zomzog/swagger-codegen/commits{/sha}","git_commits_url":"https://api.github.com/repos/Zomzog/swagger-codegen/git/commits{/sha}","comments_url":"https://api.github.com/repos/Zomzog/swagger-codegen/comments{/number}","issue_comment_url":"https://api.github.com/repos/Zomzog/swagger-codegen/issues/comments{/number}","contents_url":"https://api.github.com/repos/Zomzog/swagger-codegen/contents/{+path}","compare_url":"https://api.github.com/repos/Zomzog/swagger-codegen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Zomzog/swagger-codegen/merges","archive_url":"https://api.github.com/repos/Zomzog/swagger-codegen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Zomzog/swagger-codegen/downloads","issues_url":"https://api.github.com/repos/Zomzog/swagger-codegen/issues{/number}","pulls_url":"https://api.github.com/repos/Zomzog/swagger-codegen/pulls{/number}","milestones_url":"https://api.github.com/repos/Zomzog/swagger-codegen/milestones{/number}","notifications_url":"https://api.github.com/repos/Zomzog/swagger-codegen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Zomzog/swagger-codegen/labels{/name}","releases_url":"https://api.github.com/repos/Zomzog/swagger-codegen/releases{/id}","deployments_url":"https://api.github.com/repos/Zomzog/swagger-codegen/deployments","created_at":"2018-04-30T06:34:54Z","updated_at":"2018-04-30T20:45:24Z","pushed_at":"2018-05-01T19:06:47Z","git_url":"git://github.com/Zomzog/swagger-codegen.git","ssh_url":"git@github.com:Zomzog/swagger-codegen.git","clone_url":"https://github.com/Zomzog/swagger-codegen.git","svn_url":"https://github.com/Zomzog/swagger-codegen","homepage":"http://swagger.io","size":72243,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"swagger-api:master","ref":"master","sha":"f9ae84d12aa8b602cf0df6f784f1ab77cf72550b","user":{"login":"swagger-api","id":7658037,"avatar_url":"https://avatars3.githubusercontent.com/u/7658037?v=4","gravatar_id":"","url":"https://api.github.com/users/swagger-api","html_url":"https://github.com/swagger-api","followers_url":"https://api.github.com/users/swagger-api/followers","following_url":"https://api.github.com/users/swagger-api/following{/other_user}","gists_url":"https://api.github.com/users/swagger-api/gists{/gist_id}","starred_url":"https://api.github.com/users/swagger-api/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swagger-api/subscriptions","organizations_url":"https://api.github.com/users/swagger-api/orgs","repos_url":"https://api.github.com/users/swagger-api/repos","events_url":"https://api.github.com/users/swagger-api/events{/privacy}","received_events_url":"https://api.github.com/users/swagger-api/received_events","type":"Organization","site_admin":false},"repo":{"id":2006876,"name":"swagger-codegen","full_name":"swagger-api/swagger-codegen","owner":{"login":"swagger-api","id":7658037,"avatar_url":"https://avatars3.githubusercontent.com/u/7658037?v=4","gravatar_id":"","url":"https://api.github.com/users/swagger-api","html_url":"https://github.com/swagger-api","followers_url":"https://api.github.com/users/swagger-api/followers","following_url":"https://api.github.com/users/swagger-api/following{/other_user}","gists_url":"https://api.github.com/users/swagger-api/gists{/gist_id}","starred_url":"https://api.github.com/users/swagger-api/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swagger-api/subscriptions","organizations_url":"https://api.github.com/users/swagger-api/orgs","repos_url":"https://api.github.com/users/swagger-api/repos","events_url":"https://api.github.com/users/swagger-api/events{/privacy}","received_events_url":"https://api.github.com/users/swagger-api/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/swagger-api/swagger-codegen","description":"swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.","fork":false,"url":"https://api.github.com/repos/swagger-api/swagger-codegen","forks_url":"https://api.github.com/repos/swagger-api/swagger-codegen/forks","keys_url":"https://api.github.com/repos/swagger-api/swagger-codegen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swagger-api/swagger-codegen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swagger-api/swagger-codegen/teams","hooks_url":"https://api.github.com/repos/swagger-api/swagger-codegen/hooks","issue_events_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/events{/number}","events_url":"https://api.github.com/repos/swagger-api/swagger-codegen/events","assignees_url":"https://api.github.com/repos/swagger-api/swagger-codegen/assignees{/user}","branches_url":"https://api.github.com/repos/swagger-api/swagger-codegen/branches{/branch}","tags_url":"https://api.github.com/repos/swagger-api/swagger-codegen/tags","blobs_url":"https://api.github.com/repos/swagger-api/swagger-codegen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swagger-api/swagger-codegen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swagger-api/swagger-codegen/git/refs{/sha}","trees_url":"https://api.github.com/repos/swagger-api/swagger-codegen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swagger-api/swagger-codegen/statuses/{sha}","languages_url":"https://api.github.com/repos/swagger-api/swagger-codegen/languages","stargazers_url":"https://api.github.com/repos/swagger-api/swagger-codegen/stargazers","contributors_url":"https://api.github.com/repos/swagger-api/swagger-codegen/contributors","subscribers_url":"https://api.github.com/repos/swagger-api/swagger-codegen/subscribers","subscription_url":"https://api.github.com/repos/swagger-api/swagger-codegen/subscription","commits_url":"https://api.github.com/repos/swagger-api/swagger-codegen/commits{/sha}","git_commits_url":"https://api.github.com/repos/swagger-api/swagger-codegen/git/commits{/sha}","comments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/comments{/number}","issue_comment_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/comments{/number}","contents_url":"https://api.github.com/repos/swagger-api/swagger-codegen/contents/{+path}","compare_url":"https://api.github.com/repos/swagger-api/swagger-codegen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swagger-api/swagger-codegen/merges","archive_url":"https://api.github.com/repos/swagger-api/swagger-codegen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swagger-api/swagger-codegen/downloads","issues_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues{/number}","pulls_url":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls{/number}","milestones_url":"https://api.github.com/repos/swagger-api/swagger-codegen/milestones{/number}","notifications_url":"https://api.github.com/repos/swagger-api/swagger-codegen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/labels{/name}","releases_url":"https://api.github.com/repos/swagger-api/swagger-codegen/releases{/id}","deployments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/deployments","created_at":"2011-07-06T14:26:48Z","updated_at":"2018-05-01T21:34:48Z","pushed_at":"2018-05-01T19:43:41Z","git_url":"git://github.com/swagger-api/swagger-codegen.git","ssh_url":"git@github.com:swagger-api/swagger-codegen.git","clone_url":"https://github.com/swagger-api/swagger-codegen.git","svn_url":"https://github.com/swagger-api/swagger-codegen","homepage":"http://swagger.io","size":72207,"stargazers_count":6745,"watchers_count":6745,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3531,"mirror_url":null,"archived":false,"open_issues_count":1451,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":3531,"open_issues":1451,"watchers":6745,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/8117"},"html":{"href":"https://github.com/swagger-api/swagger-codegen/pull/8117"},"issue":{"href":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/8117"},"comments":{"href":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/8117/comments"},"review_comments":{"href":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/8117/comments"},"review_comment":{"href":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/swagger-api/swagger-codegen/pulls/8117/commits"},"statuses":{"href":"https://api.github.com/repos/swagger-api/swagger-codegen/statuses/2beb3e9a43c421ddc97c0ddde9618a002176c0b6"}},"author_association":"NONE"}}
{"actor":{"display_login":"jimschubert"}}