{"action":"opened","number":605,"pull_request":{"url":"https://api.github.com/repos/zircote/swagger-php/pulls/605","id":226697136,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2Njk3MTM2","html_url":"https://github.com/zircote/swagger-php/pull/605","diff_url":"https://github.com/zircote/swagger-php/pull/605.diff","patch_url":"https://github.com/zircote/swagger-php/pull/605.patch","issue_url":"https://api.github.com/repos/zircote/swagger-php/issues/605","number":605,"state":"open","locked":false,"title":"Fix for deserialization of allOf properties","user":{"login":"penja","id":2717390,"node_id":"MDQ6VXNlcjI3MTczOTA=","avatar_url":"https://avatars0.githubusercontent.com/u/2717390?v=4","gravatar_id":"","url":"https://api.github.com/users/penja","html_url":"https://github.com/penja","followers_url":"https://api.github.com/users/penja/followers","following_url":"https://api.github.com/users/penja/following{/other_user}","gists_url":"https://api.github.com/users/penja/gists{/gist_id}","starred_url":"https://api.github.com/users/penja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/penja/subscriptions","organizations_url":"https://api.github.com/users/penja/orgs","repos_url":"https://api.github.com/users/penja/repos","events_url":"https://api.github.com/users/penja/events{/privacy}","received_events_url":"https://api.github.com/users/penja/received_events","type":"User","site_admin":false},"body":"Deserializer work incorrect when we trying to deserialize schema with `allOf` property.\r\nFor example allOf properties will be deserialized like `stdClass` with the `$ref` property but according to swagger `allOf,oneOf,anyOf` is array of schemes [link](https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/).\r\n\r\nJson  string example\r\n```\r\n{\r\n\t\"openapi\": \"3.0.0\",\r\n\t\"info\": {\r\n\t\t\"title\": \"Pet store\",\r\n\t\t\"version\": \"1.0\"\r\n\t},\r\n\t\"components\": {\r\n\t\t\"schemas\": {\r\n\t\t\t\"Dog\": {\r\n\t\t\t\t\"allOf\": [{\r\n\t\t\t\t\t\"$ref\": \"#/components/schemas/SomeSchema\"\r\n\t\t\t\t}]\r\n\t\t\t},\r\n\t\t\t\"Cat\": {\r\n\t\t\t\t\"allOf\": [{\r\n\t\t\t\t\t\"$ref\": \"#/components/schemas/SomeSchema\"\r\n\t\t\t\t}]\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n```\r\nThe result of deserealization\r\n```\r\nobject(OpenApi\\Annotations\\OpenApi)#2844 (5) {\r\n  [\"openapi\"]=>\r\n  string(5) \"3.0.0\"\r\n  [\"info\"]=>\r\n  object(OpenApi\\Annotations\\Info)#2848 (4) {\r\n    [\"title\"]=>\r\n    string(9) \"Pet store\"\r\n    [\"version\"]=>\r\n    string(3) \"1.0\"\r\n    [\"_context\"]=>\r\n    object(OpenApi\\Context)#2846 (1) {\r\n      [\"-\"]=>\r\n      string(107) \"\\OpenApi\\Serializer->doDeserialize() in /Users/andriipenchuk/dev/swagger-php/src/Serializer.php on line 120\"\r\n    }\r\n    [\"_unmerged\"]=>\r\n    array(0) {\r\n    }\r\n  }\r\n  [\"components\"]=>\r\n  object(OpenApi\\Annotations\\Components)#2847 (3) {\r\n    [\"schemas\"]=>\r\n    array(2) {\r\n      [\"Dog\"]=>\r\n      object(OpenApi\\Annotations\\Schema)#2798 (4) {\r\n        [\"schema\"]=>\r\n        string(3) \"Dog\"\r\n        [\"allOf\"]=>\r\n        array(1) {\r\n          [0]=>\r\n          object(stdClass)#2852 (1) {\r\n            [\"$ref\"]=>\r\n            string(31) \"#/components/schemas/SomeSchema\"\r\n          }\r\n        }\r\n        .....\r\n```\r\nMy proposal to mark the properties that hasn't simple key like discriminator or items as simple array of objects. This PR will fix this problem also this fix is covered by the unit test.","created_at":"2018-10-29T20:10:15Z","updated_at":"2018-10-29T20:10:15Z","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/zircote/swagger-php/pulls/605/commits","review_comments_url":"https://api.github.com/repos/zircote/swagger-php/pulls/605/comments","review_comment_url":"https://api.github.com/repos/zircote/swagger-php/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zircote/swagger-php/issues/605/comments","statuses_url":"https://api.github.com/repos/zircote/swagger-php/statuses/024ec8c34dd9e9a425b2ec3e31e1703d95078f04","head":{"label":"penja:fix-deserialize-allOf-property","ref":"fix-deserialize-allOf-property","sha":"024ec8c34dd9e9a425b2ec3e31e1703d95078f04","user":{"login":"penja","id":2717390,"node_id":"MDQ6VXNlcjI3MTczOTA=","avatar_url":"https://avatars0.githubusercontent.com/u/2717390?v=4","gravatar_id":"","url":"https://api.github.com/users/penja","html_url":"https://github.com/penja","followers_url":"https://api.github.com/users/penja/followers","following_url":"https://api.github.com/users/penja/following{/other_user}","gists_url":"https://api.github.com/users/penja/gists{/gist_id}","starred_url":"https://api.github.com/users/penja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/penja/subscriptions","organizations_url":"https://api.github.com/users/penja/orgs","repos_url":"https://api.github.com/users/penja/repos","events_url":"https://api.github.com/users/penja/events{/privacy}","received_events_url":"https://api.github.com/users/penja/received_events","type":"User","site_admin":false},"repo":{"id":142457993,"node_id":"MDEwOlJlcG9zaXRvcnkxNDI0NTc5OTM=","name":"swagger-php","full_name":"penja/swagger-php","private":false,"owner":{"login":"penja","id":2717390,"node_id":"MDQ6VXNlcjI3MTczOTA=","avatar_url":"https://avatars0.githubusercontent.com/u/2717390?v=4","gravatar_id":"","url":"https://api.github.com/users/penja","html_url":"https://github.com/penja","followers_url":"https://api.github.com/users/penja/followers","following_url":"https://api.github.com/users/penja/following{/other_user}","gists_url":"https://api.github.com/users/penja/gists{/gist_id}","starred_url":"https://api.github.com/users/penja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/penja/subscriptions","organizations_url":"https://api.github.com/users/penja/orgs","repos_url":"https://api.github.com/users/penja/repos","events_url":"https://api.github.com/users/penja/events{/privacy}","received_events_url":"https://api.github.com/users/penja/received_events","type":"User","site_admin":false},"html_url":"https://github.com/penja/swagger-php","description":"A php swagger annotation and parsing library","fork":true,"url":"https://api.github.com/repos/penja/swagger-php","forks_url":"https://api.github.com/repos/penja/swagger-php/forks","keys_url":"https://api.github.com/repos/penja/swagger-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/penja/swagger-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/penja/swagger-php/teams","hooks_url":"https://api.github.com/repos/penja/swagger-php/hooks","issue_events_url":"https://api.github.com/repos/penja/swagger-php/issues/events{/number}","events_url":"https://api.github.com/repos/penja/swagger-php/events","assignees_url":"https://api.github.com/repos/penja/swagger-php/assignees{/user}","branches_url":"https://api.github.com/repos/penja/swagger-php/branches{/branch}","tags_url":"https://api.github.com/repos/penja/swagger-php/tags","blobs_url":"https://api.github.com/repos/penja/swagger-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/penja/swagger-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/penja/swagger-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/penja/swagger-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/penja/swagger-php/statuses/{sha}","languages_url":"https://api.github.com/repos/penja/swagger-php/languages","stargazers_url":"https://api.github.com/repos/penja/swagger-php/stargazers","contributors_url":"https://api.github.com/repos/penja/swagger-php/contributors","subscribers_url":"https://api.github.com/repos/penja/swagger-php/subscribers","subscription_url":"https://api.github.com/repos/penja/swagger-php/subscription","commits_url":"https://api.github.com/repos/penja/swagger-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/penja/swagger-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/penja/swagger-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/penja/swagger-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/penja/swagger-php/contents/{+path}","compare_url":"https://api.github.com/repos/penja/swagger-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/penja/swagger-php/merges","archive_url":"https://api.github.com/repos/penja/swagger-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/penja/swagger-php/downloads","issues_url":"https://api.github.com/repos/penja/swagger-php/issues{/number}","pulls_url":"https://api.github.com/repos/penja/swagger-php/pulls{/number}","milestones_url":"https://api.github.com/repos/penja/swagger-php/milestones{/number}","notifications_url":"https://api.github.com/repos/penja/swagger-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/penja/swagger-php/labels{/name}","releases_url":"https://api.github.com/repos/penja/swagger-php/releases{/id}","deployments_url":"https://api.github.com/repos/penja/swagger-php/deployments","created_at":"2018-07-26T15:13:00Z","updated_at":"2018-10-29T16:51:37Z","pushed_at":"2018-10-29T19:54:37Z","git_url":"git://github.com/penja/swagger-php.git","ssh_url":"git@github.com:penja/swagger-php.git","clone_url":"https://github.com/penja/swagger-php.git","svn_url":"https://github.com/penja/swagger-php","homepage":"http://zircote.com/swagger-php/","size":3467,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"zircote:master","ref":"master","sha":"9e8aeca0618c50a1b70f14962f84eeec5e93e4e2","user":{"login":"zircote","id":307960,"node_id":"MDQ6VXNlcjMwNzk2MA==","avatar_url":"https://avatars3.githubusercontent.com/u/307960?v=4","gravatar_id":"","url":"https://api.github.com/users/zircote","html_url":"https://github.com/zircote","followers_url":"https://api.github.com/users/zircote/followers","following_url":"https://api.github.com/users/zircote/following{/other_user}","gists_url":"https://api.github.com/users/zircote/gists{/gist_id}","starred_url":"https://api.github.com/users/zircote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zircote/subscriptions","organizations_url":"https://api.github.com/users/zircote/orgs","repos_url":"https://api.github.com/users/zircote/repos","events_url":"https://api.github.com/users/zircote/events{/privacy}","received_events_url":"https://api.github.com/users/zircote/received_events","type":"User","site_admin":false},"repo":{"id":3817881,"node_id":"MDEwOlJlcG9zaXRvcnkzODE3ODgx","name":"swagger-php","full_name":"zircote/swagger-php","private":false,"owner":{"login":"zircote","id":307960,"node_id":"MDQ6VXNlcjMwNzk2MA==","avatar_url":"https://avatars3.githubusercontent.com/u/307960?v=4","gravatar_id":"","url":"https://api.github.com/users/zircote","html_url":"https://github.com/zircote","followers_url":"https://api.github.com/users/zircote/followers","following_url":"https://api.github.com/users/zircote/following{/other_user}","gists_url":"https://api.github.com/users/zircote/gists{/gist_id}","starred_url":"https://api.github.com/users/zircote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zircote/subscriptions","organizations_url":"https://api.github.com/users/zircote/orgs","repos_url":"https://api.github.com/users/zircote/repos","events_url":"https://api.github.com/users/zircote/events{/privacy}","received_events_url":"https://api.github.com/users/zircote/received_events","type":"User","site_admin":false},"html_url":"https://github.com/zircote/swagger-php","description":"A php swagger annotation and parsing library","fork":false,"url":"https://api.github.com/repos/zircote/swagger-php","forks_url":"https://api.github.com/repos/zircote/swagger-php/forks","keys_url":"https://api.github.com/repos/zircote/swagger-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zircote/swagger-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zircote/swagger-php/teams","hooks_url":"https://api.github.com/repos/zircote/swagger-php/hooks","issue_events_url":"https://api.github.com/repos/zircote/swagger-php/issues/events{/number}","events_url":"https://api.github.com/repos/zircote/swagger-php/events","assignees_url":"https://api.github.com/repos/zircote/swagger-php/assignees{/user}","branches_url":"https://api.github.com/repos/zircote/swagger-php/branches{/branch}","tags_url":"https://api.github.com/repos/zircote/swagger-php/tags","blobs_url":"https://api.github.com/repos/zircote/swagger-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zircote/swagger-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zircote/swagger-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/zircote/swagger-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zircote/swagger-php/statuses/{sha}","languages_url":"https://api.github.com/repos/zircote/swagger-php/languages","stargazers_url":"https://api.github.com/repos/zircote/swagger-php/stargazers","contributors_url":"https://api.github.com/repos/zircote/swagger-php/contributors","subscribers_url":"https://api.github.com/repos/zircote/swagger-php/subscribers","subscription_url":"https://api.github.com/repos/zircote/swagger-php/subscription","commits_url":"https://api.github.com/repos/zircote/swagger-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/zircote/swagger-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/zircote/swagger-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/zircote/swagger-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/zircote/swagger-php/contents/{+path}","compare_url":"https://api.github.com/repos/zircote/swagger-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zircote/swagger-php/merges","archive_url":"https://api.github.com/repos/zircote/swagger-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zircote/swagger-php/downloads","issues_url":"https://api.github.com/repos/zircote/swagger-php/issues{/number}","pulls_url":"https://api.github.com/repos/zircote/swagger-php/pulls{/number}","milestones_url":"https://api.github.com/repos/zircote/swagger-php/milestones{/number}","notifications_url":"https://api.github.com/repos/zircote/swagger-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zircote/swagger-php/labels{/name}","releases_url":"https://api.github.com/repos/zircote/swagger-php/releases{/id}","deployments_url":"https://api.github.com/repos/zircote/swagger-php/deployments","created_at":"2012-03-24T15:13:26Z","updated_at":"2018-10-29T18:03:30Z","pushed_at":"2018-10-21T21:57:39Z","git_url":"git://github.com/zircote/swagger-php.git","ssh_url":"git@github.com:zircote/swagger-php.git","clone_url":"https://github.com/zircote/swagger-php.git","svn_url":"https://github.com/zircote/swagger-php","homepage":"http://zircote.com/swagger-php/","size":3737,"stargazers_count":2368,"watchers_count":2368,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":475,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":475,"open_issues":15,"watchers":2368,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zircote/swagger-php/pulls/605"},"html":{"href":"https://github.com/zircote/swagger-php/pull/605"},"issue":{"href":"https://api.github.com/repos/zircote/swagger-php/issues/605"},"comments":{"href":"https://api.github.com/repos/zircote/swagger-php/issues/605/comments"},"review_comments":{"href":"https://api.github.com/repos/zircote/swagger-php/pulls/605/comments"},"review_comment":{"href":"https://api.github.com/repos/zircote/swagger-php/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zircote/swagger-php/pulls/605/commits"},"statuses":{"href":"https://api.github.com/repos/zircote/swagger-php/statuses/024ec8c34dd9e9a425b2ec3e31e1703d95078f04"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":164,"deletions":34,"changed_files":4}}
{"actor":{"display_login":"penja"}}