{"action":"opened","issue":{"url":"https://api.github.com/repos/springfox/springfox/issues/1902","repository_url":"https://api.github.com/repos/springfox/springfox","labels_url":"https://api.github.com/repos/springfox/springfox/issues/1902/labels{/name}","comments_url":"https://api.github.com/repos/springfox/springfox/issues/1902/comments","events_url":"https://api.github.com/repos/springfox/springfox/issues/1902/events","html_url":"https://github.com/springfox/springfox/issues/1902","id":241197348,"number":1902,"title":"XML example value has incorrect structure","user":{"login":"display-none","id":5703722,"avatar_url":"https://avatars1.githubusercontent.com/u/5703722?v=3","gravatar_id":"","url":"https://api.github.com/users/display-none","html_url":"https://github.com/display-none","followers_url":"https://api.github.com/users/display-none/followers","following_url":"https://api.github.com/users/display-none/following{/other_user}","gists_url":"https://api.github.com/users/display-none/gists{/gist_id}","starred_url":"https://api.github.com/users/display-none/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/display-none/subscriptions","organizations_url":"https://api.github.com/users/display-none/orgs","repos_url":"https://api.github.com/users/display-none/repos","events_url":"https://api.github.com/users/display-none/events{/privacy}","received_events_url":"https://api.github.com/users/display-none/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-07T08:44:02Z","updated_at":"2017-07-07T08:44:02Z","closed_at":null,"body":"I have an issue with springfox swagger 2.7.0.\r\n\r\nAs a response body I have the following:\r\n\r\n```java\r\npublic final class Response {\r\n\t@JacksonXmlElementWrapper(localName = \"partialResults\")\r\n\t@JacksonXmlProperty(localName = \"partialResult\")\r\n\tprivate final Set<PartialResult> partialResults;\r\n\tprivate final Status finalResult;\r\n\tprivate final String version;\r\n\r\n\t ...\r\n}\r\n```\r\n\r\n```java\r\npublic final class PartialResult {\r\n\tprivate final String name;\r\n\tprivate final Status result;\r\n\t@JsonInclude(Include.NON_EMPTY)\r\n\tprivate final String reason;\r\n\r\n\t ...\r\n}\r\n```\r\n\r\nThis call yields for example following response:\r\n\r\n```xml\r\n<Response>\r\n  <finalResult>NOK</finalResult>\r\n  <version>3.15</version>\r\n  <partialResults>\r\n    <partialResult>\r\n      <name>rule1</name>\r\n      <result>OK</result>\r\n    </partialResult>\r\n    <partialResult>\r\n      <name>rule2</name>\r\n      <result>NOK</result>\r\n      <reason>something failed</reason>\r\n    </partialResult>\r\n  </partialResults>\r\n</Response>\r\n```\r\n\r\nIn swagger ui I can see the model is correct:\r\n```\r\nResponse {\r\nfinalResult (string, optional) = ['NOK', 'OK', 'UNKNOWN'],\r\npartialResults (Array[PartialResult], optional),\r\nversion (string, optional)\r\n}\r\nPartialResult {\r\nname (string, optional),\r\nreason (string, optional),\r\nresult (string, optional) = ['NOK', 'OK', 'UNKNOWN']\r\n}\r\n```\r\n\r\nBut example value is not:\r\n```xml\r\n<?xml version=\"1.0\"?>\r\n<Response>\r\n  <finalResult>NOK</finalResult>\r\n  <partialResults>\r\n    <name>string</name>\r\n    <reason>string</reason>\r\n    <result>NOK</result>\r\n  </partialResults>\r\n  <version>string</version>\r\n</Response>\r\n```\r\n\r\nNotice that under `partialResults` there is always a `partialResult` tag, which is missing in example value.\r\n"}}
{"actor":{"display_login":"display-none"}}