{"action":"created","issue":{"url":"https://api.github.com/repos/DapperDox/dapperdox/issues/34","repository_url":"https://api.github.com/repos/DapperDox/dapperdox","labels_url":"https://api.github.com/repos/DapperDox/dapperdox/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/DapperDox/dapperdox/issues/34/comments","events_url":"https://api.github.com/repos/DapperDox/dapperdox/issues/34/events","html_url":"https://github.com/DapperDox/dapperdox/issues/34","id":200120702,"number":34,"title":"Array type in resource model rendering incorrectly as object","user":{"login":"sem247","id":22054086,"avatar_url":"https://avatars.githubusercontent.com/u/22054086?v=3","gravatar_id":"","url":"https://api.github.com/users/sem247","html_url":"https://github.com/sem247","followers_url":"https://api.github.com/users/sem247/followers","following_url":"https://api.github.com/users/sem247/following{/other_user}","gists_url":"https://api.github.com/users/sem247/gists{/gist_id}","starred_url":"https://api.github.com/users/sem247/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sem247/subscriptions","organizations_url":"https://api.github.com/users/sem247/orgs","repos_url":"https://api.github.com/users/sem247/repos","events_url":"https://api.github.com/users/sem247/events{/privacy}","received_events_url":"https://api.github.com/users/sem247/received_events","type":"User","site_admin":false},"labels":[{"id":338793876,"url":"https://api.github.com/repos/DapperDox/dapperdox/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"zxchris","id":4802778,"avatar_url":"https://avatars.githubusercontent.com/u/4802778?v=3","gravatar_id":"","url":"https://api.github.com/users/zxchris","html_url":"https://github.com/zxchris","followers_url":"https://api.github.com/users/zxchris/followers","following_url":"https://api.github.com/users/zxchris/following{/other_user}","gists_url":"https://api.github.com/users/zxchris/gists{/gist_id}","starred_url":"https://api.github.com/users/zxchris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zxchris/subscriptions","organizations_url":"https://api.github.com/users/zxchris/orgs","repos_url":"https://api.github.com/users/zxchris/repos","events_url":"https://api.github.com/users/zxchris/events{/privacy}","received_events_url":"https://api.github.com/users/zxchris/received_events","type":"User","site_admin":false},"assignees":[{"login":"zxchris","id":4802778,"avatar_url":"https://avatars.githubusercontent.com/u/4802778?v=3","gravatar_id":"","url":"https://api.github.com/users/zxchris","html_url":"https://github.com/zxchris","followers_url":"https://api.github.com/users/zxchris/followers","following_url":"https://api.github.com/users/zxchris/following{/other_user}","gists_url":"https://api.github.com/users/zxchris/gists{/gist_id}","starred_url":"https://api.github.com/users/zxchris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zxchris/subscriptions","organizations_url":"https://api.github.com/users/zxchris/orgs","repos_url":"https://api.github.com/users/zxchris/repos","events_url":"https://api.github.com/users/zxchris/events{/privacy}","received_events_url":"https://api.github.com/users/zxchris/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2017-01-11T15:19:06Z","updated_at":"2017-01-31T10:32:19Z","closed_at":null,"body":"The following is a fragment from a response definition in my swagger doc:\r\n\r\n```\r\n\"definitions\": {\r\n        \"Dataset\": {\r\n            \"title\": “Dataset model”,\r\n            \"type\": \"object\",\r\n            \"properties\": {\r\n                \"items_per_page\": {\r\n                    \"type\": \"integer\",\r\n                    \"description\": \"Number of items returned in a page of response\"\r\n                },\r\n                \"start_index\": {\r\n                    \"type\": \"integer\",\r\n                    \"description\": \"Index of the starting item\"\r\n                },\r\n                \"total_items\": {\r\n                    \"type\": \"integer\",\r\n                    \"description\": \"The total number of items in dataset\"\r\n                },\r\n                \"items\": {\r\n                    \"description\": “Dataset items\",\r\n                    \"minItems\": 0,\r\n                    \"uniqueItems\": true,\r\n                    \"type\": \"array\",\r\n                    \"items\": {\r\n                        \"$ref\": \"#/definitions/Metadata\"\r\n                    }\r\n                }\r\n            }\r\n        },\r\n        \"Metadata\": {\r\n            \"title\": “Metadata model\",\r\n            \"type\": \"object\",\r\n        .\r\n        .\r\n        .\r\n```\r\nDapperDox renders the “Dataset.items” resource  incorrectly as an object rather than an array:\r\n\r\n```\r\n{\r\n    \"items\": {\r\n        \"id\": \"string\",\r\n        \"kind\": \"string\",\r\n        \"links\": [\r\n            {\r\n                \"url\": \"string\"\r\n            }\r\n        ],\r\n        \"title\": \"string\"\r\n    },\r\n    \"items_per_page\": \"integer\",\r\n    \"start_index\": \"integer\",\r\n    \"total_items\": \"integer\"\r\n}\r\n```\r\nSwagger UI correctly renders it as:\r\n\r\n```\r\n{\r\n  \"items_per_page\": 0,\r\n  \"start_index\": 0,\r\n  \"total_items\": 0,\r\n  \"items\": [\r\n    {\r\n      \"id\": \"string\",\r\n      \"kind\": \"string\",\r\n      \"title\": \"string\",\r\n      \"links\": [\r\n        {\r\n          \"url\": \"string\"\r\n        }\r\n      ]\r\n    }\r\n  ]\r\n}\r\n```\r\nThe items field is an array, not an object."},"comment":{"url":"https://api.github.com/repos/DapperDox/dapperdox/issues/comments/276328429","html_url":"https://github.com/DapperDox/dapperdox/issues/34#issuecomment-276328429","issue_url":"https://api.github.com/repos/DapperDox/dapperdox/issues/34","id":276328429,"user":{"login":"ralphvanetten","id":1533323,"avatar_url":"https://avatars.githubusercontent.com/u/1533323?v=3","gravatar_id":"","url":"https://api.github.com/users/ralphvanetten","html_url":"https://github.com/ralphvanetten","followers_url":"https://api.github.com/users/ralphvanetten/followers","following_url":"https://api.github.com/users/ralphvanetten/following{/other_user}","gists_url":"https://api.github.com/users/ralphvanetten/gists{/gist_id}","starred_url":"https://api.github.com/users/ralphvanetten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralphvanetten/subscriptions","organizations_url":"https://api.github.com/users/ralphvanetten/orgs","repos_url":"https://api.github.com/users/ralphvanetten/repos","events_url":"https://api.github.com/users/ralphvanetten/events{/privacy}","received_events_url":"https://api.github.com/users/ralphvanetten/received_events","type":"User","site_admin":false},"created_at":"2017-01-31T10:32:19Z","updated_at":"2017-01-31T10:32:19Z","body":"I have the same issue where an array is rendered as an object.\r\n\r\nThe stripped down version of my spec which reproduces this issue is:\r\n\r\n```\r\n{\r\n    \"x-navigateMethodsByName\": true,\r\n    \"definitions\": {\r\n    \"AccountList\": {\r\n      \"type\": \"object\",\r\n      \"title\": \"AccountList\",\r\n      \"properties\": {\r\n        \"account\": {\r\n          \"type\": \"array\",\r\n          \"title\": \"List with accounts\",\r\n          \"items\": {\r\n            \"$ref\": \"#/definitions/AccountInfo\"\r\n          }\r\n        }\r\n      }\r\n    },\r\n    \"AccountInfo\": {\r\n      \"type\": \"object\",\r\n      \"title\": \"Account information\",\r\n      \"properties\": {\r\n        \"displayName\": {\r\n          \"type\": \"string\",\r\n          \"title\": \"Display name\"\r\n        }\r\n      }\r\n    }\r\n  },\r\n  \"info\": {\r\n    \"description\": \"Minimal example for issue #34\",\r\n    \"title\": \"issue #34\"\r\n  },\r\n  \"swagger\": \"2.0\",\r\n  \"paths\": {\r\n    \"/account\": {\r\n      \"get\": {\r\n        \"summary\": \"List accounts\",\r\n        \"consumes\": [\r\n          \"application/json\"\r\n        ],\r\n        \"produces\": [\r\n          \"application/json\"\r\n        ],\r\n        \"responses\": {\r\n          \"200\": {\r\n            \"description\": \"Success\",\r\n            \"schema\": {\r\n              \"$ref\": \"#/definitions/AccountList\"\r\n            }\r\n          }\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nThis is rendered by dapperdox as:\r\n\r\n```\r\n{\r\n    \"account\": {\r\n        \"displayName\": \"string\"\r\n    }\r\n}\r\n```\r\n\r\nIn swagger-ui it is rendered correctly as:\r\n\r\n```\r\n{\r\n    \"account\": [\r\n        {\r\n            \"displayName\": \"string\"\r\n        }\r\n    ]\r\n}\r\n```"}}
{"actor":{"display_login":"ralphvanetten"}}