-
Notifications
You must be signed in to change notification settings - Fork 82
IBX-9452: Describe segment and segment group REST endpoints #2624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Preview of modified Markdown: no Markdown change to preview. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, in such case I am getting 500:
An exception occurred while executing 'UPDATE ibexa_segment_groups SET
identifier= ?,
name= ? WHERE
id = ?' 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so let's not document this 😉
But it's probably a bug - ping @micszo @wiewiurdp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will check and report.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reported as https://issues.ibexa.co/browse/IBX-9634.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately the real issue is in Ibexa\Segmentation\Service\SegmentationService
😞
docs/api/rest_api/rest_api_reference/input/ibexa-segment-groups.raml
Outdated
Show resolved
Hide resolved
docs/api/rest_api/rest_api_reference/input/ibexa-segment-groups.raml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
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