ostrowr / ts-json-validator

Let JSON play nicely with Typescript
MIT License
342 stars 7 forks source link

Improve compat with v7 #6

Closed ostrowr closed 5 years ago

ostrowr commented 5 years ago

Totally rewrite so all possible schemas can be generated from a single call

createSchema()

This is better because it allows arbitrary combinations of keywords that previously weren't possible.

For example, we can now specify a type along with an allOf and an anyOf, all at the same time, and get the final type constrained to the intersection of the constraints all of those fields impose.