You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Late binding works for all references, except for the one case where a reference is within an "extends". This is a known bug and is due to how "extends" is implemented.
Maybe I am doing something wrong but does JSV support late binding?
schemas.createSchema( { 'id' : 'test', properties : { 'propa' : { 'type' : 'string', 'required' : true } } });
schemas.createSchema( { 'id' : 'test2', properties : { 'propb' : { 'type' : 'string', 'required' : true } }, 'extends' : { '$ref' : 'test' } });
console.log(schemas.validate({ }, { '$ref' : 'test2' }).errors);
This works fine and returns errors for both prop a and prop b.
schemas.createSchema( { 'id' : 'test2', properties : { 'propb' : { 'type' : 'string', 'required' : true } }, 'extends' : { '$ref' : 'test' } });
schemas.createSchema( { 'id' : 'test', properties : { 'propa' : { 'type' : 'string', 'required' : true } } });
console.log(schemas.validate({ }, { '$ref' : 'test2' }).errors);
this only validates propA
The text was updated successfully, but these errors were encountered: