ts-json-schema-generator
ts-json-schema-generator copied to clipboard
Generate JSON schema from your Typescript sources
TypeScript 3.8 includes a new feature which helps guarantee that type erasure is occurring, called [Type-Only Imports and Exports](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#-type-only-imports-and-export). This would be a valid file with TypeScript 3.8: ```ts interface...
See https://github.com/vega/vega-lite/issues/5603 Do we really need these complicated names? We need to have unique names for these intermediate aliases but we may be able to come up with a simpler...
``` export type T = Required; ``` Actual: ``` { "$ref": "#/definitions/T", "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "T": { "additionalProperties": false, "properties": { "a": { "type": "string" } }, "type": "object"...
I maybe misunderstanding `@asType`, but I'm trying to change the outputed type of a complex object to just be object in the schema and can't get it. ``` IMyInterface {...
`default` is a property in JSON schema. We should have a standard way to support it.
``` export interface Parent { a: A; } export type A = RealA; export type RealA = { realA: string }; ``` ``` ./node_modules/.bin/ts-json-schema-generator \ --path 'test.ts' \ --type 'Parent'...
This is a discussion. Please add your comments below. I keep running into a wall when trying to use JSON schema with intersection types. I’d like to use `anyOf` but...
Is there a possibility to generate schemas without using the .ts source files and the tsconfig json? This could be useful for the case when schema generation is required at...
This mirrors https://github.com/vega/ts-json-schema-generator/pull/746 in that it also adds support for computed types, however in this case it adds support for typescript types defined with the `Type` keyword vs `Interface`. Before...
This is a follow-on to #1417. The only change is to export the newly introduced types so that it's easier to extend and use `HiddenType` and `HiddenTypeFormatter`