{"action":"created","comment":{"url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/pulls/comments/48099671","id":48099671,"diff_hunk":"@@ -73,8 +73,10 @@\n      *            JSON property\n      * @param propertyName\n      *            the name of the JSON property that this getter gets\n+     * @param propertyNode\n+     *            the schema node defining this property\n      */\n-    void propertyGetter(JMethod getter, String propertyName);\n+    void propertyGetter(JMethod getter, String propertyName, JsonNode propertyNode);","path":"jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/Annotator.java","position":8,"original_position":8,"commit_id":"540533a9a7b7e10d76e0577df391852b7c4ab9ee","original_commit_id":"540533a9a7b7e10d76e0577df391852b7c4ab9ee","user":{"login":"ctrimble","id":614753,"avatar_url":"https://avatars.githubusercontent.com/u/614753?v=3","gravatar_id":"","url":"https://api.github.com/users/ctrimble","html_url":"https://github.com/ctrimble","followers_url":"https://api.github.com/users/ctrimble/followers","following_url":"https://api.github.com/users/ctrimble/following{/other_user}","gists_url":"https://api.github.com/users/ctrimble/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrimble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrimble/subscriptions","organizations_url":"https://api.github.com/users/ctrimble/orgs","repos_url":"https://api.github.com/users/ctrimble/repos","events_url":"https://api.github.com/users/ctrimble/events{/privacy}","received_events_url":"https://api.github.com/users/ctrimble/received_events","type":"User","site_admin":false},"body":"This change alters the existing contract for Annotator and will break existing custom annotators.  This change should be additive.","created_at":"2015-12-20T04:43:09Z","updated_at":"2015-12-20T04:43:09Z","html_url":"https://github.com/joelittlejohn/jsonschema2pojo/pull/430#discussion_r48099671","pull_request_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/pulls/430","_links":{"self":{"href":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/pulls/comments/48099671"},"html":{"href":"https://github.com/joelittlejohn/jsonschema2pojo/pull/430#discussion_r48099671"},"pull_request":{"href":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/pulls/430"}}},"pull_request":{"url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/pulls/430","id":47069672,"html_url":"https://github.com/joelittlejohn/jsonschema2pojo/pull/430","diff_url":"https://github.com/joelittlejohn/jsonschema2pojo/pull/430.diff","patch_url":"https://github.com/joelittlejohn/jsonschema2pojo/pull/430.patch","issue_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/430","number":430,"state":"open","locked":false,"title":"adding \"required\" attribute to JsonProperty annotation","user":{"login":"jmazzitelli","id":2029470,"avatar_url":"https://avatars.githubusercontent.com/u/2029470?v=3","gravatar_id":"","url":"https://api.github.com/users/jmazzitelli","html_url":"https://github.com/jmazzitelli","followers_url":"https://api.github.com/users/jmazzitelli/followers","following_url":"https://api.github.com/users/jmazzitelli/following{/other_user}","gists_url":"https://api.github.com/users/jmazzitelli/gists{/gist_id}","starred_url":"https://api.github.com/users/jmazzitelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmazzitelli/subscriptions","organizations_url":"https://api.github.com/users/jmazzitelli/orgs","repos_url":"https://api.github.com/users/jmazzitelli/repos","events_url":"https://api.github.com/users/jmazzitelli/events{/privacy}","received_events_url":"https://api.github.com/users/jmazzitelli/received_events","type":"User","site_admin":false},"body":"This adds \"required=true\" or \"required=false\" to @JsonProperty annotations on fields, getters and setters but unfortunately this ONLY works if the \"required\" flag is set on the individual property in the JSON schema. If using \"required\" array in the schema, that still is ignored. I don't know how to fix that. Hopefully, someone else does :)\r\n\r\nSo if you have this in your schema, this will add the \"required\" annotation attribute:\r\n\r\n    \"properties\": {\r\n        \"msg\": {\r\n          \"type\": \"string\",\r\n          \"required\": true\r\n        }\r\n    }\r\n\r\n    but this will not:\r\n\r\n      \"required\": [\"msg\"]","created_at":"2015-10-07T19:18:02Z","updated_at":"2015-12-20T04:43:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08b194ab06e00bbcda2dba1cce26b98727990bd1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/pulls/430/commits","review_comments_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/pulls/430/comments","review_comment_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/430/comments","statuses_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/statuses/540533a9a7b7e10d76e0577df391852b7c4ab9ee","head":{"label":"jmazzitelli:required-annotation-attribute","ref":"required-annotation-attribute","sha":"540533a9a7b7e10d76e0577df391852b7c4ab9ee","user":{"login":"jmazzitelli","id":2029470,"avatar_url":"https://avatars.githubusercontent.com/u/2029470?v=3","gravatar_id":"","url":"https://api.github.com/users/jmazzitelli","html_url":"https://github.com/jmazzitelli","followers_url":"https://api.github.com/users/jmazzitelli/followers","following_url":"https://api.github.com/users/jmazzitelli/following{/other_user}","gists_url":"https://api.github.com/users/jmazzitelli/gists{/gist_id}","starred_url":"https://api.github.com/users/jmazzitelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmazzitelli/subscriptions","organizations_url":"https://api.github.com/users/jmazzitelli/orgs","repos_url":"https://api.github.com/users/jmazzitelli/repos","events_url":"https://api.github.com/users/jmazzitelli/events{/privacy}","received_events_url":"https://api.github.com/users/jmazzitelli/received_events","type":"User","site_admin":false},"repo":{"id":43832018,"name":"jsonschema2pojo","full_name":"jmazzitelli/jsonschema2pojo","owner":{"login":"jmazzitelli","id":2029470,"avatar_url":"https://avatars.githubusercontent.com/u/2029470?v=3","gravatar_id":"","url":"https://api.github.com/users/jmazzitelli","html_url":"https://github.com/jmazzitelli","followers_url":"https://api.github.com/users/jmazzitelli/followers","following_url":"https://api.github.com/users/jmazzitelli/following{/other_user}","gists_url":"https://api.github.com/users/jmazzitelli/gists{/gist_id}","starred_url":"https://api.github.com/users/jmazzitelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmazzitelli/subscriptions","organizations_url":"https://api.github.com/users/jmazzitelli/orgs","repos_url":"https://api.github.com/users/jmazzitelli/repos","events_url":"https://api.github.com/users/jmazzitelli/events{/privacy}","received_events_url":"https://api.github.com/users/jmazzitelli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmazzitelli/jsonschema2pojo","description":"Generates Java types from JSON Schema (or example JSON) and annotates those types for data-binding with Jackson 1.x or 2.x, Gson, etc","fork":true,"url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo","forks_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/forks","keys_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/teams","hooks_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/hooks","issue_events_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/issues/events{/number}","events_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/events","assignees_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/assignees{/user}","branches_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/branches{/branch}","tags_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/tags","blobs_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/statuses/{sha}","languages_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/languages","stargazers_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/stargazers","contributors_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/contributors","subscribers_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/subscribers","subscription_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/subscription","commits_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/contents/{+path}","compare_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/merges","archive_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/downloads","issues_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/issues{/number}","pulls_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/pulls{/number}","milestones_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/milestones{/number}","notifications_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/labels{/name}","releases_url":"https://api.github.com/repos/jmazzitelli/jsonschema2pojo/releases{/id}","created_at":"2015-10-07T17:17:42Z","updated_at":"2015-10-07T17:17:43Z","pushed_at":"2015-10-07T19:15:54Z","git_url":"git://github.com/jmazzitelli/jsonschema2pojo.git","ssh_url":"git@github.com:jmazzitelli/jsonschema2pojo.git","clone_url":"https://github.com/jmazzitelli/jsonschema2pojo.git","svn_url":"https://github.com/jmazzitelli/jsonschema2pojo","homepage":"http://www.jsonschema2pojo.org","size":4366,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"joelittlejohn:master","ref":"master","sha":"4eb7bb9fd12854fefe86d921e0b2ca39cb45363d","user":{"login":"joelittlejohn","id":686384,"avatar_url":"https://avatars.githubusercontent.com/u/686384?v=3","gravatar_id":"","url":"https://api.github.com/users/joelittlejohn","html_url":"https://github.com/joelittlejohn","followers_url":"https://api.github.com/users/joelittlejohn/followers","following_url":"https://api.github.com/users/joelittlejohn/following{/other_user}","gists_url":"https://api.github.com/users/joelittlejohn/gists{/gist_id}","starred_url":"https://api.github.com/users/joelittlejohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelittlejohn/subscriptions","organizations_url":"https://api.github.com/users/joelittlejohn/orgs","repos_url":"https://api.github.com/users/joelittlejohn/repos","events_url":"https://api.github.com/users/joelittlejohn/events{/privacy}","received_events_url":"https://api.github.com/users/joelittlejohn/received_events","type":"User","site_admin":false},"repo":{"id":10873724,"name":"jsonschema2pojo","full_name":"joelittlejohn/jsonschema2pojo","owner":{"login":"joelittlejohn","id":686384,"avatar_url":"https://avatars.githubusercontent.com/u/686384?v=3","gravatar_id":"","url":"https://api.github.com/users/joelittlejohn","html_url":"https://github.com/joelittlejohn","followers_url":"https://api.github.com/users/joelittlejohn/followers","following_url":"https://api.github.com/users/joelittlejohn/following{/other_user}","gists_url":"https://api.github.com/users/joelittlejohn/gists{/gist_id}","starred_url":"https://api.github.com/users/joelittlejohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelittlejohn/subscriptions","organizations_url":"https://api.github.com/users/joelittlejohn/orgs","repos_url":"https://api.github.com/users/joelittlejohn/repos","events_url":"https://api.github.com/users/joelittlejohn/events{/privacy}","received_events_url":"https://api.github.com/users/joelittlejohn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joelittlejohn/jsonschema2pojo","description":"Generates Java types from JSON Schema (or example JSON) and annotates those types for data-binding with Jackson 1.x or 2.x, Gson, etc","fork":false,"url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo","forks_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/forks","keys_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/teams","hooks_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/hooks","issue_events_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/events{/number}","events_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/events","assignees_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/assignees{/user}","branches_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/branches{/branch}","tags_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/tags","blobs_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/git/refs{/sha}","trees_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/statuses/{sha}","languages_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/languages","stargazers_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/stargazers","contributors_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/contributors","subscribers_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/subscribers","subscription_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/subscription","commits_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/commits{/sha}","git_commits_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/git/commits{/sha}","comments_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/comments{/number}","issue_comment_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/comments{/number}","contents_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/contents/{+path}","compare_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/merges","archive_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/downloads","issues_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues{/number}","pulls_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/pulls{/number}","milestones_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/milestones{/number}","notifications_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/labels{/name}","releases_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/releases{/id}","created_at":"2013-06-22T22:28:53Z","updated_at":"2015-12-19T23:42:32Z","pushed_at":"2015-12-20T03:13:18Z","git_url":"git://github.com/joelittlejohn/jsonschema2pojo.git","ssh_url":"git@github.com:joelittlejohn/jsonschema2pojo.git","clone_url":"https://github.com/joelittlejohn/jsonschema2pojo.git","svn_url":"https://github.com/joelittlejohn/jsonschema2pojo","homepage":"http://www.jsonschema2pojo.org","size":4934,"stargazers_count":1308,"watchers_count":1308,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":438,"mirror_url":null,"open_issues_count":62,"forks":438,"open_issues":62,"watchers":1308,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/pulls/430"},"html":{"href":"https://github.com/joelittlejohn/jsonschema2pojo/pull/430"},"issue":{"href":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/430"},"comments":{"href":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/430/comments"},"review_comments":{"href":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/pulls/430/comments"},"review_comment":{"href":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/pulls/430/commits"},"statuses":{"href":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/statuses/540533a9a7b7e10d76e0577df391852b7c4ab9ee"}}}}