Open Georift opened 1 year ago
I just tried a simpler case just to check my assumptions, I found that if I do any kind of definition I run into this problem:
const anotherTest = {
$schema: "http://json-schema.org/draft-04/schema",
title: "Test Schema",
type: "object",
definitions: {
Larger: {
type: "string",
},
},
properties: {
testing: {
type: "boolean",
},
again: {
$ref: "#/definitions/Larger",
},
},
required: ["testing", "again"],
} as const;
type AnotherTest = FromSchema<typeof anotherTest>;
// => never
Interestingly if I drop "again"
from the required arguments I still see an error but TS kind of partially infers the type rather than just never
:
type AnotherTest = {
[x: string]: unknown;
again?: any;
testing: any;
}
Does this mean #96 actually means any reference is unsupported?
It's my first time using the library, so I might be mis-understanding #96, however I think I've found a schema which doesn't have a recursive ref loop. But I'm seeing an error:
Here is my example code,
.detail
references a definition, however it doesn't recurse forever, should this be expected to work?