- Fix null-ref regression
- Added union type support at the root for non-arrays
- Fixed issue generating schema where the root type is an alias (union) of two or more types (
Combined
). - Check for property type references a specific enum value and treat these as constants (
foo: Foo.Bar
).
Example
enum Foo {
Bar = 'bar',
Fizz = 'fizz'
}
interface Type1 {
foo: Foo.Bar;
extra: string;
}
interface Type2 {
foo: Foo.Fizz;
extra2: string;
}
type Combined = Type1 | Type2;
const _ = jsonSchema<Combined>();