grantila / suretype

Typesafe JSON (Schema) validator
502 stars 9 forks source link

Implement a way to use Ref feature #25

Closed carlo23666 closed 2 years ago

carlo23666 commented 2 years ago

Hi! im using suretype to validate some data that im storing with a kinda complex structure, anyway, i wanted to split this schema so its DRY and easier to manage, i found Ajv had a Ref feature so you can Reference another schema or schema prop from another file, even if its external, i wonder if you could implemment such a feature or if its already implemented reference me the file so i can try to use it myself, greetings :)

Edit: i found the only way to reference an schema is by using it inside a constant