Skip to content

Commit

Permalink
Add support for application/problem+json (#275)
Browse files Browse the repository at this point in the history
Add support for content type application/problem+json for response validation
  • Loading branch information
DanielXu77 authored Nov 25, 2020
1 parent 254be12 commit e8b3436
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions openapi3filter/req_resp_decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,7 @@ func decodeBody(body io.Reader, header http.Header, schema *openapi3.SchemaRef,
func init() {
RegisterBodyDecoder("text/plain", plainBodyDecoder)
RegisterBodyDecoder("application/json", jsonBodyDecoder)
RegisterBodyDecoder("application/problem+json", jsonBodyDecoder)
RegisterBodyDecoder("application/x-www-form-urlencoded", urlencodedBodyDecoder)
RegisterBodyDecoder("multipart/form-data", multipartBodyDecoder)
RegisterBodyDecoder("application/octet-stream", FileBodyDecoder)
Expand Down

0 comments on commit e8b3436

Please sign in to comment.