marshmallow-jsonapi
marshmallow-jsonapi copied to clipboard
Attribute inspection
Would a PR be accepted that pulled out part of this code:
https://github.com/marshmallow-code/marshmallow-jsonapi/blob/d3ef934cc419d5208e37503752214934b3a98260/marshmallow_jsonapi/schema.py#L320-L341
into a separate function? Specifically, the part that creates a map of JSONAPI attributes to Marshmallow fields?
The use case I have in mind is being able to tell which attributes I'll end up with before dumping. I would still need to apply inflect(attribute)
and check field_obj.load_only
, but at least I don't have to rely on internal API.