{"action":"created","issue":{"url":"https://api.github.com/repos/apiaryio/mson/issues/31","labels_url":"https://api.github.com/repos/apiaryio/mson/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/apiaryio/mson/issues/31/comments","events_url":"https://api.github.com/repos/apiaryio/mson/issues/31/events","html_url":"https://github.com/apiaryio/mson/issues/31","id":91028510,"number":31,"title":"Bug in Schema generation for Enum and Array","user":{"login":"JAStanton","id":645300,"avatar_url":"https://avatars.githubusercontent.com/u/645300?v=3","gravatar_id":"","url":"https://api.github.com/users/JAStanton","html_url":"https://github.com/JAStanton","followers_url":"https://api.github.com/users/JAStanton/followers","following_url":"https://api.github.com/users/JAStanton/following{/other_user}","gists_url":"https://api.github.com/users/JAStanton/gists{/gist_id}","starred_url":"https://api.github.com/users/JAStanton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JAStanton/subscriptions","organizations_url":"https://api.github.com/users/JAStanton/orgs","repos_url":"https://api.github.com/users/JAStanton/repos","events_url":"https://api.github.com/users/JAStanton/events{/privacy}","received_events_url":"https://api.github.com/users/JAStanton/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/apiaryio/mson/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-06-25T17:35:51Z","updated_at":"2015-08-12T13:31:00Z","closed_at":null,"body":"I have an enum of strings called `Notification Type`\r\nI want to another object to have a property and the properties type is an array of `Notification Type`.\r\n\r\n\r\n```md\r\n## Notification Type (enum[string])\r\n+ TYPE_A\r\n+ TYPE_B\r\n+ TYPE_C\r\n\r\n## Notifications (object)\r\n+ sms (array[Notification Type])\r\n+ email (array[Notification Type])\r\n```\r\n\r\nor possibly\r\n```md\r\n## Notification Type (enum[string])\r\n+ TYPE_A\r\n+ TYPE_B\r\n+ TYPE_C\r\n\r\n## Notifications (object)\r\n+ sms (array)\r\n    + TYPE_A (Notification Type)\r\n    + TYPE_B (Notification Type)\r\n+ email (array)\r\n    + TYPE_C (Notification Type)\r\n```\r\n\r\nBasically I want the generated schema to look like this:\r\n```json\r\n\"notifications\": {\r\n  \"email\": {\r\n    \"type\": \"array\",\r\n    \"items\": {\r\n      \"type\": \"string\",\r\n      \"enum\": [\"TYPE_A\", \"TYPE_B\", \"TYPE_C\"]\r\n    }\r\n  },\r\n  \"sms\": {\r\n    \"type\": \"array\",\r\n    \"items\": {\r\n      \"type\": \"string\",\r\n      \"enum\": [\"TYPE_A\", \"TYPE_B\", \"TYPE_C\"]\r\n    }\r\n  },\r\n}\r\n```\r\n\r\nHowever when I try the first two options I get a schema that looks like this:\r\n```json\r\n\"notifications\": {\r\n  \"type\": \"object\",\r\n  \"properties\": {\r\n    \"sms\": {\r\n      \"type\": \"array\",\r\n    },\r\n    \"email\": {\r\n      \"type\": \"array\",\r\n    }\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/apiaryio/mson/issues/comments/130302354","html_url":"https://github.com/apiaryio/mson/issues/31#issuecomment-130302354","issue_url":"https://api.github.com/repos/apiaryio/mson/issues/31","id":130302354,"user":{"login":"erewh0n","id":1220273,"avatar_url":"https://avatars.githubusercontent.com/u/1220273?v=3","gravatar_id":"","url":"https://api.github.com/users/erewh0n","html_url":"https://github.com/erewh0n","followers_url":"https://api.github.com/users/erewh0n/followers","following_url":"https://api.github.com/users/erewh0n/following{/other_user}","gists_url":"https://api.github.com/users/erewh0n/gists{/gist_id}","starred_url":"https://api.github.com/users/erewh0n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erewh0n/subscriptions","organizations_url":"https://api.github.com/users/erewh0n/orgs","repos_url":"https://api.github.com/users/erewh0n/repos","events_url":"https://api.github.com/users/erewh0n/events{/privacy}","received_events_url":"https://api.github.com/users/erewh0n/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T13:31:00Z","updated_at":"2015-08-12T13:31:00Z","body":"+1 it would be great if we weren't forced to use the `fixed` type attribute in order to get the auto-generation of JSON schemas for objects nested in arrays.  This is a common use case for us and obviously not every field in nested objects are required."}}