{"action":"created","comment":{"url":"https://api.github.com/repos/twotoasters/TWTValidation/pulls/comments/23255248","id":23255248,"diff_hunk":"@@ -0,0 +1,64 @@\n+//\n+//  TWTJSONSchemaAmbiguousASTNode.h\n+//  TWTValidation\n+//\n+//  Created by Jill Cohen on 1/12/15.\n+//  Copyright (c) 2015 Two Toasters, LLC.\n+//\n+//  Permission is hereby granted, free of charge, to any person obtaining a copy\n+//  of this software and associated documentation files (the \"Software\"), to deal\n+//  in the Software without restriction, including without limitation the rights\n+//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+//  copies of the Software, and to permit persons to whom the Software is\n+//  furnished to do so, subject to the following conditions:\n+//\n+//  The above copyright notice and this permission notice shall be included in\n+//  all copies or substantial portions of the Software.\n+//\n+//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+//  THE SOFTWARE.\n+//\n+\n+#import <TWTValidation/TWTJSONSchemaASTNode.h>\n+\n+\n+@interface TWTJSONSchemaAmbiguousASTNode : TWTJSONSchemaASTNode\n+\n+@property (nonatomic, copy, readwrite) NSSet *validTypes;\n+\n+// Array keywords\n+@property (nonatomic, strong) NSNumber *maximumItemCount;\n+@property (nonatomic, strong) NSNumber *minimumItemCount;\n+@property (nonatomic, assign) BOOL requiresUniqueItems;\n+@property (nonatomic, assign) BOOL itemsIsSingleSchema;","path":"TWTValidation/JSON Validator/AST Nodes/TWTJSONSchemaAmbiguousASTNode.h","position":38,"original_position":38,"commit_id":"b841728c33ecfcc569485e017fd7b523a54d0edc","original_commit_id":"b841728c33ecfcc569485e017fd7b523a54d0edc","user":{"login":"jillhc","id":7916504,"avatar_url":"https://avatars.githubusercontent.com/u/7916504?v=3","gravatar_id":"","url":"https://api.github.com/users/jillhc","html_url":"https://github.com/jillhc","followers_url":"https://api.github.com/users/jillhc/followers","following_url":"https://api.github.com/users/jillhc/following{/other_user}","gists_url":"https://api.github.com/users/jillhc/gists{/gist_id}","starred_url":"https://api.github.com/users/jillhc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jillhc/subscriptions","organizations_url":"https://api.github.com/users/jillhc/orgs","repos_url":"https://api.github.com/users/jillhc/repos","events_url":"https://api.github.com/users/jillhc/events{/privacy}","received_events_url":"https://api.github.com/users/jillhc/received_events","type":"User","site_admin":false},"body":"In the original schema, value of `items` is either a schema or an array of schemas, and an array of 1 schema has a different meaning than a single schema. (If it's an array, then during validation the first schema matches with the first item, second with the second, etc. If it's a single schema, that is used to validate all items.)\r\n\r\nAnother way to represent this would be have `node.items` be type `id` and either have an array or a node as its value, then check the class in the processor. What do you think?","created_at":"2015-01-20T20:59:29Z","updated_at":"2015-01-20T20:59:29Z","html_url":"https://github.com/twotoasters/TWTValidation/pull/30#discussion_r23255248","pull_request_url":"https://api.github.com/repos/twotoasters/TWTValidation/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/twotoasters/TWTValidation/pulls/comments/23255248"},"html":{"href":"https://github.com/twotoasters/TWTValidation/pull/30#discussion_r23255248"},"pull_request":{"href":"https://api.github.com/repos/twotoasters/TWTValidation/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/twotoasters/TWTValidation/pulls/30","id":27298943,"html_url":"https://github.com/twotoasters/TWTValidation/pull/30","diff_url":"https://github.com/twotoasters/TWTValidation/pull/30.diff","patch_url":"https://github.com/twotoasters/TWTValidation/pull/30.patch","issue_url":"https://api.github.com/repos/twotoasters/TWTValidation/issues/30","number":30,"state":"open","locked":false,"title":"Add pretty printer test target and shell script, add ambiguous node class","user":{"login":"jillhc","id":7916504,"avatar_url":"https://avatars.githubusercontent.com/u/7916504?v=3","gravatar_id":"","url":"https://api.github.com/users/jillhc","html_url":"https://github.com/jillhc","followers_url":"https://api.github.com/users/jillhc/followers","following_url":"https://api.github.com/users/jillhc/following{/other_user}","gists_url":"https://api.github.com/users/jillhc/gists{/gist_id}","starred_url":"https://api.github.com/users/jillhc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jillhc/subscriptions","organizations_url":"https://api.github.com/users/jillhc/orgs","repos_url":"https://api.github.com/users/jillhc/repos","events_url":"https://api.github.com/users/jillhc/events{/privacy}","received_events_url":"https://api.github.com/users/jillhc/received_events","type":"User","site_admin":false},"body":"Includes refactoring parser so that nodes are initialized in `parseSchema:` and type parser methods only parse type-specific keywords, so that they can be reused by `parseAmbiguousSchema:`","created_at":"2015-01-13T19:49:32Z","updated_at":"2015-01-20T20:59:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9211c5708af017e79552d2e86382a90d6e49ee33","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/twotoasters/TWTValidation/pulls/30/commits","review_comments_url":"https://api.github.com/repos/twotoasters/TWTValidation/pulls/30/comments","review_comment_url":"https://api.github.com/repos/twotoasters/TWTValidation/pulls/comments/{number}","comments_url":"https://api.github.com/repos/twotoasters/TWTValidation/issues/30/comments","statuses_url":"https://api.github.com/repos/twotoasters/TWTValidation/statuses/b841728c33ecfcc569485e017fd7b523a54d0edc","head":{"label":"twotoasters:test-printer","ref":"test-printer","sha":"b841728c33ecfcc569485e017fd7b523a54d0edc","user":{"login":"twotoasters","id":112994,"avatar_url":"https://avatars.githubusercontent.com/u/112994?v=3","gravatar_id":"","url":"https://api.github.com/users/twotoasters","html_url":"https://github.com/twotoasters","followers_url":"https://api.github.com/users/twotoasters/followers","following_url":"https://api.github.com/users/twotoasters/following{/other_user}","gists_url":"https://api.github.com/users/twotoasters/gists{/gist_id}","starred_url":"https://api.github.com/users/twotoasters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twotoasters/subscriptions","organizations_url":"https://api.github.com/users/twotoasters/orgs","repos_url":"https://api.github.com/users/twotoasters/repos","events_url":"https://api.github.com/users/twotoasters/events{/privacy}","received_events_url":"https://api.github.com/users/twotoasters/received_events","type":"Organization","site_admin":false},"repo":{"id":18248731,"name":"TWTValidation","full_name":"twotoasters/TWTValidation","owner":{"login":"twotoasters","id":112994,"avatar_url":"https://avatars.githubusercontent.com/u/112994?v=3","gravatar_id":"","url":"https://api.github.com/users/twotoasters","html_url":"https://github.com/twotoasters","followers_url":"https://api.github.com/users/twotoasters/followers","following_url":"https://api.github.com/users/twotoasters/following{/other_user}","gists_url":"https://api.github.com/users/twotoasters/gists{/gist_id}","starred_url":"https://api.github.com/users/twotoasters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twotoasters/subscriptions","organizations_url":"https://api.github.com/users/twotoasters/orgs","repos_url":"https://api.github.com/users/twotoasters/repos","events_url":"https://api.github.com/users/twotoasters/events{/privacy}","received_events_url":"https://api.github.com/users/twotoasters/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twotoasters/TWTValidation","description":"TWTValidation is a Cocoa framework for declaratively validating data.","fork":false,"url":"https://api.github.com/repos/twotoasters/TWTValidation","forks_url":"https://api.github.com/repos/twotoasters/TWTValidation/forks","keys_url":"https://api.github.com/repos/twotoasters/TWTValidation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twotoasters/TWTValidation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twotoasters/TWTValidation/teams","hooks_url":"https://api.github.com/repos/twotoasters/TWTValidation/hooks","issue_events_url":"https://api.github.com/repos/twotoasters/TWTValidation/issues/events{/number}","events_url":"https://api.github.com/repos/twotoasters/TWTValidation/events","assignees_url":"https://api.github.com/repos/twotoasters/TWTValidation/assignees{/user}","branches_url":"https://api.github.com/repos/twotoasters/TWTValidation/branches{/branch}","tags_url":"https://api.github.com/repos/twotoasters/TWTValidation/tags","blobs_url":"https://api.github.com/repos/twotoasters/TWTValidation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twotoasters/TWTValidation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twotoasters/TWTValidation/git/refs{/sha}","trees_url":"https://api.github.com/repos/twotoasters/TWTValidation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twotoasters/TWTValidation/statuses/{sha}","languages_url":"https://api.github.com/repos/twotoasters/TWTValidation/languages","stargazers_url":"https://api.github.com/repos/twotoasters/TWTValidation/stargazers","contributors_url":"https://api.github.com/repos/twotoasters/TWTValidation/contributors","subscribers_url":"https://api.github.com/repos/twotoasters/TWTValidation/subscribers","subscription_url":"https://api.github.com/repos/twotoasters/TWTValidation/subscription","commits_url":"https://api.github.com/repos/twotoasters/TWTValidation/commits{/sha}","git_commits_url":"https://api.github.com/repos/twotoasters/TWTValidation/git/commits{/sha}","comments_url":"https://api.github.com/repos/twotoasters/TWTValidation/comments{/number}","issue_comment_url":"https://api.github.com/repos/twotoasters/TWTValidation/issues/comments/{number}","contents_url":"https://api.github.com/repos/twotoasters/TWTValidation/contents/{+path}","compare_url":"https://api.github.com/repos/twotoasters/TWTValidation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twotoasters/TWTValidation/merges","archive_url":"https://api.github.com/repos/twotoasters/TWTValidation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twotoasters/TWTValidation/downloads","issues_url":"https://api.github.com/repos/twotoasters/TWTValidation/issues{/number}","pulls_url":"https://api.github.com/repos/twotoasters/TWTValidation/pulls{/number}","milestones_url":"https://api.github.com/repos/twotoasters/TWTValidation/milestones{/number}","notifications_url":"https://api.github.com/repos/twotoasters/TWTValidation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twotoasters/TWTValidation/labels{/name}","releases_url":"https://api.github.com/repos/twotoasters/TWTValidation/releases{/id}","created_at":"2014-03-29T19:19:21Z","updated_at":"2015-01-13T19:40:35Z","pushed_at":"2015-01-13T21:00:46Z","git_url":"git://github.com/twotoasters/TWTValidation.git","ssh_url":"git@github.com:twotoasters/TWTValidation.git","clone_url":"https://github.com/twotoasters/TWTValidation.git","svn_url":"https://github.com/twotoasters/TWTValidation","homepage":"","size":1021,"stargazers_count":15,"watchers_count":15,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":15,"default_branch":"master"}},"base":{"label":"twotoasters:master","ref":"master","sha":"4c7c8442f4c9340d829be9d33b68d9561a03a461","user":{"login":"twotoasters","id":112994,"avatar_url":"https://avatars.githubusercontent.com/u/112994?v=3","gravatar_id":"","url":"https://api.github.com/users/twotoasters","html_url":"https://github.com/twotoasters","followers_url":"https://api.github.com/users/twotoasters/followers","following_url":"https://api.github.com/users/twotoasters/following{/other_user}","gists_url":"https://api.github.com/users/twotoasters/gists{/gist_id}","starred_url":"https://api.github.com/users/twotoasters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twotoasters/subscriptions","organizations_url":"https://api.github.com/users/twotoasters/orgs","repos_url":"https://api.github.com/users/twotoasters/repos","events_url":"https://api.github.com/users/twotoasters/events{/privacy}","received_events_url":"https://api.github.com/users/twotoasters/received_events","type":"Organization","site_admin":false},"repo":{"id":18248731,"name":"TWTValidation","full_name":"twotoasters/TWTValidation","owner":{"login":"twotoasters","id":112994,"avatar_url":"https://avatars.githubusercontent.com/u/112994?v=3","gravatar_id":"","url":"https://api.github.com/users/twotoasters","html_url":"https://github.com/twotoasters","followers_url":"https://api.github.com/users/twotoasters/followers","following_url":"https://api.github.com/users/twotoasters/following{/other_user}","gists_url":"https://api.github.com/users/twotoasters/gists{/gist_id}","starred_url":"https://api.github.com/users/twotoasters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twotoasters/subscriptions","organizations_url":"https://api.github.com/users/twotoasters/orgs","repos_url":"https://api.github.com/users/twotoasters/repos","events_url":"https://api.github.com/users/twotoasters/events{/privacy}","received_events_url":"https://api.github.com/users/twotoasters/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twotoasters/TWTValidation","description":"TWTValidation is a Cocoa framework for declaratively validating data.","fork":false,"url":"https://api.github.com/repos/twotoasters/TWTValidation","forks_url":"https://api.github.com/repos/twotoasters/TWTValidation/forks","keys_url":"https://api.github.com/repos/twotoasters/TWTValidation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twotoasters/TWTValidation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twotoasters/TWTValidation/teams","hooks_url":"https://api.github.com/repos/twotoasters/TWTValidation/hooks","issue_events_url":"https://api.github.com/repos/twotoasters/TWTValidation/issues/events{/number}","events_url":"https://api.github.com/repos/twotoasters/TWTValidation/events","assignees_url":"https://api.github.com/repos/twotoasters/TWTValidation/assignees{/user}","branches_url":"https://api.github.com/repos/twotoasters/TWTValidation/branches{/branch}","tags_url":"https://api.github.com/repos/twotoasters/TWTValidation/tags","blobs_url":"https://api.github.com/repos/twotoasters/TWTValidation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twotoasters/TWTValidation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twotoasters/TWTValidation/git/refs{/sha}","trees_url":"https://api.github.com/repos/twotoasters/TWTValidation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twotoasters/TWTValidation/statuses/{sha}","languages_url":"https://api.github.com/repos/twotoasters/TWTValidation/languages","stargazers_url":"https://api.github.com/repos/twotoasters/TWTValidation/stargazers","contributors_url":"https://api.github.com/repos/twotoasters/TWTValidation/contributors","subscribers_url":"https://api.github.com/repos/twotoasters/TWTValidation/subscribers","subscription_url":"https://api.github.com/repos/twotoasters/TWTValidation/subscription","commits_url":"https://api.github.com/repos/twotoasters/TWTValidation/commits{/sha}","git_commits_url":"https://api.github.com/repos/twotoasters/TWTValidation/git/commits{/sha}","comments_url":"https://api.github.com/repos/twotoasters/TWTValidation/comments{/number}","issue_comment_url":"https://api.github.com/repos/twotoasters/TWTValidation/issues/comments/{number}","contents_url":"https://api.github.com/repos/twotoasters/TWTValidation/contents/{+path}","compare_url":"https://api.github.com/repos/twotoasters/TWTValidation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twotoasters/TWTValidation/merges","archive_url":"https://api.github.com/repos/twotoasters/TWTValidation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twotoasters/TWTValidation/downloads","issues_url":"https://api.github.com/repos/twotoasters/TWTValidation/issues{/number}","pulls_url":"https://api.github.com/repos/twotoasters/TWTValidation/pulls{/number}","milestones_url":"https://api.github.com/repos/twotoasters/TWTValidation/milestones{/number}","notifications_url":"https://api.github.com/repos/twotoasters/TWTValidation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twotoasters/TWTValidation/labels{/name}","releases_url":"https://api.github.com/repos/twotoasters/TWTValidation/releases{/id}","created_at":"2014-03-29T19:19:21Z","updated_at":"2015-01-13T19:40:35Z","pushed_at":"2015-01-13T21:00:46Z","git_url":"git://github.com/twotoasters/TWTValidation.git","ssh_url":"git@github.com:twotoasters/TWTValidation.git","clone_url":"https://github.com/twotoasters/TWTValidation.git","svn_url":"https://github.com/twotoasters/TWTValidation","homepage":"","size":1021,"stargazers_count":15,"watchers_count":15,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/twotoasters/TWTValidation/pulls/30"},"html":{"href":"https://github.com/twotoasters/TWTValidation/pull/30"},"issue":{"href":"https://api.github.com/repos/twotoasters/TWTValidation/issues/30"},"comments":{"href":"https://api.github.com/repos/twotoasters/TWTValidation/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/twotoasters/TWTValidation/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/twotoasters/TWTValidation/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/twotoasters/TWTValidation/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/twotoasters/TWTValidation/statuses/b841728c33ecfcc569485e017fd7b523a54d0edc"}}}}