From b00342138e12bdda28b83d2dd47b77ffa6f8c876 Mon Sep 17 00:00:00 2001 From: ShouheiNishi <96609867+ShouheiNishi@users.noreply.github.com> Date: Wed, 14 Dec 2022 19:15:49 +0900 Subject: [PATCH] Add json patch support (#702) --- openapi3filter/req_resp_decoder.go | 1 + 1 file changed, 1 insertion(+) diff --git a/openapi3filter/req_resp_decoder.go b/openapi3filter/req_resp_decoder.go index 029a84c2c..52c65afaa 100644 --- a/openapi3filter/req_resp_decoder.go +++ b/openapi3filter/req_resp_decoder.go @@ -999,6 +999,7 @@ func decodeBody(body io.Reader, header http.Header, schema *openapi3.SchemaRef, func init() { RegisterBodyDecoder("text/plain", plainBodyDecoder) RegisterBodyDecoder("application/json", jsonBodyDecoder) + RegisterBodyDecoder("application/json-patch+json", jsonBodyDecoder) RegisterBodyDecoder("application/x-yaml", yamlBodyDecoder) RegisterBodyDecoder("application/yaml", yamlBodyDecoder) RegisterBodyDecoder("application/problem+json", jsonBodyDecoder)