Workflow API: support JsonPatch
Nobody has claimed this yet.
- Dominant language
- Elixir
- Stars
- 296
- Forks
- 86
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 50
Description
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,triggersoredgesarray, 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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Workflow API's PATCH handler and reviewing how the Workflow Diagram currently submits JSON Patch updates. Resolve whether to support partial workflow objects, JSON Patch with application/json-patch+json, or both; done means PATCH can apply the agreed update format to a workflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100