@@ -46,6 +46,8 @@ class View(MethodView):
46
46
title : None
47
47
48
48
responses : dict = {}
49
+ arg_methods = ("POST" , "PUT" , "PATCH" )
50
+ marshal_methods = ("GET" , "PUT" , "POST" , "PATCH" )
49
51
50
52
def __init__ (self , * args , ** kwargs ):
51
53
MethodView .__init__ (self , * args , ** kwargs )
@@ -93,12 +95,18 @@ def dispatch_request(self, *args, **kwargs):
93
95
meth = getattr (self , "get" , None )
94
96
95
97
# Inject request arguments if an args schema is defined
96
- if request .method in ( "POST" , "PUT" , "PATCH" ) and self .get_args ():
98
+ if request .method in self . arg_methods and self .get_args ():
97
99
meth = use_args (self .get_args ())(meth )
98
100
99
101
# Marhal response if a response schema is defined
102
+ print ("" )
103
+ print (meth )
104
+ print (request .method )
105
+ print (self .marshal_methods )
106
+ print (request .method in self .marshal_methods )
107
+ print (self .get_schema ())
100
108
if (
101
- request .method in ( "GET" , "PUT" , "POST" , "PATCH" )
109
+ request .method in self . marshal_methods
102
110
and self .get_schema ()
103
111
):
104
112
meth = marshal_with (self .get_schema ())(meth )
0 commit comments