{"action":"closed","issue":{"url":"https://api.github.com/repos/petrochenko-pavel-a/raml-js-parser2-issues/issues/45","repository_url":"https://api.github.com/repos/petrochenko-pavel-a/raml-js-parser2-issues","labels_url":"https://api.github.com/repos/petrochenko-pavel-a/raml-js-parser2-issues/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/petrochenko-pavel-a/raml-js-parser2-issues/issues/45/comments","events_url":"https://api.github.com/repos/petrochenko-pavel-a/raml-js-parser2-issues/issues/45/events","html_url":"https://github.com/petrochenko-pavel-a/raml-js-parser2-issues/issues/45","id":146565592,"number":45,"title":"Suggestion to change how you define multiple examples","user":{"login":"VasiliyLysokobylko","id":13314242,"avatar_url":"https://avatars.githubusercontent.com/u/13314242?v=3","gravatar_id":"","url":"https://api.github.com/users/VasiliyLysokobylko","html_url":"https://github.com/VasiliyLysokobylko","followers_url":"https://api.github.com/users/VasiliyLysokobylko/followers","following_url":"https://api.github.com/users/VasiliyLysokobylko/following{/other_user}","gists_url":"https://api.github.com/users/VasiliyLysokobylko/gists{/gist_id}","starred_url":"https://api.github.com/users/VasiliyLysokobylko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VasiliyLysokobylko/subscriptions","organizations_url":"https://api.github.com/users/VasiliyLysokobylko/orgs","repos_url":"https://api.github.com/users/VasiliyLysokobylko/repos","events_url":"https://api.github.com/users/VasiliyLysokobylko/events{/privacy}","received_events_url":"https://api.github.com/users/VasiliyLysokobylko/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/petrochenko-pavel-a/raml-js-parser2-issues/labels/closed","name":"closed","color":"b60205"},{"url":"https://api.github.com/repos/petrochenko-pavel-a/raml-js-parser2-issues/labels/raml10-rc2","name":"raml10-rc2","color":"0e8a16"},{"url":"https://api.github.com/repos/petrochenko-pavel-a/raml-js-parser2-issues/labels/spec-consistency","name":"spec-consistency","color":"ededed"},{"url":"https://api.github.com/repos/petrochenko-pavel-a/raml-js-parser2-issues/labels/spec-expand-current","name":"spec-expand-current","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-07T09:49:15Z","updated_at":"2016-04-20T19:35:46Z","closed_at":"2016-04-20T19:35:46Z","body":"In the current RAML RC1 you can define multiple examples either using an array of `-content` keys or unique names followed by `content`. Both options are illustrated below:\r\n\r\n```yaml\r\ntypes:\r\n  Org:\r\n    type: object\r\n    properties:\r\n      name: string\r\n      address?: string\r\n    examples: # multiple examples using an array of different contents\r\n      - content:\r\n          name: Acme\r\n      - content:\r\n          name: Software Corp\r\n          address: 35 Central Street\r\n```\r\n\r\n```yaml\r\ntypes:\r\n  Org:\r\n    type: object\r\n    properties:\r\n      name: string\r\n      address?: string\r\n    examples: # multiple examples identified by their unique key names\r\n      acme:\r\n        content:\r\n          name: Acme\r\n      softwareCorp:\r\n        content:\r\n          name: Software Corp\r\n          address: 35 Central Street\r\n```\r\n\r\nThe first example using an array of `-content` keys is not valid according to YAML and should not be supported in the spec IMHO. The second uses unique keys which is fine, but we should remove `content` as it is not coherent to how you define a single example like the following:\r\n\r\n```yaml\r\ntypes:\r\n  Org:\r\n    type: object\r\n    properties:\r\n      name: string\r\n      address?: string\r\n    example: # single example\r\n      name: Software Corp\r\n      address: 35 Central Street\r\n```\r\n\r\nMy suggestion would be to use the same set of properties available in a single example also in examples except that each example needs to be identified by a unique key. The following is a modified version illustrates that:\r\n\r\n```yaml\r\ntypes:\r\n  Org:\r\n    type: object\r\n    properties:\r\n      name: string\r\n      address?: string\r\n    examples: # multiple examples identified by their unique key names\r\n      - acme:\r\n          name: Acme\r\n      - softwareCorp:\r\n          name: Software Corp\r\n          address: 35 Central Street\r\n```\r\n\r\nI am looking forward to hear some feedback."}}