{"action":"created","issue":{"url":"https://api.github.com/repos/apigee-127/swagger-tools/issues/326","labels_url":"https://api.github.com/repos/apigee-127/swagger-tools/issues/326/labels{/name}","comments_url":"https://api.github.com/repos/apigee-127/swagger-tools/issues/326/comments","events_url":"https://api.github.com/repos/apigee-127/swagger-tools/issues/326/events","html_url":"https://github.com/apigee-127/swagger-tools/pull/326","id":127790987,"number":326,"title":"Configure expressjs/body-parser to accept custom JSON types","user":{"login":"matthewspivey","id":1001689,"avatar_url":"https://avatars.githubusercontent.com/u/1001689?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewspivey","html_url":"https://github.com/matthewspivey","followers_url":"https://api.github.com/users/matthewspivey/followers","following_url":"https://api.github.com/users/matthewspivey/following{/other_user}","gists_url":"https://api.github.com/users/matthewspivey/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewspivey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewspivey/subscriptions","organizations_url":"https://api.github.com/users/matthewspivey/orgs","repos_url":"https://api.github.com/users/matthewspivey/repos","events_url":"https://api.github.com/users/matthewspivey/events{/privacy}","received_events_url":"https://api.github.com/users/matthewspivey/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-20T21:44:48Z","updated_at":"2016-01-20T22:01:14Z","closed_at":"2016-01-20T22:01:14Z","pull_request":{"url":"https://api.github.com/repos/apigee-127/swagger-tools/pulls/326","html_url":"https://github.com/apigee-127/swagger-tools/pull/326","diff_url":"https://github.com/apigee-127/swagger-tools/pull/326.diff","patch_url":"https://github.com/apigee-127/swagger-tools/pull/326.patch"},"body":"Custom JSON types cause a validation error for body parameters. For example, using the [JSON API content type \"application/vnd.api+json\"](\r\nhttp://jsonapi.org/format/#content-negotiation), triggers an error with the code SCHEMA_VALIDATION_FAILED. However, the exact same request and response will correctly validate using \"application/json\".\r\n\r\nThe problem is that swagger-tools needs to configure expressjs/body-parser to accept custom JSON types. The expressjs/body-parser readme provides an example of this exact case: https://github.com/expressjs/body-parser#change-content-type-for-parsers.\r\n"},"comment":{"url":"https://api.github.com/repos/apigee-127/swagger-tools/issues/comments/173375438","html_url":"https://github.com/apigee-127/swagger-tools/pull/326#issuecomment-173375438","issue_url":"https://api.github.com/repos/apigee-127/swagger-tools/issues/326","id":173375438,"user":{"login":"whitlockjc","id":98899,"avatar_url":"https://avatars.githubusercontent.com/u/98899?v=3","gravatar_id":"","url":"https://api.github.com/users/whitlockjc","html_url":"https://github.com/whitlockjc","followers_url":"https://api.github.com/users/whitlockjc/followers","following_url":"https://api.github.com/users/whitlockjc/following{/other_user}","gists_url":"https://api.github.com/users/whitlockjc/gists{/gist_id}","starred_url":"https://api.github.com/users/whitlockjc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whitlockjc/subscriptions","organizations_url":"https://api.github.com/users/whitlockjc/orgs","repos_url":"https://api.github.com/users/whitlockjc/repos","events_url":"https://api.github.com/users/whitlockjc/events{/privacy}","received_events_url":"https://api.github.com/users/whitlockjc/received_events","type":"User","site_admin":false},"created_at":"2016-01-20T22:01:14Z","updated_at":"2016-01-20T22:01:14Z","body":"There is another request to support this and I'm still on the fence.  I'm marking this as a duplicate of #322 and we can discuss it there."}}