Skip to content

Commit caeea3f

Browse files
committed
Removed createJsonSchema from valibot adapter.
1 parent 2750ec9 commit caeea3f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/lib/adapters/valibot.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {
22
createAdapter,
3-
createJsonSchema,
43
type ValidationAdapter,
54
type AdapterOptions,
65
type Infer,
@@ -66,11 +65,8 @@ function _valibot<T extends SupportedSchemas>(
6665
return createAdapter({
6766
superFormValidationLibrary: 'valibot',
6867
validate: async (data) => validate(schema, data, options?.config),
69-
jsonSchema: createJsonSchema(
70-
options,
71-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
72-
() => valibotToJSONSchema({ schema: schema as any, ...options })
73-
),
68+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
69+
jsonSchema: options?.jsonSchema ?? valibotToJSONSchema({ schema: schema as any, ...options }),
7470
defaults: 'defaults' in options ? options.defaults : undefined
7571
});
7672
}

0 commit comments

Comments
 (0)