JSONAPI-Resources / JSONAPI-Resources/jsonapi-resources

Any recommended workaround for embedding resources in Create/Update requests

Đang mở
#775 10 bình luận 3 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Type: Enhancement Type: Question
Ngôn ngữ chính
Ruby
Star
2.3k
Fork
546
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Issue không nêu tên tệp hoặc test nào trong repository; hãy bắt đầu bằng cách lần theo quá trình giải tuần tự request của jsonapi-resources cho create/update và so sánh workaround của Active Model Serializers được liên kết. Công việc được xem là hoàn tất khi thiết lập được một phương án để tạo và cập nhật nguyên tử các entity liên quan mà không cần ID do client tạo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
rails, ruby
Lĩnh vực
api, backend
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
20/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.