MCPcopy
hub / github.com/Effect-TS/effect / getAjvValidate

Function getAjvValidate

packages/effect/test/Schema/JSONSchema.test.ts:17–19  ·  view source on GitHub ↗
(jsonSchema: Root)

Source from the content-addressed store, hash-verified

15}
16
17const getAjvValidate = (jsonSchema: Root): Ajv.ValidateFunction =>
18 // new instance of Ajv is created for each schema to avoid error: "schema with key or id "/schemas/any" already exists"
19 new Ajv.default(ajvOptions).compile(jsonSchema)
20
21const expectProperty = <A, I>(
22 schema: Schema.Schema<A, I>,

Callers 2

expectPropertyFunction · 0.70
JSONSchema.test.tsFile · 0.70

Calls 1

compileMethod · 0.45

Tested by

no test coverage detected