Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-1999

Invalid null relationship handling in REST API

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.2.12
    • 2.2.14
    • REST-API
    • 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
                  }
              }
          }
      }
      

      Attachments

        Activity

          People

            markus makela markus makela
            markus makela markus makela
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.