Skip to content

An invalid reference should be reported on the $ref property #172

Open
@octavianN

Description

@octavianN

When a JSON Schema has an invalid reference the error is reported on the "definisions" property.
For example if I load the following JSON Schema I get the error: #/definitions: key [Rectangle123] not found

I think that the error should be reported on the "$ref" property. The reference does not respect the definition.

{
	"type" : "object",
	"properties" : {
		"rectangle" : {"$ref" : "#/definitions/Rectangle123" }
	},
	"definitions" : {
		"size" : {
			"type" : "number",
			"minimum" : 0
		},
		"Rectangle" : {
			"type" : "object",
			"properties" : {
				"a" : {"$ref" : "#/definitions/size123"},
				"b" : {"$ref" : "#/definitions/size123"}
			}
		}
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions