json-schema icon indicating copy to clipboard operation
json-schema copied to clipboard

How can I get errors for all instanceLocation?

Open sukeshpabolu opened this issue 10 months ago • 2 comments

Let's consider the following schema

{
    "$id": "https://example.com/user-data",
    "$schema": "http://json-schema.org/draft-07/schema",
    "type": "object",
    "properties": {
      "name": { "type": "string", "default": "Unknown" },
      "email": { 
		"type": "string", 
		"format": "email",
	},
      "tags": {
        	"type": "array",
       		"minItems": 3,
        	"items": { "type": "string", "minLength": 2 }
      },
      "score": { "type": "integer", "minimum": 0 },
      "date": { "type": "integer", "format": "unix-time" },
			"nospace": {
				"pattern": "^\\S*$",
				"type": "string"
			},
			"extra": {
				"anyOf": [
				{
					"type": "string"
				},
				{
					"type": "null"
				}
			]
		}
    },
    "required": ["name", "email", "tags", "score", "extra"],
  }

I am getting errors only for tags property for the following json

{
    "name": "Unknown",
    "email": "",
    "tags": [],
    "score": -50,
    "extra": 123
  }

sukeshpabolu avatar Apr 23 '24 08:04 sukeshpabolu