We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Property schema incorrectly referenced when there is a circular reference
Affected version: ts-json-schema-generator@1.3.0
Types
export type Foo = { id: number; bars: Array<Bar>; }; export type Broken = Pick<Foo, "id" | "bars">; export type Bar = { broken: Broken; };
Generated Schema
{ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "Bar": { "additionalProperties": false, "properties": { "broken": { "$ref": "#/definitions/Broken" } }, "required": [ "broken" ], "type": "object" }, "Broken": { "additionalProperties": false, "properties": { "bars": { "$ref": "#/definitions/Foo" }, "id": { "$ref": "#/definitions/Foo" } }, "required": [ "id", "bars" ], "type": "object" }, "Foo": { "additionalProperties": false, "properties": { "bars": { "items": { "$ref": "#/definitions/Bar" }, "type": "array" }, "id": { "type": "number" } }, "required": [ "id", "bars" ], "type": "object" } }
Properties id, bars on Broken type are incorrectly referenced to original type instead of fields on type Foo
id
bars
Broken
Foo
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Property schema incorrectly referenced when there is a circular reference
Affected version: ts-json-schema-generator@1.3.0
Types
Generated Schema
Properties
id
,bars
onBroken
type are incorrectly referenced to original type instead of fields on typeFoo
The text was updated successfully, but these errors were encountered: