Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 597 Bytes

CHANGELOG.md

File metadata and controls

30 lines (23 loc) · 597 Bytes

0.2.0 (2021-11-29)

  • Fix null-ref regression
  • Added union type support at the root for non-arrays

0.1.1 (2021-11-29)

  • 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>();