File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -134,8 +134,8 @@ def consumes(self):
134134 def produces (self ):
135135 return self ._produces
136136
137- def with_definitions (self , schema : dict ):
138- if self .components :
137+ def with_definitions (self , schema : dict , append_components = True ):
138+ if self .components and append_components :
139139 schema .setdefault ("schema" , {})
140140 schema ["schema" ]["components" ] = self .components
141141 return schema
@@ -241,5 +241,5 @@ def body_definition(self, content_type: t.Optional[str] = None) -> dict:
241241 )
242242 content_type_dict = MediaTypeDict (self .request_body .get ("content" , {}))
243243 res = content_type_dict .get (content_type , {})
244- return self .with_definitions (res )
244+ return self .with_definitions (res , append_components = False )
245245 return {}
You can’t perform that action at this time.
0 commit comments