Replies: 2 comments 4 replies
-
I did not notice before that there is a recommendation from JSON:API spec on async calls... Great!
class OgcServiceCreateSerializer:
class Meta:
resource_name = 'TaskResult'
|
Beta Was this translation helpful? Give feedback.
4 replies
-
Additionally as a workaround what you could do is set |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Recommendations from the JSON:API specs
JSON:API defines the following to handle async processing for long running tasks:
My implementation to handle long running create endpoint
To follow that recommendation from the json:api specs if implemented it as following:
Long running create endpoint
Create serializer with different field set
TaskResult serializer
Response
The create enpoint is creating the celery job fine and response with the content like bellow:
Response Body
Response headers
Quesion
As you can see in the response body, the type differs to the resource type of the used serializer. How can dynamically set the type to the correct
"type": "TaskResult"
?How can i add
url
field to provide resource urls as meta information on theTaskResultSerializer
without naming all fields explicit?Beta Was this translation helpful? Give feedback.
All reactions