Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/connexion/validators/__init__.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

7 statements  

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}