Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-5679

/ws/3 should consistently use "name" or "title", not both

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Normal Normal
    • ws/3
    • None
    • Web service
    • None

      https://musicbrainz.org/ws/2/artist/1283f619-2789-4892-af46-29a13e5cca5b?fmt=json uses "name" to refer to the artist name.
      https://musicbrainz.org/ws/2/release-group/0c00792f-1022-4a23-8eb6-d1d94ca7564c?fmt=json uses "title" to refer to the release group name.

      The website uses "name" for both (http://beta.musicbrainz.org/artist/1283f619-2789-4892-af46-29a13e5cca5b/edit and https://musicbrainz.org/release-group/0c00792f-1022-4a23-8eb6-d1d94ca7564c/edit ), as does the database (artist.name which links to artist_name, release_group.name which links to release_name).

      It would be nice if entities were consistent. I'm guessing we can't change the XML WS and I dunno about the JSON one, but either way, if we can't, it would be nice if we can make it consistent when we do /ws/3.

          [MBS-5679] /ws/3 should consistently use "name" or "title", not both

          I think 'name' is the correct way to refer to an artist, and 'title' for a releasegroup I don't see they should be the same they are attributes of very different entities.

          My dictionary says that a title is used for the distinguished name of something, while a name is just a way to identify something. So yes, there is a semantic difference, but it's splitting hairs so much I think we'd do a lot better if we just chose 'name' for consistency.

          Also if I look at the release entity on the website, listing releases the column is called 'name' [..] but editing a release the field is called 'title'

          Maybe, but http://musicbrainz.org/recording/c2bcea26-cda0-4240-92f0-0ee2ba6a86ee/edit uses 'name' while http://musicbrainz.org/ws/2/recording/c2bcea26-cda0-4240-92f0-0ee2ba6a86ee/edit uses 'title'. It's easy to find inconsistency without even looking very hard.

          Oliver Charles added a comment - I think 'name' is the correct way to refer to an artist, and 'title' for a releasegroup I don't see they should be the same they are attributes of very different entities. My dictionary says that a title is used for the distinguished name of something, while a name is just a way to identify something. So yes, there is a semantic difference, but it's splitting hairs so much I think we'd do a lot better if we just chose 'name' for consistency. Also if I look at the release entity on the website, listing releases the column is called 'name' [..] but editing a release the field is called 'title' Maybe, but http://musicbrainz.org/recording/c2bcea26-cda0-4240-92f0-0ee2ba6a86ee/edit uses 'name' while http://musicbrainz.org/ws/2/recording/c2bcea26-cda0-4240-92f0-0ee2ba6a86ee/edit uses 'title'. It's easy to find inconsistency without even looking very hard.

          Paul Taylor added a comment -

          I think 'name' is the correct way to refer to an artist, and 'title' for a releasegroup I don't see they should be the same they are attributes of very different entities. And how things are named in the database is irrelavent to how they should be displayed in the webservice or website. However I agree the website and webservice should be consistent to each other so I would change the edit releasegroup website field to 'title'.

          This has the added advantage that you can then fix this issue without chnaging the webservice.

          Also if I look at the release entity on the website, listing releases the column is called 'name'

          https://musicbrainz.org/search?query=fred&type=release&method=indexed

          but editing a release the field is called 'title'

          https://musicbrainz.org/release/776017c5-6853-40bf-927e-a0de80776c03/edit

          Paul Taylor added a comment - I think 'name' is the correct way to refer to an artist, and 'title' for a releasegroup I don't see they should be the same they are attributes of very different entities. And how things are named in the database is irrelavent to how they should be displayed in the webservice or website. However I agree the website and webservice should be consistent to each other so I would change the edit releasegroup website field to 'title'. This has the added advantage that you can then fix this issue without chnaging the webservice. Also if I look at the release entity on the website, listing releases the column is called 'name' https://musicbrainz.org/search?query=fred&type=release&method=indexed but editing a release the field is called 'title' https://musicbrainz.org/release/776017c5-6853-40bf-927e-a0de80776c03/edit

          This can't be changed for /ws/2 (neither format as they are meant to be equal), so I've moved it to be a /ws/3 improvement.

          Oliver Charles added a comment - This can't be changed for /ws/2 (neither format as they are meant to be equal), so I've moved it to be a /ws/3 improvement.

          Freso added a comment -

          I figure the JSON WS is still in "beta" (or similar), and we advertise it as not being stable, so I'd vote yes to breaking stuff like this if it makes it more consistent. But if not, yes, please have it fixed for ws/3.

          Freso added a comment - I figure the JSON WS is still in "beta" (or similar), and we advertise it as not being stable, so I'd vote yes to breaking stuff like this if it makes it more consistent. But if not, yes, please have it fixed for ws/3.

            Unassigned Unassigned
            nikki nikki
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:

                Version Package
                ws/3