{"action":"created","comment":{"url":"https://api.github.com/repos/swagger-api/swagger-editor/pulls/comments/168039853","pull_request_review_id":96343762,"id":168039853,"diff_hunk":"@@ -1,5 +1,6 @@\n import { createSelector } from \"reselect\"\n import { Set, Map } from \"immutable\"\n+import { escapeJsonPointerToken } from \"../refs-util\"","path":"src/plugins/editor-autosuggest/spec-selectors.js","position":3,"original_position":3,"commit_id":"9c2d2b856ee02b9e3075bfac92a724a9ec35c9b0","original_commit_id":"9c2d2b856ee02b9e3075bfac92a724a9ec35c9b0","user":{"login":"shockey","id":680248,"avatar_url":"https://avatars2.githubusercontent.com/u/680248?v=4","gravatar_id":"","url":"https://api.github.com/users/shockey","html_url":"https://github.com/shockey","followers_url":"https://api.github.com/users/shockey/followers","following_url":"https://api.github.com/users/shockey/following{/other_user}","gists_url":"https://api.github.com/users/shockey/gists{/gist_id}","starred_url":"https://api.github.com/users/shockey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shockey/subscriptions","organizations_url":"https://api.github.com/users/shockey/orgs","repos_url":"https://api.github.com/users/shockey/repos","events_url":"https://api.github.com/users/shockey/events{/privacy}","received_events_url":"https://api.github.com/users/shockey/received_events","type":"User","site_admin":false},"body":"This seems fine to me - the plugin system is great for exposing code that someone else may want to override/customize, but I can't imagine someone wanting to write a custom JSON Pointer escaper 😄 ","created_at":"2018-02-13T23:47:00Z","updated_at":"2018-02-13T23:47:00Z","html_url":"https://github.com/swagger-api/swagger-editor/pull/1671#discussion_r168039853","pull_request_url":"https://api.github.com/repos/swagger-api/swagger-editor/pulls/1671","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/swagger-api/swagger-editor/pulls/comments/168039853"},"html":{"href":"https://github.com/swagger-api/swagger-editor/pull/1671#discussion_r168039853"},"pull_request":{"href":"https://api.github.com/repos/swagger-api/swagger-editor/pulls/1671"}},"in_reply_to_id":167452614},"pull_request":{"url":"https://api.github.com/repos/swagger-api/swagger-editor/pulls/1671","id":168477968,"html_url":"https://github.com/swagger-api/swagger-editor/pull/1671","diff_url":"https://github.com/swagger-api/swagger-editor/pull/1671.diff","patch_url":"https://github.com/swagger-api/swagger-editor/pull/1671.patch","issue_url":"https://api.github.com/repos/swagger-api/swagger-editor/issues/1671","number":1671,"state":"open","locked":false,"title":"Escape JSON path for definitions","user":{"login":"jemerald","id":9168432,"avatar_url":"https://avatars2.githubusercontent.com/u/9168432?v=4","gravatar_id":"","url":"https://api.github.com/users/jemerald","html_url":"https://github.com/jemerald","followers_url":"https://api.github.com/users/jemerald/followers","following_url":"https://api.github.com/users/jemerald/following{/other_user}","gists_url":"https://api.github.com/users/jemerald/gists{/gist_id}","starred_url":"https://api.github.com/users/jemerald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jemerald/subscriptions","organizations_url":"https://api.github.com/users/jemerald/orgs","repos_url":"https://api.github.com/users/jemerald/repos","events_url":"https://api.github.com/users/jemerald/events{/privacy}","received_events_url":"https://api.github.com/users/jemerald/received_events","type":"User","site_admin":false},"body":"<!--- Provide a general summary of your changes in the Title above -->\r\n\r\n### Description\r\n<!--- Describe your changes in detail -->\r\nEscape JSON path for definitions when resolving auto-suggest and when performing validation.\r\n\r\nExtracted the `escapeJsonPointerToken` and `unescapeJsonPointerToken` functions to separate file.\r\n\r\nAlso added `cross-env` dev dependency to allow running the test under windows.\r\n\r\n### Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If it fixes an open issue, please link to the issue here. -->\r\nFixes #1644 and Fixes #1645\r\n\r\n### How Has This Been Tested?\r\n<!--- Please describe in detail how you manually tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\nManually tested auto-completion in Chrome.\r\n\r\nAdded unit test for validation.\r\n\r\n### Screenshots (if appropriate):\r\n![image](https://user-images.githubusercontent.com/9168432/36079157-e1e67372-0fe4-11e8-95ec-c22f71cc71d5.png)\r\n\r\n![image](https://user-images.githubusercontent.com/9168432/36079162-f37475e4-0fe4-11e8-90a3-7f58c87ceffd.png)\r\n\r\n## Checklist\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n\r\n### My PR contains... \r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] No code changes (`src/` is unmodified: changes to documentation, CI, metadata, etc.)\r\n- [ ] Dependency changes (any modification to dependencies in `package.json`)\r\n- [x] Bug fixes (non-breaking change which fixes an issue)\r\n- [ ] Improvements (misc. changes to existing features)\r\n- [ ] Features (non-breaking change which adds functionality)\r\n\r\n### My changes...\r\n- [ ] are breaking changes to a public API (config options, System API, major UI change, etc).\r\n- [ ] are breaking changes to a private API (Redux, component props, utility functions, etc.).\r\n- [ ] are breaking changes to a developer API (npm script behavior changes, new dev system dependencies, etc).\r\n- [x] are not breaking changes.\r\n\r\n### Documentation\r\n- [x] My changes do not require a change to the project documentation.\r\n- [ ] My changes require a change to the project documentation.\r\n- [ ] If yes to above: I have updated the documentation accordingly.\r\n\r\n### Automated tests\r\n- [ ] My changes can not or do not need to be tested.\r\n- [x] My changes can and should be tested by unit and/or integration tests.\r\n- [x] If yes to above: I have added tests to cover my changes.\r\n- [x] If yes to above: I have taken care to cover edge cases in my tests.\r\n- [x] All new and existing tests passed.\r\n","created_at":"2018-02-11T22:21:28Z","updated_at":"2018-02-13T23:47:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d0666311bf852abd38f88422ab3dcfecb94f03ce","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/swagger-api/swagger-editor/pulls/1671/commits","review_comments_url":"https://api.github.com/repos/swagger-api/swagger-editor/pulls/1671/comments","review_comment_url":"https://api.github.com/repos/swagger-api/swagger-editor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/swagger-api/swagger-editor/issues/1671/comments","statuses_url":"https://api.github.com/repos/swagger-api/swagger-editor/statuses/9c2d2b856ee02b9e3075bfac92a724a9ec35c9b0","head":{"label":"jemerald:escape-json-ref","ref":"escape-json-ref","sha":"9c2d2b856ee02b9e3075bfac92a724a9ec35c9b0","user":{"login":"jemerald","id":9168432,"avatar_url":"https://avatars2.githubusercontent.com/u/9168432?v=4","gravatar_id":"","url":"https://api.github.com/users/jemerald","html_url":"https://github.com/jemerald","followers_url":"https://api.github.com/users/jemerald/followers","following_url":"https://api.github.com/users/jemerald/following{/other_user}","gists_url":"https://api.github.com/users/jemerald/gists{/gist_id}","starred_url":"https://api.github.com/users/jemerald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jemerald/subscriptions","organizations_url":"https://api.github.com/users/jemerald/orgs","repos_url":"https://api.github.com/users/jemerald/repos","events_url":"https://api.github.com/users/jemerald/events{/privacy}","received_events_url":"https://api.github.com/users/jemerald/received_events","type":"User","site_admin":false},"repo":{"id":119767671,"name":"swagger-editor","full_name":"jemerald/swagger-editor","owner":{"login":"jemerald","id":9168432,"avatar_url":"https://avatars2.githubusercontent.com/u/9168432?v=4","gravatar_id":"","url":"https://api.github.com/users/jemerald","html_url":"https://github.com/jemerald","followers_url":"https://api.github.com/users/jemerald/followers","following_url":"https://api.github.com/users/jemerald/following{/other_user}","gists_url":"https://api.github.com/users/jemerald/gists{/gist_id}","starred_url":"https://api.github.com/users/jemerald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jemerald/subscriptions","organizations_url":"https://api.github.com/users/jemerald/orgs","repos_url":"https://api.github.com/users/jemerald/repos","events_url":"https://api.github.com/users/jemerald/events{/privacy}","received_events_url":"https://api.github.com/users/jemerald/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jemerald/swagger-editor","description":"Swagger Editor","fork":true,"url":"https://api.github.com/repos/jemerald/swagger-editor","forks_url":"https://api.github.com/repos/jemerald/swagger-editor/forks","keys_url":"https://api.github.com/repos/jemerald/swagger-editor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jemerald/swagger-editor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jemerald/swagger-editor/teams","hooks_url":"https://api.github.com/repos/jemerald/swagger-editor/hooks","issue_events_url":"https://api.github.com/repos/jemerald/swagger-editor/issues/events{/number}","events_url":"https://api.github.com/repos/jemerald/swagger-editor/events","assignees_url":"https://api.github.com/repos/jemerald/swagger-editor/assignees{/user}","branches_url":"https://api.github.com/repos/jemerald/swagger-editor/branches{/branch}","tags_url":"https://api.github.com/repos/jemerald/swagger-editor/tags","blobs_url":"https://api.github.com/repos/jemerald/swagger-editor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jemerald/swagger-editor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jemerald/swagger-editor/git/refs{/sha}","trees_url":"https://api.github.com/repos/jemerald/swagger-editor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jemerald/swagger-editor/statuses/{sha}","languages_url":"https://api.github.com/repos/jemerald/swagger-editor/languages","stargazers_url":"https://api.github.com/repos/jemerald/swagger-editor/stargazers","contributors_url":"https://api.github.com/repos/jemerald/swagger-editor/contributors","subscribers_url":"https://api.github.com/repos/jemerald/swagger-editor/subscribers","subscription_url":"https://api.github.com/repos/jemerald/swagger-editor/subscription","commits_url":"https://api.github.com/repos/jemerald/swagger-editor/commits{/sha}","git_commits_url":"https://api.github.com/repos/jemerald/swagger-editor/git/commits{/sha}","comments_url":"https://api.github.com/repos/jemerald/swagger-editor/comments{/number}","issue_comment_url":"https://api.github.com/repos/jemerald/swagger-editor/issues/comments{/number}","contents_url":"https://api.github.com/repos/jemerald/swagger-editor/contents/{+path}","compare_url":"https://api.github.com/repos/jemerald/swagger-editor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jemerald/swagger-editor/merges","archive_url":"https://api.github.com/repos/jemerald/swagger-editor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jemerald/swagger-editor/downloads","issues_url":"https://api.github.com/repos/jemerald/swagger-editor/issues{/number}","pulls_url":"https://api.github.com/repos/jemerald/swagger-editor/pulls{/number}","milestones_url":"https://api.github.com/repos/jemerald/swagger-editor/milestones{/number}","notifications_url":"https://api.github.com/repos/jemerald/swagger-editor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jemerald/swagger-editor/labels{/name}","releases_url":"https://api.github.com/repos/jemerald/swagger-editor/releases{/id}","deployments_url":"https://api.github.com/repos/jemerald/swagger-editor/deployments","created_at":"2018-02-01T01:49:02Z","updated_at":"2018-02-01T01:49:05Z","pushed_at":"2018-02-11T21:53:47Z","git_url":"git://github.com/jemerald/swagger-editor.git","ssh_url":"git@github.com:jemerald/swagger-editor.git","clone_url":"https://github.com/jemerald/swagger-editor.git","svn_url":"https://github.com/jemerald/swagger-editor","homepage":"http://editor.swagger.io","size":189025,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"swagger-api:master","ref":"master","sha":"fca694783d5e06f65e8d850da4e70b5bec289d4b","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":19390712,"name":"swagger-editor","full_name":"swagger-api/swagger-editor","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-editor","description":"Swagger Editor","fork":false,"url":"https://api.github.com/repos/swagger-api/swagger-editor","forks_url":"https://api.github.com/repos/swagger-api/swagger-editor/forks","keys_url":"https://api.github.com/repos/swagger-api/swagger-editor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swagger-api/swagger-editor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swagger-api/swagger-editor/teams","hooks_url":"https://api.github.com/repos/swagger-api/swagger-editor/hooks","issue_events_url":"https://api.github.com/repos/swagger-api/swagger-editor/issues/events{/number}","events_url":"https://api.github.com/repos/swagger-api/swagger-editor/events","assignees_url":"https://api.github.com/repos/swagger-api/swagger-editor/assignees{/user}","branches_url":"https://api.github.com/repos/swagger-api/swagger-editor/branches{/branch}","tags_url":"https://api.github.com/repos/swagger-api/swagger-editor/tags","blobs_url":"https://api.github.com/repos/swagger-api/swagger-editor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swagger-api/swagger-editor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swagger-api/swagger-editor/git/refs{/sha}","trees_url":"https://api.github.com/repos/swagger-api/swagger-editor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swagger-api/swagger-editor/statuses/{sha}","languages_url":"https://api.github.com/repos/swagger-api/swagger-editor/languages","stargazers_url":"https://api.github.com/repos/swagger-api/swagger-editor/stargazers","contributors_url":"https://api.github.com/repos/swagger-api/swagger-editor/contributors","subscribers_url":"https://api.github.com/repos/swagger-api/swagger-editor/subscribers","subscription_url":"https://api.github.com/repos/swagger-api/swagger-editor/subscription","commits_url":"https://api.github.com/repos/swagger-api/swagger-editor/commits{/sha}","git_commits_url":"https://api.github.com/repos/swagger-api/swagger-editor/git/commits{/sha}","comments_url":"https://api.github.com/repos/swagger-api/swagger-editor/comments{/number}","issue_comment_url":"https://api.github.com/repos/swagger-api/swagger-editor/issues/comments{/number}","contents_url":"https://api.github.com/repos/swagger-api/swagger-editor/contents/{+path}","compare_url":"https://api.github.com/repos/swagger-api/swagger-editor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swagger-api/swagger-editor/merges","archive_url":"https://api.github.com/repos/swagger-api/swagger-editor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swagger-api/swagger-editor/downloads","issues_url":"https://api.github.com/repos/swagger-api/swagger-editor/issues{/number}","pulls_url":"https://api.github.com/repos/swagger-api/swagger-editor/pulls{/number}","milestones_url":"https://api.github.com/repos/swagger-api/swagger-editor/milestones{/number}","notifications_url":"https://api.github.com/repos/swagger-api/swagger-editor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swagger-api/swagger-editor/labels{/name}","releases_url":"https://api.github.com/repos/swagger-api/swagger-editor/releases{/id}","deployments_url":"https://api.github.com/repos/swagger-api/swagger-editor/deployments","created_at":"2014-05-02T22:47:10Z","updated_at":"2018-02-13T23:43:41Z","pushed_at":"2018-02-11T22:21:29Z","git_url":"git://github.com/swagger-api/swagger-editor.git","ssh_url":"git@github.com:swagger-api/swagger-editor.git","clone_url":"https://github.com/swagger-api/swagger-editor.git","svn_url":"https://github.com/swagger-api/swagger-editor","homepage":"http://editor.swagger.io","size":189028,"stargazers_count":3246,"watchers_count":3246,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1035,"mirror_url":null,"archived":false,"open_issues_count":79,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":1035,"open_issues":79,"watchers":3246,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/swagger-api/swagger-editor/pulls/1671"},"html":{"href":"https://github.com/swagger-api/swagger-editor/pull/1671"},"issue":{"href":"https://api.github.com/repos/swagger-api/swagger-editor/issues/1671"},"comments":{"href":"https://api.github.com/repos/swagger-api/swagger-editor/issues/1671/comments"},"review_comments":{"href":"https://api.github.com/repos/swagger-api/swagger-editor/pulls/1671/comments"},"review_comment":{"href":"https://api.github.com/repos/swagger-api/swagger-editor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/swagger-api/swagger-editor/pulls/1671/commits"},"statuses":{"href":"https://api.github.com/repos/swagger-api/swagger-editor/statuses/9c2d2b856ee02b9e3075bfac92a724a9ec35c9b0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"shockey"}}