-
If I do something similar to this https://www.django-rest-framework.org/api-guide/serializers/#writable-nested-representations, using the following Serializer:
It expects my data to be structured like this:
instead of like this:
could someone explain how to make a writable nested relationship with valid JSON:API schema? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Take a look at the json:api specs. Both examples are not json:api specific. Nested creation is not a well supported thing in json:api. Only creating single resources is covered by the specs. Maybe atomic operations would be help you to create resources in a single transaction. But this extension is not implemented in this package. |
Beta Was this translation helpful? Give feedback.
Take a look at the json:api specs. Both examples are not json:api specific.
Nested creation is not a well supported thing in json:api. Only creating single resources is covered by the specs.
Maybe atomic operations would be help you to create resources in a single transaction. But this extension is not implemented in this package.