Opened 11 years ago

Last modified 5 years ago

#13162 new defect

JSON extended schema problem

Reported by: Douglas Hays Owned by: Kris Zyp
Priority: high Milestone: 1.15
Component: Dojox Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:


From Iain Duncan
To recreate run the following JavaScript?:

	var data = {
		"name" : "a string",
		"another": "someString"
	var schema = {
		"type": "object",
		"properties": {
			"name": {"type": "string"}
		"extends": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"another": {"type": "string"}
	schema = dojox.json.ref.resolveJson(schema);
	var result = dojox.json.schema.validate(data, schema);

You will then get the error message:

"The property name is not defined in the schema and the schema does not allow additional properties"

This is because the extended schema does not allow additional properties. When extending it instead of inheriting all of the properties the validate validates each schema separately rather than as one combined schema.

This issue was discussed on the JSON Schema group here:!topic/json-schema/J1zfffdURIs

Change History (2)

comment:1 Changed 6 years ago by dylan

Milestone: tbd1.12

Consider for 1.12.

comment:2 Changed 5 years ago by dylan

Milestone: 1.131.15

Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.

Note: See TracTickets for help on using tickets.