hoxworth/json-schema — Issue #22: Extending a schema doesn't allow overrides
Author: shadoi
Created: 2012-01-16 20:23:32+00:00
State: open

http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26 where it says "A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints."

Seems like it should allow me to extend a base schema and change the type of a property, for example:
--
{
"name":"Parent",
"properties":{
"id":{
"type":"string",
"required":true
}
}
}
--
{
"name":"Child",
"extends":"Base",
"properties":{
"id":{
"type":"integer"
}
}
}
--
If I attempt to validate a Child, it complains that the "id" property is not a string.