YousefED / typescript-json-schema

Generate json-schema from your Typescript sources
BSD 3-Clause "New" or "Revised" License
3.17k stars 323 forks source link

Schema definition is empty on cli #524

Closed brandon-kyle-bailey closed 1 year ago

brandon-kyle-bailey commented 1 year ago

Trying to generate a json schema of the following interface:

./test.ts:

export interface Shape {
  /**
   * The size of the shape.
   *
   * @minimum 0
   * @TJS-type integer
   */
  size: number;
}

Using the following command:

yarn run typescript-json-schema ./test.ts '*'

Produces the output:

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {}
}

✨  Done in 0.29s.

Not really sure what im doing wrong here. Can someone point me in the right direction?