typescript-json-schema icon indicating copy to clipboard operation
typescript-json-schema copied to clipboard

Generate json-schema from your Typescript sources

Results 108 typescript-json-schema issues
Sort by recently updated
recently updated
newest added

Support `toJSON` method on objects is required for [accurate JS/TS to JSON translation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description). `toJSON` can define custom representation of any JS object wich may not match the object itself. If...

Hi, Here a small example : ``` interface Truc { name: string } interface Test { myKey: Record } ``` That gives : ``` { "type": "object", "properties": { "myKey":...

When an interface property is defined as `undefined`, the generated JSON schema produces `"type": "undefined"`, which is not a valid JSON schema type. Source: ```typescript interface Foo { bar: string;...

Using v0.53.1: ```typescript export interface Toggleable { enabled: boolean; } export type ScrewsUpSchemaConfig = Toggleable & {}; export type DoesNotGetEnabledPropConfig = Toggleable & { response: string; }; export interface Config...

Importing fails when `strictNullChecks === true` ![image](https://user-images.githubusercontent.com/5140822/170917367-90a6b7af-a977-462b-a5df-164757b6b02f.png) ![image](https://user-images.githubusercontent.com/5140822/170917393-016d1438-95f0-41b1-af9b-19be26aa9df6.png)

I have this code: ``` export interface AppHostManifest { /** * The ASAP Issuers. * * @uniqueItems true * @minItems 1 * @maxItems 50 * @items.type string * @items.minLength 2...

Given this test case: ```typescript interface TypeEqual { type: "=", value: string } interface TypeNotIn { type: "not in", value: string[] } type Types = TypeEqual | TypeNotIn; type WithMessage...

Hi, Here a simple example : ``` /** @pattern ^[0-9]+[smhdw]$ */ export type Duration = string interface Test { single: Duration multi: Duration[] } ``` When I convert to JSON...

Do you have [AJV if/then/else](https://ajv.js.org/keywords.html#ifthenelse) support? I didn't see it in the docs. That would be great for validating properties that have relationships.

``` /Users/thomas/Desktop/agnostic/node_modules/@types/mocha/index.d.ts (2514,13): Subsequent variable declarations must have the same type. Variable 'beforeEach' must be of type 'Lifecycle', but here has type 'HookFunction'. /Users/thomas/Desktop/agnostic/node_modules/@types/mocha/index.d.ts (2532,13): Subsequent variable declarations must have...