{"action":"closed","issue":{"url":"https://api.github.com/repos/apiaryio/drafter/issues/343","repository_url":"https://api.github.com/repos/apiaryio/drafter","labels_url":"https://api.github.com/repos/apiaryio/drafter/issues/343/labels{/name}","comments_url":"https://api.github.com/repos/apiaryio/drafter/issues/343/comments","events_url":"https://api.github.com/repos/apiaryio/drafter/issues/343/events","html_url":"https://github.com/apiaryio/drafter/issues/343","id":161678556,"number":343,"title":"JSON Schema generation doesn't show fixed sample values","user":{"login":"kylef","id":44164,"avatar_url":"https://avatars.githubusercontent.com/u/44164?v=3","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},"labels":[{"url":"https://api.github.com/repos/apiaryio/drafter/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-06-22T13:12:01Z","updated_at":"2016-07-05T13:12:49Z","closed_at":"2016-07-05T13:12:49Z","body":"Given the following example structure:\r\n\r\n```apib\r\n+ Response 200 (application/json)\r\n    + Attributes\r\n        - example1: my value (fixed)\r\n        - example2 (fixed)\r\n            - Sample\r\n                my value\r\n```\r\n\r\nThe generated JSON Schema is the following:\r\n\r\n```json\r\n{\r\n  \"$schema\": \"http://json-schema.org/draft-04/schema#\",\r\n  \"type\": \"object\",\r\n  \"properties\": {\r\n    \"example1\": {\r\n      \"type\": \"string\",\r\n      \"enum\": [\r\n        \"my value\"\r\n      ]\r\n    },\r\n    \"example2\": {\r\n      \"type\": \"string\"\r\n    }\r\n  },\r\n  \"required\": [\r\n    \"example1\",\r\n    \"example2\"\r\n  ]\r\n}\r\n```\r\n\r\nIt should, instead be the following (note, enum value for example2).\r\n\r\n```json\r\n{\r\n  \"$schema\": \"http://json-schema.org/draft-04/schema#\",\r\n  \"type\": \"object\",\r\n  \"properties\": {\r\n    \"example1\": {\r\n      \"type\": \"string\",\r\n      \"enum\": [\r\n        \"my value\"\r\n      ]\r\n    },\r\n    \"example2\": {\r\n      \"type\": \"string\",\r\n      \"enum\": [\r\n        \"my value\"\r\n      ]\r\n    }\r\n  },\r\n  \"required\": [\r\n    \"example1\",\r\n    \"example2\"\r\n  ]\r\n}\r\n```\r\n\r\nDrafter version 2.3.1."}}
{"actor":{"display_login":"w-vi"}}