{"action":"opened","number":63,"pull_request":{"url":"https://api.github.com/repos/pipermerriam/flex/pulls/63","id":30901754,"html_url":"https://github.com/pipermerriam/flex/pull/63","diff_url":"https://github.com/pipermerriam/flex/pull/63.diff","patch_url":"https://github.com/pipermerriam/flex/pull/63.patch","issue_url":"https://api.github.com/repos/pipermerriam/flex/issues/63","number":63,"state":"open","locked":false,"title":"Fixes #62 - Proper handling of required field on schema objects","user":{"login":"pipermerriam","id":824194,"avatar_url":"https://avatars.githubusercontent.com/u/824194?v=3","gravatar_id":"","url":"https://api.github.com/users/pipermerriam","html_url":"https://github.com/pipermerriam","followers_url":"https://api.github.com/users/pipermerriam/followers","following_url":"https://api.github.com/users/pipermerriam/following{/other_user}","gists_url":"https://api.github.com/users/pipermerriam/gists{/gist_id}","starred_url":"https://api.github.com/users/pipermerriam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pipermerriam/subscriptions","organizations_url":"https://api.github.com/users/pipermerriam/orgs","repos_url":"https://api.github.com/users/pipermerriam/repos","events_url":"https://api.github.com/users/pipermerriam/events{/privacy}","received_events_url":"https://api.github.com/users/pipermerriam/received_events","type":"User","site_admin":false},"body":"### What is the problem / feature ?\r\n\r\nFlex was expecting the following usage of the `required` keyword argument for schema objects.\r\n\r\n```yaml\r\nPet:\r\n    properties:\r\n      id:\r\n        type: integer\r\n        required: true\r\n        format: int64\r\n      name:\r\n        type: string\r\n        required: true\r\n```\r\n\r\n\r\n### How did it get fixed / implemented ?\r\n\r\nChanged the handling to match the \r\n[json schema required spec](http://json-schema.org/latest/json-schema-validation.html#anchor61)\r\n\r\n> The value of this keyword MUST be an array. This array MUST have at least one element. Elements of this array MUST be strings, and MUST be unique.\r\n\r\n```yaml\r\nPet:\r\n    required:\r\n      - id\r\n      - name\r\n    properties:\r\n      id:\r\n        type: integer\r\n        format: int64\r\n      name:\r\n        type: string\r\n```\r\n### How can someone test / see it ?\r\n\r\nSee that usage of the `required` keyword as a list of field names validates correctly.\r\n\r\n*Here is a cute animal picture for your troubles...*\r\n\r\n![7a410e8a03c5595c74e0036d0dda1e71](https://cloud.githubusercontent.com/assets/824194/6587283/ebd2e750-c747-11e4-8c00-9ccddb94f3ec.jpg)\r\n","created_at":"2015-03-10T23:07:26Z","updated_at":"2015-03-10T23:07:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"25e476f47aba1421bbe7a18860b84efcad0575f1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pipermerriam/flex/pulls/63/commits","review_comments_url":"https://api.github.com/repos/pipermerriam/flex/pulls/63/comments","review_comment_url":"https://api.github.com/repos/pipermerriam/flex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pipermerriam/flex/issues/63/comments","statuses_url":"https://api.github.com/repos/pipermerriam/flex/statuses/178a491021d836f835e4717d429712aa346fd6a4","head":{"label":"pipermerriam:piper/fix-required-keyword","ref":"piper/fix-required-keyword","sha":"178a491021d836f835e4717d429712aa346fd6a4","user":{"login":"pipermerriam","id":824194,"avatar_url":"https://avatars.githubusercontent.com/u/824194?v=3","gravatar_id":"","url":"https://api.github.com/users/pipermerriam","html_url":"https://github.com/pipermerriam","followers_url":"https://api.github.com/users/pipermerriam/followers","following_url":"https://api.github.com/users/pipermerriam/following{/other_user}","gists_url":"https://api.github.com/users/pipermerriam/gists{/gist_id}","starred_url":"https://api.github.com/users/pipermerriam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pipermerriam/subscriptions","organizations_url":"https://api.github.com/users/pipermerriam/orgs","repos_url":"https://api.github.com/users/pipermerriam/repos","events_url":"https://api.github.com/users/pipermerriam/events{/privacy}","received_events_url":"https://api.github.com/users/pipermerriam/received_events","type":"User","site_admin":false},"repo":{"id":25334762,"name":"flex","full_name":"pipermerriam/flex","owner":{"login":"pipermerriam","id":824194,"avatar_url":"https://avatars.githubusercontent.com/u/824194?v=3","gravatar_id":"","url":"https://api.github.com/users/pipermerriam","html_url":"https://github.com/pipermerriam","followers_url":"https://api.github.com/users/pipermerriam/followers","following_url":"https://api.github.com/users/pipermerriam/following{/other_user}","gists_url":"https://api.github.com/users/pipermerriam/gists{/gist_id}","starred_url":"https://api.github.com/users/pipermerriam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pipermerriam/subscriptions","organizations_url":"https://api.github.com/users/pipermerriam/orgs","repos_url":"https://api.github.com/users/pipermerriam/repos","events_url":"https://api.github.com/users/pipermerriam/events{/privacy}","received_events_url":"https://api.github.com/users/pipermerriam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pipermerriam/flex","description":"Swagger schema validator","fork":false,"url":"https://api.github.com/repos/pipermerriam/flex","forks_url":"https://api.github.com/repos/pipermerriam/flex/forks","keys_url":"https://api.github.com/repos/pipermerriam/flex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pipermerriam/flex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pipermerriam/flex/teams","hooks_url":"https://api.github.com/repos/pipermerriam/flex/hooks","issue_events_url":"https://api.github.com/repos/pipermerriam/flex/issues/events{/number}","events_url":"https://api.github.com/repos/pipermerriam/flex/events","assignees_url":"https://api.github.com/repos/pipermerriam/flex/assignees{/user}","branches_url":"https://api.github.com/repos/pipermerriam/flex/branches{/branch}","tags_url":"https://api.github.com/repos/pipermerriam/flex/tags","blobs_url":"https://api.github.com/repos/pipermerriam/flex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pipermerriam/flex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pipermerriam/flex/git/refs{/sha}","trees_url":"https://api.github.com/repos/pipermerriam/flex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pipermerriam/flex/statuses/{sha}","languages_url":"https://api.github.com/repos/pipermerriam/flex/languages","stargazers_url":"https://api.github.com/repos/pipermerriam/flex/stargazers","contributors_url":"https://api.github.com/repos/pipermerriam/flex/contributors","subscribers_url":"https://api.github.com/repos/pipermerriam/flex/subscribers","subscription_url":"https://api.github.com/repos/pipermerriam/flex/subscription","commits_url":"https://api.github.com/repos/pipermerriam/flex/commits{/sha}","git_commits_url":"https://api.github.com/repos/pipermerriam/flex/git/commits{/sha}","comments_url":"https://api.github.com/repos/pipermerriam/flex/comments{/number}","issue_comment_url":"https://api.github.com/repos/pipermerriam/flex/issues/comments{/number}","contents_url":"https://api.github.com/repos/pipermerriam/flex/contents/{+path}","compare_url":"https://api.github.com/repos/pipermerriam/flex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pipermerriam/flex/merges","archive_url":"https://api.github.com/repos/pipermerriam/flex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pipermerriam/flex/downloads","issues_url":"https://api.github.com/repos/pipermerriam/flex/issues{/number}","pulls_url":"https://api.github.com/repos/pipermerriam/flex/pulls{/number}","milestones_url":"https://api.github.com/repos/pipermerriam/flex/milestones{/number}","notifications_url":"https://api.github.com/repos/pipermerriam/flex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pipermerriam/flex/labels{/name}","releases_url":"https://api.github.com/repos/pipermerriam/flex/releases{/id}","created_at":"2014-10-17T02:54:06Z","updated_at":"2015-02-20T19:13:25Z","pushed_at":"2015-03-10T23:04:16Z","git_url":"git://github.com/pipermerriam/flex.git","ssh_url":"git@github.com:pipermerriam/flex.git","clone_url":"https://github.com/pipermerriam/flex.git","svn_url":"https://github.com/pipermerriam/flex","homepage":null,"size":1753,"stargazers_count":11,"watchers_count":11,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":8,"forks":7,"open_issues":8,"watchers":11,"default_branch":"master"}},"base":{"label":"pipermerriam:master","ref":"master","sha":"a4da279c43bc581cb8577d61ccbd6b6cf5d41d80","user":{"login":"pipermerriam","id":824194,"avatar_url":"https://avatars.githubusercontent.com/u/824194?v=3","gravatar_id":"","url":"https://api.github.com/users/pipermerriam","html_url":"https://github.com/pipermerriam","followers_url":"https://api.github.com/users/pipermerriam/followers","following_url":"https://api.github.com/users/pipermerriam/following{/other_user}","gists_url":"https://api.github.com/users/pipermerriam/gists{/gist_id}","starred_url":"https://api.github.com/users/pipermerriam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pipermerriam/subscriptions","organizations_url":"https://api.github.com/users/pipermerriam/orgs","repos_url":"https://api.github.com/users/pipermerriam/repos","events_url":"https://api.github.com/users/pipermerriam/events{/privacy}","received_events_url":"https://api.github.com/users/pipermerriam/received_events","type":"User","site_admin":false},"repo":{"id":25334762,"name":"flex","full_name":"pipermerriam/flex","owner":{"login":"pipermerriam","id":824194,"avatar_url":"https://avatars.githubusercontent.com/u/824194?v=3","gravatar_id":"","url":"https://api.github.com/users/pipermerriam","html_url":"https://github.com/pipermerriam","followers_url":"https://api.github.com/users/pipermerriam/followers","following_url":"https://api.github.com/users/pipermerriam/following{/other_user}","gists_url":"https://api.github.com/users/pipermerriam/gists{/gist_id}","starred_url":"https://api.github.com/users/pipermerriam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pipermerriam/subscriptions","organizations_url":"https://api.github.com/users/pipermerriam/orgs","repos_url":"https://api.github.com/users/pipermerriam/repos","events_url":"https://api.github.com/users/pipermerriam/events{/privacy}","received_events_url":"https://api.github.com/users/pipermerriam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pipermerriam/flex","description":"Swagger schema validator","fork":false,"url":"https://api.github.com/repos/pipermerriam/flex","forks_url":"https://api.github.com/repos/pipermerriam/flex/forks","keys_url":"https://api.github.com/repos/pipermerriam/flex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pipermerriam/flex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pipermerriam/flex/teams","hooks_url":"https://api.github.com/repos/pipermerriam/flex/hooks","issue_events_url":"https://api.github.com/repos/pipermerriam/flex/issues/events{/number}","events_url":"https://api.github.com/repos/pipermerriam/flex/events","assignees_url":"https://api.github.com/repos/pipermerriam/flex/assignees{/user}","branches_url":"https://api.github.com/repos/pipermerriam/flex/branches{/branch}","tags_url":"https://api.github.com/repos/pipermerriam/flex/tags","blobs_url":"https://api.github.com/repos/pipermerriam/flex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pipermerriam/flex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pipermerriam/flex/git/refs{/sha}","trees_url":"https://api.github.com/repos/pipermerriam/flex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pipermerriam/flex/statuses/{sha}","languages_url":"https://api.github.com/repos/pipermerriam/flex/languages","stargazers_url":"https://api.github.com/repos/pipermerriam/flex/stargazers","contributors_url":"https://api.github.com/repos/pipermerriam/flex/contributors","subscribers_url":"https://api.github.com/repos/pipermerriam/flex/subscribers","subscription_url":"https://api.github.com/repos/pipermerriam/flex/subscription","commits_url":"https://api.github.com/repos/pipermerriam/flex/commits{/sha}","git_commits_url":"https://api.github.com/repos/pipermerriam/flex/git/commits{/sha}","comments_url":"https://api.github.com/repos/pipermerriam/flex/comments{/number}","issue_comment_url":"https://api.github.com/repos/pipermerriam/flex/issues/comments{/number}","contents_url":"https://api.github.com/repos/pipermerriam/flex/contents/{+path}","compare_url":"https://api.github.com/repos/pipermerriam/flex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pipermerriam/flex/merges","archive_url":"https://api.github.com/repos/pipermerriam/flex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pipermerriam/flex/downloads","issues_url":"https://api.github.com/repos/pipermerriam/flex/issues{/number}","pulls_url":"https://api.github.com/repos/pipermerriam/flex/pulls{/number}","milestones_url":"https://api.github.com/repos/pipermerriam/flex/milestones{/number}","notifications_url":"https://api.github.com/repos/pipermerriam/flex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pipermerriam/flex/labels{/name}","releases_url":"https://api.github.com/repos/pipermerriam/flex/releases{/id}","created_at":"2014-10-17T02:54:06Z","updated_at":"2015-02-20T19:13:25Z","pushed_at":"2015-03-10T23:04:16Z","git_url":"git://github.com/pipermerriam/flex.git","ssh_url":"git@github.com:pipermerriam/flex.git","clone_url":"https://github.com/pipermerriam/flex.git","svn_url":"https://github.com/pipermerriam/flex","homepage":null,"size":1753,"stargazers_count":11,"watchers_count":11,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":8,"forks":7,"open_issues":8,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pipermerriam/flex/pulls/63"},"html":{"href":"https://github.com/pipermerriam/flex/pull/63"},"issue":{"href":"https://api.github.com/repos/pipermerriam/flex/issues/63"},"comments":{"href":"https://api.github.com/repos/pipermerriam/flex/issues/63/comments"},"review_comments":{"href":"https://api.github.com/repos/pipermerriam/flex/pulls/63/comments"},"review_comment":{"href":"https://api.github.com/repos/pipermerriam/flex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pipermerriam/flex/pulls/63/commits"},"statuses":{"href":"https://api.github.com/repos/pipermerriam/flex/statuses/178a491021d836f835e4717d429712aa346fd6a4"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":102,"deletions":23,"changed_files":11}}