JSONAPI-Resources / JSONAPI-Resources/jsonapi-resources
Any recommended workaround for embedding resources in Create/Update requests
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 2.3k
- Forks
- 546
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I've read up a lot of information about how 'embedded' / 'nested' resources are scheduled for v1.1 of the json-api but I was just wondering if anyone using jsonapi-resources has an interim solution, for de-serializing create/update requests where I can create / update a set of related entities. In the case of the create they wouldn't have client generated ids. I'm just hoping to create them as Rails nested resources.
Is there possibly a workaround for json-api resources similar to what was created for Active Model Serializers here: https://github.com/json-api/json-api/issues/795#issuecomment-202810800
I'm just trying to create a a few related entries in an atomic request.
For record fetching, I use sideloading.
I'm using Ember-data with the EmbeddedRecordsMixin to include the embedded relationships
Thanks for any suggestions
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no repository files or tests; start by tracing jsonapi-resources request deserialization for create/update and compare the linked Active Model Serializers workaround. Done means establishing a path for atomic creation and updating of related entities without client-generated IDs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100