spotify / web-api

This issue tracker is no longer used. Join us in the Spotify for Developers forum for support with the Spotify Web API ➡️ https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer
983 stars 79 forks source link

Invalid json schema files according to draft-03 spec #383

Open ondrejbouda opened 7 years ago

ondrejbouda commented 7 years ago

Issue found on December 22th 2016.

Endpoint(s):

Scope(s):

Steps to reproduce:

Validate the album.json schema

Expected behaviour:

Schema should be valid

Actual behaviour:

I am having issues with parsing the json schema files. According to http://jsonschemalint.com/ the artist.json schema from api specification is not valid for draft-03 spec version. This is (among others) because of field /properties/artists: Instance is not a required type "object". There are other invalid fields also, eg. /properties/external_ids/properties/. Why is this? Why is there a json array syntax used? This is the property in question:

"artists": [
      {
        "type": "array",
        "description": "The artists of the album. Each artist object includes a link in href to more detailed information about the artist.",
        "items": { "$ref": "artist" }
      }
    ],

Also see difference between external_urls property in album.json schema and artist.json schema:

album.json

"external_urls": {
      "type": "object",
      "description": "Known external URLs for this album.",
      "properties": {
        "": [{
          "type": "string",
          "description": "The type of the URL, for example: 'spotify' - The Spotify URL for the object."
        }]
      }
    },

artist.json

"external_urls": {
      "type": "object",
      "description": "Known external URLs for this artist.",
      "": [{
        "type": "string"
      }]
    },
thelinmichael commented 7 years ago

Thanks for the report @ondrejbouda!