[MXS-1999] Invalid null relationship handling in REST API Created: 2018-08-06  Updated: 2018-08-07  Resolved: 2018-08-07

Status: Closed
Project: MariaDB MaxScale
Component/s: REST-API
Affects Version/s: 2.2.12
Fix Version/s: 2.2.14

Type: Bug Priority: Major
Reporter: markus makela Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None


 Description   

When the following request body is PATCH'ed to the REST API, the servers relationships will be removed.

{
    data: {
        relationships: {
            servers: null
        }
    }
}

The correct thing to do would be to send an error about a malformed request. This applies to all resource endpoints that have relationships.

Relationships are deleted by changing the data member of the relationship to null (see JSON API). This would be the correct JSON:

{
    data: {
        relationships: {
            servers: {
                data : null
            }
        }
    }
}


Generated at Thu Feb 08 04:10:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.