Conversation
|
Preview of modified Markdown: no Markdown change to preview. |
mnocon
left a comment
There was a problem hiding this comment.
Thank you for preparing this! Looks good overall, just a couple of small suggestions
docs/api/rest_api/rest_api_reference/input/ibexa-segment-groups.raml
Outdated
Show resolved
Hide resolved
| type: SegmentGroupUpdateWrapper | ||
| example: !include examples/segment_groups/id/PATCH/SegmentGroupUpdate.json.example | ||
| responses: | ||
| 200: |
There was a problem hiding this comment.
If we want to be consistent, I imagine the endpoint returns 406 if we were trying to change the identifier to a one that already exists.
There was a problem hiding this comment.
Nope, in such case I am getting 500:
An exception occurred while executing 'UPDATE ibexa_segment_groups SET identifier= ?,name= ? WHEREid = ?' with params [\"Tojesttest7\", \"Modified Segment Group Name\", 6]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'Tojesttest7' for key 'ibexa_segment_groups.ibexa_segment_groups_identifier'"
There was a problem hiding this comment.
Ok, so let's not document this 😉
But it's probably a bug - ping @micszo @wiewiurdp
There was a problem hiding this comment.
@micszo @wiewiurdp The same happens for 'UPDATE ibexa_segments after changing identifier to an existing one. 500 is thrown with Integrity constraint violation: 1062 Duplicate entry 'modified_segment_identifier' for key 'ibexa_segments.ibexa_segments_identifier'
There was a problem hiding this comment.
Reported as https://issues.ibexa.co/browse/IBX-9634.
There was a problem hiding this comment.
Unfortunately the real issue is in Ibexa\Segmentation\Service\SegmentationService 😞
Describe new segment and segment group endpoints in REST API. Add missing responses.
Here's a link to the updated file: REST API Reference
Checklist