oferei / json-gate

A friendly, fast JSON schema validator
MIT License
100 stars 16 forks source link

Support extends #11

Open ghost opened 11 years ago

ghost commented 11 years ago

Hi, I think "extends" based inheritance is nit supported yet, right?! So that would be nice. Thanks

oferei commented 11 years ago

true. as I wrote in the doc, neither hyperlinking nor hyper schema is supported. I was wondering how many people would use it. can you tell me how you would use it?

ferson2020 commented 11 years ago

The "extends" field has nothing to do with hyper schemas or hyperlinking; it allows inheritance of schemas. The idea is you can have a base schema, and then extend that schema to create a new more complex schema on top of it.

See http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26 for more information.

I would personally find it useful to pass in a schema in a schema into the extends field instead of having to clone a schema and modify it every time I want to extend one.

the-t-in-rtf commented 10 years ago

I really liked the user friendly focus of the validation output, but lack of inheritance is a deal breaker for me.

oferei commented 10 years ago

good to know. I'll see if I can get to it.