File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def view_to_thing_action_forms(rules: list, view: View):
33
33
content_type = getattr (view , "content_type" , "application/json" )
34
34
35
35
# See if the action has an unusual 200 response
36
- responses = view .get_responses ( )
36
+ responses = view .get_apispec (). get ( "post" , {}). get ( "responses" , {} )
37
37
response_content_type = "application/json" # Default assumed content_type
38
38
39
39
for response_code in (200 , 201 ):
@@ -77,7 +77,8 @@ def view_to_thing_property_forms(rules: list, view: View):
77
77
content_type = getattr (view , "content_type" , "application/json" )
78
78
79
79
# See if the property has an unusual 201 response
80
- responses = view .get_responses ()
80
+ # TODO: Do this per-method
81
+ responses = view .get_apispec ().get ("get" , {}).get ("responses" , {})
81
82
response_content_type = "application/json" # Default assumed content_type
82
83
83
84
for response_code in (201 , 200 ):
You can’t perform that action at this time.
0 commit comments