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
Is it possible in the Schema classes to inherit the properties from another class somehow?
The use case I have is that I have a bunch of different lists. All the lists share some common properties for pagination, the only thing that is different is the schema reference for the items in that list.
So what I would like is to reuse all those properties.
classListModel(Schema):
type="object"properties= {
"count": {
"description": "The total number of items in the list",
"type": "int"
},
"limit": {
"description": "The number of items to show per page",
"type": "int"
},
"offset": {
"description": "Number of items to offset the pagination",
"type": "int"
}
# "items" goes here in the inherited
}
And then have multiple specific schemas for the different types:
classSomeListModel(ListModel):
# properties should now get "items": SomeModel.array() added to it
The text was updated successfully, but these errors were encountered:
Hello,
Is it possible in the
Schema
classes to inherit the properties from another class somehow?The use case I have is that I have a bunch of different lists. All the lists share some common properties for pagination, the only thing that is different is the
schema
reference for theitems
in that list.So what I would like is to reuse all those properties.
And then have multiple specific schemas for the different types:
The text was updated successfully, but these errors were encountered: