{"action":"created","comment":{"url":"https://api.github.com/repos/refractproject/minim/pulls/comments/214316183","pull_request_review_id":151346947,"id":214316183,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDMxNjE4Mw==","diff_hunk":"@@ -883,9 +883,9 @@ describe('JSON 0.6 Serialiser', function() {\n       });\n \n       var metadata = category.attributes.get('metadata');\n-      expect(metadata).to.be.instanceof(minim.elements.Object);\n+      expect(metadata).to.be.instanceof(minim.elements.Array);\n \n-      var member = metadata.getMember('HOST');\n+      var member = metadata.get(0);","path":"test/serialisers/json-0.6.js","position":8,"original_position":8,"commit_id":"bf27bbb452e943d57d6d53305560126cbfed354b","original_commit_id":"bf27bbb452e943d57d6d53305560126cbfed354b","user":{"login":"kylef","id":44164,"node_id":"MDQ6VXNlcjQ0MTY0","avatar_url":"https://avatars1.githubusercontent.com/u/44164?v=4","gravatar_id":"","url":"https://api.github.com/users/kylef","html_url":"https://github.com/kylef","followers_url":"https://api.github.com/users/kylef/followers","following_url":"https://api.github.com/users/kylef/following{/other_user}","gists_url":"https://api.github.com/users/kylef/gists{/gist_id}","starred_url":"https://api.github.com/users/kylef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylef/subscriptions","organizations_url":"https://api.github.com/users/kylef/orgs","repos_url":"https://api.github.com/users/kylef/repos","events_url":"https://api.github.com/users/kylef/events{/privacy}","received_events_url":"https://api.github.com/users/kylef/received_events","type":"User","site_admin":false},"body":"This are some of the reasons it should be an object element because it contains members and array elements API doesn't offer any ability to deal with them. It is to late to make this change though.","created_at":"2018-08-31T10:52:00Z","updated_at":"2018-08-31T10:52:01Z","html_url":"https://github.com/refractproject/minim/pull/188#discussion_r214316183","pull_request_url":"https://api.github.com/repos/refractproject/minim/pulls/188","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/refractproject/minim/pulls/comments/214316183"},"html":{"href":"https://github.com/refractproject/minim/pull/188#discussion_r214316183"},"pull_request":{"href":"https://api.github.com/repos/refractproject/minim/pulls/188"}}},"pull_request":{"url":"https://api.github.com/repos/refractproject/minim/pulls/188","id":212342025,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyMzQyMDI1","html_url":"https://github.com/refractproject/minim/pull/188","diff_url":"https://github.com/refractproject/minim/pull/188.diff","patch_url":"https://github.com/refractproject/minim/pull/188.patch","issue_url":"https://api.github.com/repos/refractproject/minim/issues/188","number":188,"state":"open","locked":false,"title":"Restore metadata to be an array element","user":{"login":"kylef","id":44164,"node_id":"MDQ6VXNlcjQ0MTY0","avatar_url":"https://avatars1.githubusercontent.com/u/44164?v=4","gravatar_id":"","url":"https://api.github.com/users/kylef","html_url":"https://github.com/kylef","followers_url":"https://api.github.com/users/kylef/followers","following_url":"https://api.github.com/users/kylef/following{/other_user}","gists_url":"https://api.github.com/users/kylef/gists{/gist_id}","starred_url":"https://api.github.com/users/kylef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylef/subscriptions","organizations_url":"https://api.github.com/users/kylef/orgs","repos_url":"https://api.github.com/users/kylef/repos","events_url":"https://api.github.com/users/kylef/events{/privacy}","received_events_url":"https://api.github.com/users/kylef/received_events","type":"User","site_admin":false},"body":"In #185 I incorrectly changed metadata from Refract 0.6 to be deserialised as\nan Object instead of as an Array. A common problem with Refract 0.6 is that\ncertain elements have been serialised as arrays when they are not actually\narray elements thus leading to tooling having to know more upfront knowledge\nabout what is expected in each meta, attribute or content to know if it should\ndeserialise an array as for example an enum element instead of an array\nelement.\n\nOne of the main design factors in Refract 1.0 (API Elements 1.0) was that every\npossible element would be fully \"refracted\" as an JSON object with an element\nname so tooling knows upfront what the type of element it contains.\n\nThe \"meta\" attribute is one of those types of elements which used to be\nserialised as an array. As meta was a collection of `member` elements then it\nis logically an object element and thus the change was made. However when the\nchange was made I was under the assumption that the spec and all of the other\ntooling (Swagger parser) etc specificed and generated metadata as an object\nelement.\n\nTurns out that is not the case, the spec says metadata is an Array, and the\nSwagger parser, and API Blueprint parser is generating an Array element as\nmetadata. While I believe that may be a bug in API Elements design because\nlogically it should be declared as an object element. As this is not the case,\nthen my change in #185 was a breaking change and should be reverted.","created_at":"2018-08-31T10:32:52Z","updated_at":"2018-08-31T10:52:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"50754c08a8cb42909523caeac617baed90714c78","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/refractproject/minim/pulls/188/commits","review_comments_url":"https://api.github.com/repos/refractproject/minim/pulls/188/comments","review_comment_url":"https://api.github.com/repos/refractproject/minim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/refractproject/minim/issues/188/comments","statuses_url":"https://api.github.com/repos/refractproject/minim/statuses/bf27bbb452e943d57d6d53305560126cbfed354b","head":{"label":"refractproject:kylef/md-array","ref":"kylef/md-array","sha":"bf27bbb452e943d57d6d53305560126cbfed354b","user":{"login":"refractproject","id":10877387,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwODc3Mzg3","avatar_url":"https://avatars3.githubusercontent.com/u/10877387?v=4","gravatar_id":"","url":"https://api.github.com/users/refractproject","html_url":"https://github.com/refractproject","followers_url":"https://api.github.com/users/refractproject/followers","following_url":"https://api.github.com/users/refractproject/following{/other_user}","gists_url":"https://api.github.com/users/refractproject/gists{/gist_id}","starred_url":"https://api.github.com/users/refractproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/refractproject/subscriptions","organizations_url":"https://api.github.com/users/refractproject/orgs","repos_url":"https://api.github.com/users/refractproject/repos","events_url":"https://api.github.com/users/refractproject/events{/privacy}","received_events_url":"https://api.github.com/users/refractproject/received_events","type":"Organization","site_admin":false},"repo":{"id":29806257,"node_id":"MDEwOlJlcG9zaXRvcnkyOTgwNjI1Nw==","name":"minim","full_name":"refractproject/minim","owner":{"login":"refractproject","id":10877387,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwODc3Mzg3","avatar_url":"https://avatars3.githubusercontent.com/u/10877387?v=4","gravatar_id":"","url":"https://api.github.com/users/refractproject","html_url":"https://github.com/refractproject","followers_url":"https://api.github.com/users/refractproject/followers","following_url":"https://api.github.com/users/refractproject/following{/other_user}","gists_url":"https://api.github.com/users/refractproject/gists{/gist_id}","starred_url":"https://api.github.com/users/refractproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/refractproject/subscriptions","organizations_url":"https://api.github.com/users/refractproject/orgs","repos_url":"https://api.github.com/users/refractproject/repos","events_url":"https://api.github.com/users/refractproject/events{/privacy}","received_events_url":"https://api.github.com/users/refractproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/refractproject/minim","description":"A library for interacting with Refract elements","fork":false,"url":"https://api.github.com/repos/refractproject/minim","forks_url":"https://api.github.com/repos/refractproject/minim/forks","keys_url":"https://api.github.com/repos/refractproject/minim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/refractproject/minim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/refractproject/minim/teams","hooks_url":"https://api.github.com/repos/refractproject/minim/hooks","issue_events_url":"https://api.github.com/repos/refractproject/minim/issues/events{/number}","events_url":"https://api.github.com/repos/refractproject/minim/events","assignees_url":"https://api.github.com/repos/refractproject/minim/assignees{/user}","branches_url":"https://api.github.com/repos/refractproject/minim/branches{/branch}","tags_url":"https://api.github.com/repos/refractproject/minim/tags","blobs_url":"https://api.github.com/repos/refractproject/minim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/refractproject/minim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/refractproject/minim/git/refs{/sha}","trees_url":"https://api.github.com/repos/refractproject/minim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/refractproject/minim/statuses/{sha}","languages_url":"https://api.github.com/repos/refractproject/minim/languages","stargazers_url":"https://api.github.com/repos/refractproject/minim/stargazers","contributors_url":"https://api.github.com/repos/refractproject/minim/contributors","subscribers_url":"https://api.github.com/repos/refractproject/minim/subscribers","subscription_url":"https://api.github.com/repos/refractproject/minim/subscription","commits_url":"https://api.github.com/repos/refractproject/minim/commits{/sha}","git_commits_url":"https://api.github.com/repos/refractproject/minim/git/commits{/sha}","comments_url":"https://api.github.com/repos/refractproject/minim/comments{/number}","issue_comment_url":"https://api.github.com/repos/refractproject/minim/issues/comments{/number}","contents_url":"https://api.github.com/repos/refractproject/minim/contents/{+path}","compare_url":"https://api.github.com/repos/refractproject/minim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/refractproject/minim/merges","archive_url":"https://api.github.com/repos/refractproject/minim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/refractproject/minim/downloads","issues_url":"https://api.github.com/repos/refractproject/minim/issues{/number}","pulls_url":"https://api.github.com/repos/refractproject/minim/pulls{/number}","milestones_url":"https://api.github.com/repos/refractproject/minim/milestones{/number}","notifications_url":"https://api.github.com/repos/refractproject/minim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/refractproject/minim/labels{/name}","releases_url":"https://api.github.com/repos/refractproject/minim/releases{/id}","deployments_url":"https://api.github.com/repos/refractproject/minim/deployments","created_at":"2015-01-25T07:12:23Z","updated_at":"2018-08-30T22:24:47Z","pushed_at":"2018-08-31T10:46:51Z","git_url":"git://github.com/refractproject/minim.git","ssh_url":"git@github.com:refractproject/minim.git","clone_url":"https://github.com/refractproject/minim.git","svn_url":"https://github.com/refractproject/minim","homepage":"","size":430,"stargazers_count":18,"watchers_count":18,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":8,"open_issues":18,"watchers":18,"default_branch":"master"}},"base":{"label":"refractproject:master","ref":"master","sha":"d79bbc646219f515f49857c97b765c309fd79965","user":{"login":"refractproject","id":10877387,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwODc3Mzg3","avatar_url":"https://avatars3.githubusercontent.com/u/10877387?v=4","gravatar_id":"","url":"https://api.github.com/users/refractproject","html_url":"https://github.com/refractproject","followers_url":"https://api.github.com/users/refractproject/followers","following_url":"https://api.github.com/users/refractproject/following{/other_user}","gists_url":"https://api.github.com/users/refractproject/gists{/gist_id}","starred_url":"https://api.github.com/users/refractproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/refractproject/subscriptions","organizations_url":"https://api.github.com/users/refractproject/orgs","repos_url":"https://api.github.com/users/refractproject/repos","events_url":"https://api.github.com/users/refractproject/events{/privacy}","received_events_url":"https://api.github.com/users/refractproject/received_events","type":"Organization","site_admin":false},"repo":{"id":29806257,"node_id":"MDEwOlJlcG9zaXRvcnkyOTgwNjI1Nw==","name":"minim","full_name":"refractproject/minim","owner":{"login":"refractproject","id":10877387,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwODc3Mzg3","avatar_url":"https://avatars3.githubusercontent.com/u/10877387?v=4","gravatar_id":"","url":"https://api.github.com/users/refractproject","html_url":"https://github.com/refractproject","followers_url":"https://api.github.com/users/refractproject/followers","following_url":"https://api.github.com/users/refractproject/following{/other_user}","gists_url":"https://api.github.com/users/refractproject/gists{/gist_id}","starred_url":"https://api.github.com/users/refractproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/refractproject/subscriptions","organizations_url":"https://api.github.com/users/refractproject/orgs","repos_url":"https://api.github.com/users/refractproject/repos","events_url":"https://api.github.com/users/refractproject/events{/privacy}","received_events_url":"https://api.github.com/users/refractproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/refractproject/minim","description":"A library for interacting with Refract elements","fork":false,"url":"https://api.github.com/repos/refractproject/minim","forks_url":"https://api.github.com/repos/refractproject/minim/forks","keys_url":"https://api.github.com/repos/refractproject/minim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/refractproject/minim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/refractproject/minim/teams","hooks_url":"https://api.github.com/repos/refractproject/minim/hooks","issue_events_url":"https://api.github.com/repos/refractproject/minim/issues/events{/number}","events_url":"https://api.github.com/repos/refractproject/minim/events","assignees_url":"https://api.github.com/repos/refractproject/minim/assignees{/user}","branches_url":"https://api.github.com/repos/refractproject/minim/branches{/branch}","tags_url":"https://api.github.com/repos/refractproject/minim/tags","blobs_url":"https://api.github.com/repos/refractproject/minim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/refractproject/minim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/refractproject/minim/git/refs{/sha}","trees_url":"https://api.github.com/repos/refractproject/minim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/refractproject/minim/statuses/{sha}","languages_url":"https://api.github.com/repos/refractproject/minim/languages","stargazers_url":"https://api.github.com/repos/refractproject/minim/stargazers","contributors_url":"https://api.github.com/repos/refractproject/minim/contributors","subscribers_url":"https://api.github.com/repos/refractproject/minim/subscribers","subscription_url":"https://api.github.com/repos/refractproject/minim/subscription","commits_url":"https://api.github.com/repos/refractproject/minim/commits{/sha}","git_commits_url":"https://api.github.com/repos/refractproject/minim/git/commits{/sha}","comments_url":"https://api.github.com/repos/refractproject/minim/comments{/number}","issue_comment_url":"https://api.github.com/repos/refractproject/minim/issues/comments{/number}","contents_url":"https://api.github.com/repos/refractproject/minim/contents/{+path}","compare_url":"https://api.github.com/repos/refractproject/minim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/refractproject/minim/merges","archive_url":"https://api.github.com/repos/refractproject/minim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/refractproject/minim/downloads","issues_url":"https://api.github.com/repos/refractproject/minim/issues{/number}","pulls_url":"https://api.github.com/repos/refractproject/minim/pulls{/number}","milestones_url":"https://api.github.com/repos/refractproject/minim/milestones{/number}","notifications_url":"https://api.github.com/repos/refractproject/minim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/refractproject/minim/labels{/name}","releases_url":"https://api.github.com/repos/refractproject/minim/releases{/id}","deployments_url":"https://api.github.com/repos/refractproject/minim/deployments","created_at":"2015-01-25T07:12:23Z","updated_at":"2018-08-30T22:24:47Z","pushed_at":"2018-08-31T10:46:51Z","git_url":"git://github.com/refractproject/minim.git","ssh_url":"git@github.com:refractproject/minim.git","clone_url":"https://github.com/refractproject/minim.git","svn_url":"https://github.com/refractproject/minim","homepage":"","size":430,"stargazers_count":18,"watchers_count":18,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":8,"open_issues":18,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/refractproject/minim/pulls/188"},"html":{"href":"https://github.com/refractproject/minim/pull/188"},"issue":{"href":"https://api.github.com/repos/refractproject/minim/issues/188"},"comments":{"href":"https://api.github.com/repos/refractproject/minim/issues/188/comments"},"review_comments":{"href":"https://api.github.com/repos/refractproject/minim/pulls/188/comments"},"review_comment":{"href":"https://api.github.com/repos/refractproject/minim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/refractproject/minim/pulls/188/commits"},"statuses":{"href":"https://api.github.com/repos/refractproject/minim/statuses/bf27bbb452e943d57d6d53305560126cbfed354b"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"kylef"}}