{"action":"closed","issue":{"url":"https://api.github.com/repos/zircote/swagger-php/issues/279","repository_url":"https://api.github.com/repos/zircote/swagger-php","labels_url":"https://api.github.com/repos/zircote/swagger-php/issues/279/labels{/name}","comments_url":"https://api.github.com/repos/zircote/swagger-php/issues/279/comments","events_url":"https://api.github.com/repos/zircote/swagger-php/issues/279/events","html_url":"https://github.com/zircote/swagger-php/issues/279","id":128917729,"number":279,"title":"Swagger-PHP isn't outputting \"xml\" when specified as child of \"items\"","user":{"login":"xiehan","id":855115,"avatar_url":"https://avatars.githubusercontent.com/u/855115?v=3","gravatar_id":"","url":"https://api.github.com/users/xiehan","html_url":"https://github.com/xiehan","followers_url":"https://api.github.com/users/xiehan/followers","following_url":"https://api.github.com/users/xiehan/following{/other_user}","gists_url":"https://api.github.com/users/xiehan/gists{/gist_id}","starred_url":"https://api.github.com/users/xiehan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiehan/subscriptions","organizations_url":"https://api.github.com/users/xiehan/orgs","repos_url":"https://api.github.com/users/xiehan/repos","events_url":"https://api.github.com/users/xiehan/events{/privacy}","received_events_url":"https://api.github.com/users/xiehan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-26T19:27:05Z","updated_at":"2016-04-08T11:29:48Z","closed_at":"2016-04-08T11:29:48Z","body":"The [2.0 spec](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#xmlObject) makes it pretty clear that you should be able to specify `xml` as a child property of `items` in a definition, e.g.:\r\n\r\n```yaml\r\nanimals:\r\n  type: array\r\n  items:\r\n    type: string\r\n    xml:\r\n      name: animal\r\n  xml:\r\n    wrapped: true\r\n```\r\n\r\nHowever, I have a definition (some other unnecessary properties truncated) coded in Swagger-PHP as follows:\r\n\r\n```php\r\n/**\r\n * @SWG\\Definition(definition=\"InLineXml\",\r\n *   type=\"object\",\r\n *   @SWG\\Property(property=\"Extensions\",\r\n *     type=\"array\",\r\n *     @SWG\\Items(type=\"string\",\r\n *       @SWG\\Xml(name=\"Extension\")\r\n *     ),\r\n *     @SWG\\Xml(wrapped=true)\r\n *   )\r\n * )\r\n */\r\n```\r\n\r\nwhich outputs:\r\n\r\n```json\r\n        \"InLineXml\": {\r\n            \"properties\": {\r\n                \"Extensions\": {\r\n                    \"type\": \"array\",\r\n                    \"items\": {\r\n                        \"type\": \"string\"\r\n                    },\r\n                    \"xml\": {\r\n                        \"wrapped\": true\r\n                    }\r\n                }\r\n            },\r\n            \"type\": \"object\"\r\n        }\r\n```\r\n\r\nAnd another definition:\r\n\r\n```php\r\n/**\r\n * @SWG\\Definition(definition=\"ErrorXmlDocument\",\r\n *   type=\"object\",\r\n *   @SWG\\Xml(name=\"DAAST\"),\r\n *   @SWG\\Property(property=\"error\",\r\n *     type=\"array\",\r\n *     @SWG\\Items(type=\"string\",\r\n *       @SWG\\Xml(name=\"error\")\r\n *     ),\r\n *     @SWG\\Xml(wrapped=false)\r\n *   )\r\n * )\r\n */\r\n```\r\n\r\nwhich outputs:\r\n\r\n```json\r\n        \"ErrorXmlDocument\": {\r\n            \"properties\": {\r\n                \"error\": {\r\n                    \"type\": \"array\",\r\n                    \"items\": {\r\n                        \"type\": \"string\"\r\n                    },\r\n                    \"xml\": {\r\n                        \"wrapped\": false\r\n                    }\r\n                }\r\n            },\r\n            \"type\": \"object\",\r\n            \"xml\": {\r\n                \"name\": \"DAAST\"\r\n            }\r\n        }\r\n```\r\n\r\nIn neither case, the `xml` property of the `items` definition is present. However, I don't get any compiler errors."}}