buggood first issuehelp wanted
Repository metrics
- Stars
- (3,302 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
a.json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"oneOf": [
{ "$ref": "b.json" }
]
}
b.json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"oneOf": [
{ "type": "string" },
{
"type": "array",
"items": { "$ref": "#" }
}
]
}
Then
json2ts a.json
results in
[
RangeError: Maximum call stack size exceeded
at memoized (/opt/homebrew/lib/node_modules/json-schema-to-typescript/node_modules/lodash/lodash.js:10612:30)
at /opt/homebrew/lib/node_modules/json-schema-to-typescript/dist/src/generator.js:247:66
at Array.map (<anonymous>)
at generateSetOperation (/opt/homebrew/lib/node_modules/json-schema-to-typescript/dist/src/generator.js:247:32)
at generateRawType (/opt/homebrew/lib/node_modules/json-schema-to-typescript/dist/src/generator.js:236:20)
at generateTypeUnmemoized (/opt/homebrew/lib/node_modules/json-schema-to-typescript/dist/src/generator.js:128:18)
at memoized (/opt/homebrew/lib/node_modules/json-schema-to-typescript/node_modules/lodash/lodash.js:10620:27)
at /opt/homebrew/lib/node_modules/json-schema-to-typescript/dist/src/generator.js:145:55
at generateRawType (/opt/homebrew/lib/node_modules/json-schema-to-typescript/dist/src/generator.js:147:15)
at generateTypeUnmemoized (/opt/homebrew/lib/node_modules/json-schema-to-typescript/dist/src/generator.js:128:18)
]