{"action":"created","issue":{"url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/91","labels_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/91/comments","events_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/91/events","html_url":"https://github.com/joelittlejohn/jsonschema2pojo/issues/91","id":15901954,"number":91,"title":"Support draft-zyp-json-schema-04 (draft-fge-json-schema-validation-00)","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},"labels":[{"url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/labels/imported","name":"imported","color":"FFFFFF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2013-06-23T20:36:07Z","updated_at":"2015-10-29T09:03:56Z","closed_at":null,"body":"Links:\r\n\r\n- http://tools.ietf.org/html/draft-zyp-json-schema-04\r\n- http://tools.ietf.org/html/draft-fge-json-schema-validation-00\r\n\r\nNotes:\r\n\r\n* [x] changes to 'required'\r\n* [ ] deprecate 'extends'\r\n* [ ] basic/naive support for 'allOf', 'anyOf' (see issue #17)\r\n* [ ] add aliases for some 'format' values\r\n\r\n_Original issue: http://code.google.com/p/jsonschema2pojo/issues/detail?id=91_"},"comment":{"url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/comments/152118611","html_url":"https://github.com/joelittlejohn/jsonschema2pojo/issues/91#issuecomment-152118611","issue_url":"https://api.github.com/repos/joelittlejohn/jsonschema2pojo/issues/91","id":152118611,"user":{"login":"neilredway","id":6330088,"avatar_url":"https://avatars.githubusercontent.com/u/6330088?v=3","gravatar_id":"","url":"https://api.github.com/users/neilredway","html_url":"https://github.com/neilredway","followers_url":"https://api.github.com/users/neilredway/followers","following_url":"https://api.github.com/users/neilredway/following{/other_user}","gists_url":"https://api.github.com/users/neilredway/gists{/gist_id}","starred_url":"https://api.github.com/users/neilredway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neilredway/subscriptions","organizations_url":"https://api.github.com/users/neilredway/orgs","repos_url":"https://api.github.com/users/neilredway/repos","events_url":"https://api.github.com/users/neilredway/events{/privacy}","received_events_url":"https://api.github.com/users/neilredway/received_events","type":"User","site_admin":false},"created_at":"2015-10-29T09:03:56Z","updated_at":"2015-10-29T09:03:56Z","body":"@maksimlikharev - something like the following: ?\r\n\r\nVery keen to see how I can help in implementing the \"allOf\" \r\n\r\n\r\nGiven:\r\n\r\n\t{\r\n\t\t\"id\": \"http://xxx.xxx.com/schemas/person\",\r\n\t\t\"title\": \"Person\",\r\n\t\t\"type\": \"object\",\r\n\t\t\"properties\": {\r\n\t\t\t\"name\": {\r\n\t\t\t\t\"description\": \"person name\",\r\n\t\t\t\t\"type\": \"string\"\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t{\r\n\t\t\"id\": \"http://xxx.xxx.com/schemas/Employee\",\r\n\t\t\"title\": \"Employee\",\r\n\t\t\"type\": \"object\",\r\n\t\t\"allOf\": [ \r\n\t\t\t{ \"@ref\": \"http://xxx.xxx.com/schemas/person\" }\r\n\t\t],\r\n\t\t\"properties\": {\r\n\t\t\t\"employeeID\": {\r\n\t\t\t\t\"description\": \"employee id associated with this person\",\r\n\t\t\t\t\"type\": \"string\"\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\nFor each JSON object we generate a concrete class...  ( perhaps with an option to suppress ?)\r\n\tpublic class Person implements IPerson {\r\n\t\t...\r\n\t\tpublic String getName() {\r\n\t\t...\r\n\t\t}\r\n\t}\r\n\r\nwith the interface class:\r\n\t\r\n\tpublic interface IPerson {\r\n\t\tString getName();\r\n\t}\r\n\r\nAs Employee is composed of \"allOf\" the interface class   \r\n\r\n\tpublic interface IEmployee extends IPerson {\r\n\t\tpublic String getEmployeeID {\r\n\t\t...\r\n\t\t}\r\n\t}\r\n\r\nsuch that the Employee class now needs to have a concrete implementation for both Person and Employee\r\n \t\r\n\tpublic class Employee implements IEmployee{\r\n\t\tpublic String getName() {\r\n\t\t...\r\n\t\t}\r\n\t\t\r\n\t\tpublic String getEmployeeID () {\r\n\t\t...\r\n\t\t}\r\n\t}\r\n\r\n\t\r\nHave I missed something obvious?"}}