From 1a0c916b12c99d58e12e625276c9560b1d6ab163 Mon Sep 17 00:00:00 2001 From: peppelinux Date: Wed, 5 Aug 2020 15:04:37 +0200 Subject: [PATCH] OASJSONParser --- rest_framework/parsers.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rest_framework/parsers.py b/rest_framework/parsers.py index fc4eb1428..947529301 100644 --- a/rest_framework/parsers.py +++ b/rest_framework/parsers.py @@ -67,6 +67,13 @@ class JSONParser(BaseParser): raise ParseError('JSON parse error - %s' % str(exc)) +class OAS3JSONParser(JSONParser): + """ + Parses OpenAPI+JSON-serialized data. + """ + media_type = 'application/openapi+json' + + class FormParser(BaseParser): """ Parser for form data.