2323]
2424
2525ABLE_TO_RECIEVE_BODY_LIST = [
26- KW_POST ,
27- KW_PUT ,
28- KW_PATCH
26+ KW_POST
27+ , KW_PUT
28+ # , KW_PATCH
2929]
3030
3131DEFAULT_CONTENT_TYPE = 'application/json'
@@ -244,7 +244,7 @@ def addDtoToUrlVerb(verb, url, dtoClass, documentation, dtoType=v.OBJECT, where=
244244 k .DESCRIPTION : None ,
245245 k .SCHEMA : getDtoSchema (dtoName , dtoType , dtoClass )
246246 })
247- if KW_RESPONSE == where :
247+ elif KW_RESPONSE == where :
248248 documentation [k .PATHS ][url ][verb ][k .RESPONSES ][k .DEFAULT_STATUS_CODE ] = {
249249 k .DESCRIPTION : v .DEFAULT_RESPONSE ,
250250 k .SCHEMA : getDtoSchema (dtoName , dtoType , dtoClass )
@@ -257,7 +257,7 @@ def addDtoToUrlVerb(verb, url, dtoClass, documentation, dtoType=v.OBJECT, where=
257257 dtoClassDoc [k .REQUIRED ] = ReflectionHelper .getAttributeNameList (dtoClass )
258258 for attributeName in dtoClassDoc [k .REQUIRED ] :
259259 attributeType = getTypeFromAttributeNameAndChildDtoClass (attributeName , dtoType )
260- childDtoClass = getNullableChildDtoClass (attributeName , dtoClass , verb , url , documentation , where = where )
260+ childDtoClass = getNullableChildDtoClass (attributeName , dtoClass , verb , url , documentation )
261261 if childDtoClass :
262262 dtoClassDoc [k .PROPERTIES ][attributeName ] = getDtoSchema (attributeName , attributeType , childDtoClass )
263263 else :
@@ -276,7 +276,7 @@ def addDtoToUrlVerb(verb, url, dtoClass, documentation, dtoType=v.OBJECT, where=
276276 k .DESCRIPTION : None ,
277277 k .SCHEMA : getDtoSchema (dtoName , dtoType , dtoClass )
278278 })
279- if KW_RESPONSE == where :
279+ elif KW_RESPONSE == where :
280280 documentation [k .PATHS ][url ][verb ][k .RESPONSES ][k .DEFAULT_STATUS_CODE ] = {
281281 k .DESCRIPTION : v .DEFAULT_RESPONSE ,
282282 k .SCHEMA : getDtoSchema (dtoName , dtoType , dtoClass )
@@ -352,13 +352,13 @@ def addSecurity(verb, url, roleRequired, documentation):
352352 })
353353
354354
355- def getNullableChildDtoClass (attributeName , dtoClass , verb , url , documentation , where = None ):
355+ def getNullableChildDtoClass (attributeName , dtoClass , verb , url , documentation ):
356356 log .log (getNullableChildDtoClass , f'attributeName: { attributeName } , dtoClass: { dtoClass } , verb: { verb } , url: { url } ' )
357357 childDtoClass = Serializer .getTargetClassFromFatherClassAndChildMethodName (dtoClass , attributeName )
358358 log .log (getNullableChildDtoClass , f'childDtoClass: { childDtoClass } ' )
359359 if childDtoClass :
360360 if ReflectionHelper .getName (type (type )) == ReflectionHelper .getName (type (childDtoClass )) :
361- addDtoToUrlVerb (verb , url , childDtoClass , documentation , where = where )
361+ addDtoToUrlVerb (verb , url , childDtoClass , documentation )
362362 else :
363- addDtoToUrlVerb (verb , url , type (childDtoClass ), documentation , where = where )
363+ addDtoToUrlVerb (verb , url , type (childDtoClass ), documentation )
364364 return childDtoClass
0 commit comments