Closed mahenzon closed 3 years ago
This way to get schema works only if using apispec plugin - it resolves schema on start
https://github.com/AdCombo/flask-combo-jsonapi/blob/23a3ecf304cfba1d1fb23a4623a92d7beddcc95e/flask_combo_jsonapi/schema.py#L143
but __schema MAY and IS not resolved yet
__schema
It's resolved in Relationship.schema https://github.com/AdCombo/combojsonapi/blob/98162841423acf20414b52c96ec2dffdda9f7131/combojsonapi/utils/marshmallow_fields.py#L22
Relationship.schema
so this way it works:
def get_related_schema(schema, field): return schema._declared_fields[field].schema
fixed in #32, released in 1.0.4
This way to get schema works only if using apispec plugin - it resolves schema on start
https://github.com/AdCombo/flask-combo-jsonapi/blob/23a3ecf304cfba1d1fb23a4623a92d7beddcc95e/flask_combo_jsonapi/schema.py#L143
but
__schema
MAY and IS not resolved yetIt's resolved in
Relationship.schema
https://github.com/AdCombo/combojsonapi/blob/98162841423acf20414b52c96ec2dffdda9f7131/combojsonapi/utils/marshmallow_fields.py#L22so this way it works: