{"action":"closed","issue":{"url":"https://api.github.com/repos/cloudfoundry/uaa/issues/408","repository_url":"https://api.github.com/repos/cloudfoundry/uaa","labels_url":"https://api.github.com/repos/cloudfoundry/uaa/issues/408/labels{/name}","comments_url":"https://api.github.com/repos/cloudfoundry/uaa/issues/408/comments","events_url":"https://api.github.com/repos/cloudfoundry/uaa/issues/408/events","html_url":"https://github.com/cloudfoundry/uaa/issues/408","id":164841004,"number":408,"title":"Documented field types are sometimes incorrect","user":{"login":"wilkinsona","id":914682,"avatar_url":"https://avatars.githubusercontent.com/u/914682?v=3","gravatar_id":"","url":"https://api.github.com/users/wilkinsona","html_url":"https://github.com/wilkinsona","followers_url":"https://api.github.com/users/wilkinsona/followers","following_url":"https://api.github.com/users/wilkinsona/following{/other_user}","gists_url":"https://api.github.com/users/wilkinsona/gists{/gist_id}","starred_url":"https://api.github.com/users/wilkinsona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilkinsona/subscriptions","organizations_url":"https://api.github.com/users/wilkinsona/orgs","repos_url":"https://api.github.com/users/wilkinsona/repos","events_url":"https://api.github.com/users/wilkinsona/events{/privacy}","received_events_url":"https://api.github.com/users/wilkinsona/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cloudfoundry/uaa/labels/unscheduled","name":"unscheduled","color":"D9D9D9"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-11T13:47:12Z","updated_at":"2016-07-15T17:41:31Z","closed_at":"2016-07-15T17:41:31Z","body":"For example http://docs.cloudfoundry.com/uaa/#update51 documents `emails[].value` as an `Array` when it is, in fact, a `String`. This appears to be due to the [type being explicitly configured in ScimUserEndpointDocs](https://github.com/cloudfoundry/uaa/blob/3.4.1/uaa/src/test/java/org/cloudfoundry/identity/uaa/scim/endpoints/ScimUserEndpointDocs.java#L111).\r\n\r\nIf a field is present in the request or response payload, REST Docs will automatically determine its type meaning that the documented type is guaranteed to be in sync with the actual form of the request or response. The only time I'd expect to see a type being explicitly documented is when the field is optional and it isn't in the request or response.\r\n\r\nI've opened https://github.com/spring-projects/spring-restdocs/issues/276 so that REST Docs will cause the test to fail if a type has been explicitly documented and it doesn't match the type that can be determined by examining the payload."}}
{"actor":{"display_login":"sreetummidi"}}