You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have temporarily disabled the PATCH method on the new Workflow API.
A PATCH request should submit a partial update to a workflow. Where PUT requires the whole workflow to be uploaded, PATCH can accept a diff on a single node (or the structure itself)
There are two ways we might implement a PATCH handler:
Accept a partial workflow. Presumably we must accept an object with at least a a jobs, triggers or edges array, containing an id for the thing to be updated. Eg, { jobs: [{ id: "abc", name: "CHANGED NAME" }] }.
Accept a JSON patch. This is what the Workflow Diagram uses right now and presumably when we migrate the diagram to use the workflow API, we'll want to support updates via JSON path. Saying that, I don't actually know if it's technically needed because every item has an explicit id, so we don't need complex json paths or anything to partial updates - so maybe we'd prefer to re-write the workflow differ instead.
Proposed Solution
JSON Patch actually has it's own mime type - I think its application/json-patch+json.
So if we decide to keep both formats, the patch handler can simply add support for both, based on the content type of the request
The text was updated successfully, but these errors were encountered:
We have temporarily disabled the PATCH method on the new Workflow API.
A PATCH request should submit a partial update to a workflow. Where PUT requires the whole workflow to be uploaded, PATCH can accept a diff on a single node (or the structure itself)
There are two ways we might implement a PATCH handler:
Accept a partial workflow. Presumably we must accept an object with at least a a
jobs
,triggers
oredges
array, containing an id for the thing to be updated. Eg,{ jobs: [{ id: "abc", name: "CHANGED NAME" }] }
.Accept a JSON patch. This is what the Workflow Diagram uses right now and presumably when we migrate the diagram to use the workflow API, we'll want to support updates via JSON path. Saying that, I don't actually know if it's technically needed because every item has an explicit id, so we don't need complex json paths or anything to partial updates - so maybe we'd prefer to re-write the workflow differ instead.
Proposed Solution
JSON Patch actually has it's own mime type - I think its
application/json-patch+json
.So if we decide to keep both formats, the patch handler can simply add support for both, based on the content type of the request
The text was updated successfully, but these errors were encountered: