plone.restapi
plone.restapi copied to clipboard
`@rules` endpoint response is not consistent with other endpoints
The @rules GET endpoint response is not formatted in a consistent way with other endpoints:
- It's missing an
@id - The actual data is nested under
content-ruleswhich is redundant with the name of the endpoint.
HTTP/1.1 200 OK
Content-Type: application/json
{
"content-rules": {
"acquired_rules": [],
"assignable_rules": [],
"assigned_rules": [
{
"bubbles": true,
"description": "First rule added in the testing setup",
"enabled": true,
"global_enabled": true,
"id": "rule-1",
"title": "First test rule",
"trigger": "Comment added",
"url": "http://localhost:55001/plone/++rule++rule-1/@@manage-elements"
},
{
"bubbles": true,
"description": "Second rule added in the testing setup",
"enabled": true,
"global_enabled": true,
"id": "rule-2",
"title": "Second test rule",
"trigger": "Comment added",
"url": "http://localhost:55001/plone/++rule++rule-2/@@manage-elements"
}
]
}
}
However, fixing it now would be a breaking change.
Hello.. Can i be assigned to this issue if no one's working on it yet?
@irtisamsajin no. Please read and follow First-time contributors, especially Things not to do, Contributing to Plone, and Contribute to plone.restapi.
I am working on this issue