Open gdgupta11 opened 6 years ago
I think this is a issue with the serializer, marshmallow
.
@gdgupta11 You can setup an inflection on your schema to handle dash conversion in field names: https://marshmallow-jsonapi.readthedocs.io/en/latest/quickstart.html#inflection
This is how I've implemented that: https://github.com/rgant/saas-api-boilerplate/blob/master/ourmarshmallow/schema.py#L57
As per JSON:api specification the the attributes like first-name should be dashed ( - ) but in the example here http://flask-rest-jsonapi.readthedocs.io/en/stable/ first_name ( with underscore ) is used.
This is creating problem for me when I am using with ember.js because in ember.js the JSONAPISerializer expects attributes to be dasherized in the document payload returned by your server.
When I am trying to do that in my Flask model as well as schema for Flask-rest-jsonapi, it says me that SyntaxError: can't assign to operator.