-
Notifications
You must be signed in to change notification settings - Fork 24
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
Pass payload through serializer? #41
Comments
Yes, if you would like use serializers and adapter you have to use
|
Oh, sorry! you want to serialize your payload by the serializer. I think this is not implemented. You need to override So that you can have pure But, a... I think we are missing some serializer integration to allow for custom normalization and serialization. We should try to cover it. |
You can also try https://emberjs.com/api/ember-data/3.0/classes/DS.Model/methods/serialize?anchor=serialize instead of |
Feel free to reopen if needed |
I'm also in favour of using serializers to determine the correct (JSON API) payload. This would be more in line with Ember Data. Adapters take care of the request, serializers take care of the payload. |
An additional question kind of related to this: |
I have a non-REST endpoint
users/invite
and I'm trying to figure how to use this library to send a payload to that endpoint using JSONAPI format. My Application serializer uses JSONAPISerializer fromember-custom-actions
already (I'm using this library in a couple other places already).I'd like
user.invite()
to behave the same asuser.save()
in the sense that the User model is serialized (JSONAPI format) and sent as params to the endpoint.On my User model, I have the following property:
and in my
invite
action, I'm doing this:The problem is that the payload doesn't pass through the ApplicationSerializer. I feel like I'm missing something obvious here!
The text was updated successfully, but these errors were encountered: