PassFort / json-schema-to-flow-type

69 stars 17 forks source link

JSON Schema "inheritance" #22

Open wmonk opened 6 years ago

wmonk commented 6 years ago

JSON Schema provides functionality to mimic composition and inheritance - read here & here.

Currently we have relatively simplistic support for this by merging the properties values when the object has both properties and either oneOf or allOf.

I want to create this issue to track implementations of the various method described in the link above. I implemented a handling a part of this in #14, but I don't think this provides the exact semantics, as it uses an intersection type, but I think it should be using object type spread.

Things we need to test: