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
I copied a simple code from https://gist.github.com/voidfiles/5c70471450ee476796c7, to extract a JSON schema for Swagger. It turned out that the code does not run properly. SO, I did some debugging and I found that the property 'model_class' for lists are not working. This is some code for debugging:
$ python test.py
Traceback (most recent call last):
File "test.py", line 6, in<module>
print(my_list.model_class)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/schematics/types/compound.py", line 197, in model_class
return self.field.model_class
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/schematics/types/compound.py", line 197, in model_class
return self.field.model_class
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/schematics/types/compound.py", line 197, in model_class
return self.field.model_class
AttributeError: 'IntType' object has no attribute 'model_class'
This is another weird behaviour. Since we have nested listed, should 'model_class' return 'ListType' (or 'ListType(ListType(IntTyoe))') when called in the most external container? Why do we recurse here?
Should we implement 'model_class' for all BaseType's?
The text was updated successfully, but these errors were encountered:
I copied a simple code from https://gist.github.com/voidfiles/5c70471450ee476796c7, to extract a JSON schema for Swagger. It turned out that the code does not run properly. SO, I did some debugging and I found that the property 'model_class' for lists are not working. This is some code for debugging:
Indeed, this also happend for any BaseType, for nested lists, and so. For example:
This is another weird behaviour. Since we have nested listed, should 'model_class' return 'ListType' (or 'ListType(ListType(IntTyoe))') when called in the most external container? Why do we recurse here?
Should we implement 'model_class' for all BaseType's?
The text was updated successfully, but these errors were encountered: