{"action":"opened","number":1210,"pull_request":{"url":"https://api.github.com/repos/Tencent/rapidjson/pulls/1210","id":177199610,"html_url":"https://github.com/Tencent/rapidjson/pull/1210","diff_url":"https://github.com/Tencent/rapidjson/pull/1210.diff","patch_url":"https://github.com/Tencent/rapidjson/pull/1210.patch","issue_url":"https://api.github.com/repos/Tencent/rapidjson/issues/1210","number":1210,"state":"open","locked":false,"title":"add remote ref pointer to schemaMap_","user":{"login":"foxtacles","id":1135351,"avatar_url":"https://avatars2.githubusercontent.com/u/1135351?v=4","gravatar_id":"","url":"https://api.github.com/users/foxtacles","html_url":"https://github.com/foxtacles","followers_url":"https://api.github.com/users/foxtacles/followers","following_url":"https://api.github.com/users/foxtacles/following{/other_user}","gists_url":"https://api.github.com/users/foxtacles/gists{/gist_id}","starred_url":"https://api.github.com/users/foxtacles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxtacles/subscriptions","organizations_url":"https://api.github.com/users/foxtacles/orgs","repos_url":"https://api.github.com/users/foxtacles/repos","events_url":"https://api.github.com/users/foxtacles/events{/privacy}","received_events_url":"https://api.github.com/users/foxtacles/received_events","type":"User","site_admin":false},"body":"Hello,\r\n\r\nI think I've encountered a bug. I noticed wrong results when validating a schema referencing a remote schema, which references another remote schema. Here is an example: https://gist.github.com/foxtacles/0deaa03be09cf9820e49cc590ee020c6\r\n\r\n`x.json` references `y.json` references `z.json`. The validation should fail (`UK` is not part of the `enum`). However, it succeeds in the current `master` version of RapidJSON.\r\n\r\nI found this is because in the `HandleRefSchema` function, `remoteDocument->GetSchema(pointer)` returns a null pointer. In the case of `y.json`, the pointer `/definitions/country` is not part of the internal `schemaMap_`.  Since RapidJSON silently ignores this, the validation succeeds.\r\n\r\nI'm not sure if this is intended behaviour - maybe I'm using the library in some wrong way, but I've attached a fix that resolves this problem (storing the schema pointer with a non-owning pointer to the remote schema).\r\n\r\nThanks for your great work!","created_at":"2018-03-23T22:42:26Z","updated_at":"2018-03-23T22:42:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Tencent/rapidjson/pulls/1210/commits","review_comments_url":"https://api.github.com/repos/Tencent/rapidjson/pulls/1210/comments","review_comment_url":"https://api.github.com/repos/Tencent/rapidjson/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Tencent/rapidjson/issues/1210/comments","statuses_url":"https://api.github.com/repos/Tencent/rapidjson/statuses/8a6c345bcc58b1e1e96ac0cddf42ca373fcf13bd","head":{"label":"foxtacles:fix-missing-remote-ref-p","ref":"fix-missing-remote-ref-p","sha":"8a6c345bcc58b1e1e96ac0cddf42ca373fcf13bd","user":{"login":"foxtacles","id":1135351,"avatar_url":"https://avatars2.githubusercontent.com/u/1135351?v=4","gravatar_id":"","url":"https://api.github.com/users/foxtacles","html_url":"https://github.com/foxtacles","followers_url":"https://api.github.com/users/foxtacles/followers","following_url":"https://api.github.com/users/foxtacles/following{/other_user}","gists_url":"https://api.github.com/users/foxtacles/gists{/gist_id}","starred_url":"https://api.github.com/users/foxtacles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxtacles/subscriptions","organizations_url":"https://api.github.com/users/foxtacles/orgs","repos_url":"https://api.github.com/users/foxtacles/repos","events_url":"https://api.github.com/users/foxtacles/events{/privacy}","received_events_url":"https://api.github.com/users/foxtacles/received_events","type":"User","site_admin":false},"repo":{"id":126541974,"name":"rapidjson","full_name":"foxtacles/rapidjson","owner":{"login":"foxtacles","id":1135351,"avatar_url":"https://avatars2.githubusercontent.com/u/1135351?v=4","gravatar_id":"","url":"https://api.github.com/users/foxtacles","html_url":"https://github.com/foxtacles","followers_url":"https://api.github.com/users/foxtacles/followers","following_url":"https://api.github.com/users/foxtacles/following{/other_user}","gists_url":"https://api.github.com/users/foxtacles/gists{/gist_id}","starred_url":"https://api.github.com/users/foxtacles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxtacles/subscriptions","organizations_url":"https://api.github.com/users/foxtacles/orgs","repos_url":"https://api.github.com/users/foxtacles/repos","events_url":"https://api.github.com/users/foxtacles/events{/privacy}","received_events_url":"https://api.github.com/users/foxtacles/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/foxtacles/rapidjson","description":"A fast JSON parser/generator for C++ with both SAX/DOM style API","fork":true,"url":"https://api.github.com/repos/foxtacles/rapidjson","forks_url":"https://api.github.com/repos/foxtacles/rapidjson/forks","keys_url":"https://api.github.com/repos/foxtacles/rapidjson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/foxtacles/rapidjson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/foxtacles/rapidjson/teams","hooks_url":"https://api.github.com/repos/foxtacles/rapidjson/hooks","issue_events_url":"https://api.github.com/repos/foxtacles/rapidjson/issues/events{/number}","events_url":"https://api.github.com/repos/foxtacles/rapidjson/events","assignees_url":"https://api.github.com/repos/foxtacles/rapidjson/assignees{/user}","branches_url":"https://api.github.com/repos/foxtacles/rapidjson/branches{/branch}","tags_url":"https://api.github.com/repos/foxtacles/rapidjson/tags","blobs_url":"https://api.github.com/repos/foxtacles/rapidjson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/foxtacles/rapidjson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/foxtacles/rapidjson/git/refs{/sha}","trees_url":"https://api.github.com/repos/foxtacles/rapidjson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/foxtacles/rapidjson/statuses/{sha}","languages_url":"https://api.github.com/repos/foxtacles/rapidjson/languages","stargazers_url":"https://api.github.com/repos/foxtacles/rapidjson/stargazers","contributors_url":"https://api.github.com/repos/foxtacles/rapidjson/contributors","subscribers_url":"https://api.github.com/repos/foxtacles/rapidjson/subscribers","subscription_url":"https://api.github.com/repos/foxtacles/rapidjson/subscription","commits_url":"https://api.github.com/repos/foxtacles/rapidjson/commits{/sha}","git_commits_url":"https://api.github.com/repos/foxtacles/rapidjson/git/commits{/sha}","comments_url":"https://api.github.com/repos/foxtacles/rapidjson/comments{/number}","issue_comment_url":"https://api.github.com/repos/foxtacles/rapidjson/issues/comments{/number}","contents_url":"https://api.github.com/repos/foxtacles/rapidjson/contents/{+path}","compare_url":"https://api.github.com/repos/foxtacles/rapidjson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/foxtacles/rapidjson/merges","archive_url":"https://api.github.com/repos/foxtacles/rapidjson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/foxtacles/rapidjson/downloads","issues_url":"https://api.github.com/repos/foxtacles/rapidjson/issues{/number}","pulls_url":"https://api.github.com/repos/foxtacles/rapidjson/pulls{/number}","milestones_url":"https://api.github.com/repos/foxtacles/rapidjson/milestones{/number}","notifications_url":"https://api.github.com/repos/foxtacles/rapidjson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/foxtacles/rapidjson/labels{/name}","releases_url":"https://api.github.com/repos/foxtacles/rapidjson/releases{/id}","deployments_url":"https://api.github.com/repos/foxtacles/rapidjson/deployments","created_at":"2018-03-23T21:47:51Z","updated_at":"2018-03-23T21:47:54Z","pushed_at":"2018-03-23T22:33:26Z","git_url":"git://github.com/foxtacles/rapidjson.git","ssh_url":"git@github.com:foxtacles/rapidjson.git","clone_url":"https://github.com/foxtacles/rapidjson.git","svn_url":"https://github.com/foxtacles/rapidjson","homepage":"http://rapidjson.org/","size":23699,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"Tencent:master","ref":"master","sha":"67a17cfdbc25ff1fc8d01714be87e242b03a4cc9","user":{"login":"Tencent","id":18461506,"avatar_url":"https://avatars3.githubusercontent.com/u/18461506?v=4","gravatar_id":"","url":"https://api.github.com/users/Tencent","html_url":"https://github.com/Tencent","followers_url":"https://api.github.com/users/Tencent/followers","following_url":"https://api.github.com/users/Tencent/following{/other_user}","gists_url":"https://api.github.com/users/Tencent/gists{/gist_id}","starred_url":"https://api.github.com/users/Tencent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tencent/subscriptions","organizations_url":"https://api.github.com/users/Tencent/orgs","repos_url":"https://api.github.com/users/Tencent/repos","events_url":"https://api.github.com/users/Tencent/events{/privacy}","received_events_url":"https://api.github.com/users/Tencent/received_events","type":"Organization","site_admin":false},"repo":{"id":17391973,"name":"rapidjson","full_name":"Tencent/rapidjson","owner":{"login":"Tencent","id":18461506,"avatar_url":"https://avatars3.githubusercontent.com/u/18461506?v=4","gravatar_id":"","url":"https://api.github.com/users/Tencent","html_url":"https://github.com/Tencent","followers_url":"https://api.github.com/users/Tencent/followers","following_url":"https://api.github.com/users/Tencent/following{/other_user}","gists_url":"https://api.github.com/users/Tencent/gists{/gist_id}","starred_url":"https://api.github.com/users/Tencent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tencent/subscriptions","organizations_url":"https://api.github.com/users/Tencent/orgs","repos_url":"https://api.github.com/users/Tencent/repos","events_url":"https://api.github.com/users/Tencent/events{/privacy}","received_events_url":"https://api.github.com/users/Tencent/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Tencent/rapidjson","description":"A fast JSON parser/generator for C++ with both SAX/DOM style API","fork":false,"url":"https://api.github.com/repos/Tencent/rapidjson","forks_url":"https://api.github.com/repos/Tencent/rapidjson/forks","keys_url":"https://api.github.com/repos/Tencent/rapidjson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tencent/rapidjson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tencent/rapidjson/teams","hooks_url":"https://api.github.com/repos/Tencent/rapidjson/hooks","issue_events_url":"https://api.github.com/repos/Tencent/rapidjson/issues/events{/number}","events_url":"https://api.github.com/repos/Tencent/rapidjson/events","assignees_url":"https://api.github.com/repos/Tencent/rapidjson/assignees{/user}","branches_url":"https://api.github.com/repos/Tencent/rapidjson/branches{/branch}","tags_url":"https://api.github.com/repos/Tencent/rapidjson/tags","blobs_url":"https://api.github.com/repos/Tencent/rapidjson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tencent/rapidjson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tencent/rapidjson/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tencent/rapidjson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tencent/rapidjson/statuses/{sha}","languages_url":"https://api.github.com/repos/Tencent/rapidjson/languages","stargazers_url":"https://api.github.com/repos/Tencent/rapidjson/stargazers","contributors_url":"https://api.github.com/repos/Tencent/rapidjson/contributors","subscribers_url":"https://api.github.com/repos/Tencent/rapidjson/subscribers","subscription_url":"https://api.github.com/repos/Tencent/rapidjson/subscription","commits_url":"https://api.github.com/repos/Tencent/rapidjson/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tencent/rapidjson/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tencent/rapidjson/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tencent/rapidjson/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tencent/rapidjson/contents/{+path}","compare_url":"https://api.github.com/repos/Tencent/rapidjson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tencent/rapidjson/merges","archive_url":"https://api.github.com/repos/Tencent/rapidjson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tencent/rapidjson/downloads","issues_url":"https://api.github.com/repos/Tencent/rapidjson/issues{/number}","pulls_url":"https://api.github.com/repos/Tencent/rapidjson/pulls{/number}","milestones_url":"https://api.github.com/repos/Tencent/rapidjson/milestones{/number}","notifications_url":"https://api.github.com/repos/Tencent/rapidjson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tencent/rapidjson/labels{/name}","releases_url":"https://api.github.com/repos/Tencent/rapidjson/releases{/id}","deployments_url":"https://api.github.com/repos/Tencent/rapidjson/deployments","created_at":"2014-03-04T05:53:37Z","updated_at":"2018-03-23T16:04:00Z","pushed_at":"2018-03-20T12:38:54Z","git_url":"git://github.com/Tencent/rapidjson.git","ssh_url":"git@github.com:Tencent/rapidjson.git","clone_url":"https://github.com/Tencent/rapidjson.git","svn_url":"https://github.com/Tencent/rapidjson","homepage":"http://rapidjson.org/","size":23699,"stargazers_count":5713,"watchers_count":5713,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1715,"mirror_url":null,"archived":false,"open_issues_count":223,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":1715,"open_issues":223,"watchers":5713,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Tencent/rapidjson/pulls/1210"},"html":{"href":"https://github.com/Tencent/rapidjson/pull/1210"},"issue":{"href":"https://api.github.com/repos/Tencent/rapidjson/issues/1210"},"comments":{"href":"https://api.github.com/repos/Tencent/rapidjson/issues/1210/comments"},"review_comments":{"href":"https://api.github.com/repos/Tencent/rapidjson/pulls/1210/comments"},"review_comment":{"href":"https://api.github.com/repos/Tencent/rapidjson/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Tencent/rapidjson/pulls/1210/commits"},"statuses":{"href":"https://api.github.com/repos/Tencent/rapidjson/statuses/8a6c345bcc58b1e1e96ac0cddf42ca373fcf13bd"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":1,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"foxtacles"}}