-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BaseType's has no attribute 'model_class' #607
Labels
Comments
A simple is include 'model_class' property into BaseType's: class BaseType(object):
@property
def model_class(self):
return self.typeclass But you have the recursive thing yet. |
Only the ModelType should have model_class property. It's probably a bug in ListType to assume its field has that property schematics/schematics/types/compound.py Line 200 in 3a144be
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: