Skip to content

Commit aadc04d

Browse files
authored
CEX-724 Add hypermedia links to workflow task definitions and routes (#1115)
* Add hypermedia links to workflow task definitions and routes - Introduced `_links` property in `workflow_task.yaml` to provide hypermedia links related to workflow tasks, including `self` and `edit` links. - Updated `workflows_tasks.yaml` to include `_links` for individual tasks in the response, ensuring clients can easily navigate to the task resource and its edit page. * fix(workflows): update edit link for workflow tasks to public URL * update swager json --------- Co-authored-by: Paul Chasle <[email protected]>
1 parent be7cf2e commit aadc04d

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

content/swagger/akeneo-web-api.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

content/swagger/resources/workflows/definitions/workflow_task.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,26 @@ properties:
6767
{"locale": "en_US", "scope": null},
6868
{"locale": "fr_FR", "scope": null}
6969
]
70+
_links:
71+
type: object
72+
description: Hypermedia links related to the workflow task
73+
properties:
74+
self:
75+
type: object
76+
properties:
77+
href:
78+
type: string
79+
format: uri
80+
description: URI of this resource
81+
edit:
82+
type: object
83+
properties:
84+
href:
85+
type: string
86+
format: uri
87+
description: The URL to access the task in Akeneo
88+
example:
89+
self:
90+
href: "https://demo.akeneo.com/api/rest/v1/workflows/tasks/8f6c2d18-fbd4-4f7e-81df-cb3dc368fe07"
91+
edit:
92+
href: "https://demo.akeneo.com/public/workflows/tasks/8f6c2d18-fbd4-4f7e-81df-cb3dc368fe07/edit"

content/swagger/resources/workflows/routes/workflows_tasks.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ get:
5353
{"locale": "en_US", "scope": "ecommerce"},
5454
{"locale": "fr_FR", "scope": "ecommerce"}
5555
]
56+
_links:
57+
self:
58+
href: "https://demo.akeneo.com/api/rest/v1/workflows/tasks/8f6c2d18-fbd4-4f7e-81df-cb3dc368fe07"
59+
edit:
60+
href: "https://demo.akeneo.com/public/workflows/tasks/8f6c2d18-fbd4-4f7e-81df-cb3dc368fe07/edit"
5661
- uuid: "782dd26a-b58d-40d3-a8e2-c41bb342f20f"
5762
status: "in_progress"
5863
created_at: "2024-02-22T17:31:00Z"
@@ -67,6 +72,11 @@ get:
6772
{"locale": "en_US", "scope": null},
6873
{"locale": "fr_FR", "scope": null}
6974
]
75+
_links:
76+
self:
77+
href: "https://demo.akeneo.com/api/rest/v1/workflows/tasks/782dd26a-b58d-40d3-a8e2-c41bb342f20f"
78+
edit:
79+
href: "https://demo.akeneo.com/public/workflows/tasks/782dd26a-b58d-40d3-a8e2-c41bb342f20f/edit"
7080
400:
7181
$ref: "#/responses/400Error"
7282
401:

0 commit comments

Comments
 (0)