cybertk / csonschema

CSON Schema is a little language that compiles into JSON Schema
MIT License
8 stars 0 forks source link

Nested csonschema #8

Closed nemoeslovo closed 9 years ago

nemoeslovo commented 9 years ago

It would be cool if it is possible to create csonschema with dependency on another one. Example:

image.csonschema:
$defs:
    image:
        w: 'integer'
        h: 'integer'
        url: 'string'
small: 'image'
medium: 'image'
large: 'image'
user.csonschema:
$defs:
   imageModel:
      $include: 'image.csonschema'
   avatar: 'imageModel'
cybertk commented 9 years ago

Nested csonschema is supported now, but nested $def is not, see #3.

nemoeslovo commented 9 years ago

I saw that issue and thought a that it's not the same, because now I can distinguish .csonschema and just .schema. Anyway this issue could be closed now.