kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
pull/700/head
rodzic
a718bf09cc
commit
b2110896d1
Plik diff jest za duży
Load Diff
|
@ -123,11 +123,9 @@ function createParserOverride({
|
||||||
const jsonSchemaToZodParserOverride: ParserOverride = (schema, _refs) => {
|
const jsonSchemaToZodParserOverride: ParserOverride = (schema, _refs) => {
|
||||||
if ('$ref' in schema) {
|
if ('$ref' in schema) {
|
||||||
const ref = schema.$ref as string
|
const ref = schema.$ref as string
|
||||||
if (!ref) return
|
assert(ref, `Invalid schema: $ref not found for ${schema.$ref}`)
|
||||||
|
|
||||||
const name = getComponentDisplayName(ref)
|
const name = getComponentDisplayName(ref)
|
||||||
if (!name) return
|
|
||||||
|
|
||||||
if (type === name) {
|
if (type === name) {
|
||||||
// TODO: Support recursive types.
|
// TODO: Support recursive types.
|
||||||
return `\n// TODO: Support recursive types for \`${name}Schema\`.\nz.any()`
|
return `\n// TODO: Support recursive types for \`${name}Schema\`.\nz.any()`
|
||||||
|
|
Ładowanie…
Reference in New Issue