You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It doesn't appear that it is correctly deserializing, i.e. the error field contains another AuthResponse object instead of an Error model, and no Auth object in the results field.
Has anyone run into this before? Using the same swagger resource file, I don't appear to have this problem with the PHP client.
The text was updated successfully, but these errors were encountered:
dylangleason
changed the title
swagger.py doesn't appear to deserialize models correctly
Python - swagger.mustache doesn't appear to deserialize models correctly
Sep 26, 2014
Based on the output it appears that objClass (line 192) never changes, e.g. in the above case it is always AuthResponse. This appears to be fixed by passing attrType to the recursion instead of objClass.
else:
setattr(instance, attr, self.deserialize(value,
objClass)) # should be attrType, not objClass
I have a model with the following specification:
With the following model:
However, I noted that swagger.mustache (https://github.com/wordnik/swagger-codegen/blob/master/src/main/resources/python/swagger.mustache) seems to deserialize the object thusly after getting a response from the server:
It doesn't appear that it is correctly deserializing, i.e. the error field contains another
AuthResponse
object instead of anError
model, and noAuth
object in theresults
field.Has anyone run into this before? Using the same swagger resource file, I don't appear to have this problem with the PHP client.
The text was updated successfully, but these errors were encountered: