Open Tronix117 opened 7 years ago
Are custom actions possible currently? If yes, how? If not, how can I help?
Custom actions are working, but the adapter is not plugged into those, so it means no serialization/deserialization from/to jsonapi.
I didn't put much effort into it, because in a way custom actions are not standard calls specified by JSONApi, so the format can be anything.
In any case, we should be able to give a configuration option to the addAction to say, we want it to go through the serialization/deserialization.
I will not have time to implement before january, so if need it, you can still submit a PR.
There is a workaround though:
If you want to call a GET on /something/page/current
and expect one result, do
store.getMapper('xxx').find('current', {
endpoint: 'something/page'
})
Will work just fine, and goes through jsonapi serialization deserialization
Sounds good. I'd love to send you a PR but I don't think I'm qualified to do a good contribution on this project due to the lack of any deeper knowledge of the adapter, so I won't to probably :)
Thanks for your help!
Add support for deserialize/serialize for custom actions:
See if in the
then
there should be response or directlydata
, in which case we can useraw: true
to get the response.