1from connexion.datastructures import MediaTypeDict
2
3from .abstract import ( # NOQA
4 AbstractRequestBodyValidator,
5 AbstractResponseBodyValidator,
6)
7from .form_data import FormDataValidator, MultiPartFormDataValidator
8from .json import DefaultsJSONRequestBodyValidator # NOQA
9from .json import (
10 JSONRequestBodyValidator,
11 JSONResponseBodyValidator,
12 TextResponseBodyValidator,
13)
14from .parameter import ParameterValidator
15
16VALIDATOR_MAP = {
17 "parameter": ParameterValidator,
18 "body": MediaTypeDict(
19 {
20 "*/*json": JSONRequestBodyValidator,
21 "application/x-www-form-urlencoded": FormDataValidator,
22 "multipart/form-data": MultiPartFormDataValidator,
23 }
24 ),
25 "response": MediaTypeDict(
26 {
27 "*/*json": JSONResponseBodyValidator,
28 "text/plain": TextResponseBodyValidator,
29 }
30 ),
31}