Uploaded image for project: 'MusicBrainz Search Server'
  1. MusicBrainz Search Server
  2. SEARCH-332

target element for relationships included in /ws/2/url endpoint is improperly structured to match lookup

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2014-05-14
    • Component/s: None
    • Labels:
      None

      Description

      On http://search.musicbrainz.org/ws/2/url/?query=url:%22http://www.samihyde.com/%22 that was linked in IRC, we have:

      <target id="52b3cad0-9622-4b39-ab22-9a0d44c7b86f"/>

      The target@id attribute was only added to deal with relationships to URLs (which, as we don't have any URL-URL relationships doesn't apply to this endpoint), where for historical reasons (i.e.: I don't really know why, since the decision predates my involvement, but we can't break compatibility without a very good reason) the target pointed to the url (i.e. <target>http://www.samihyde.com</target> as you can see on http://musicbrainz.org/ws/2/artist/52b3cad0-9622-4b39-ab22-9a0d44c7b86f?inc=url-rels ). To include the URL MBID, therefore, the @id attribute was added so that the final result – for URL relationships, and only them – is <target id="044dc214-8bee-435a-88d3-a125df5918d6">http://www.samihyde.com/</target>

      To be compatible with lookups, /ws/2/url search should be returning:

      <target>52b3cad0-9622-4b39-ab22-9a0d44c7b86f</target>

      If you'd prefer to have <target id="52b3...">52b3...</target> that would also be fine, though I imagine you can see that this would look a bit silly.

        Attachments

          Activity

            People

            • Assignee:
              ijabz Paul Taylor
              Reporter:
              ianmcorvidae Ian McEwen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                2014-05-14