JSONAPI-Resources / JSONAPI-Resources/jsonapi-resources

Any recommended workaround for embedding resources in Create/Update requests

オープン
#775 コメント 10 件 リアクション 3 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Type: Enhancement Type: Question
主要言語
Ruby
スター
2.3k
フォーク
546
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

この issue ではリポジトリのファイルやテストが指定されていません。まず、create/update に対する jsonapi-resources のリクエストのデシリアライズを追跡し、リンクされている Active Model Serializers の回避策と比較してください。クライアントが生成した ID なしで関連エンティティをアトミックに作成および更新するための経路を確立できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rails, ruby
領域
api, backend
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
20/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。