ApiCoreFunctions
Function: toJsonSchema()
function toJsonSchema(schema): JsonSchema;Defined in: packages/core/src/schema/collection-def.ts:130
The JSON Schema to store for a definition's schema: plain JSON Schema as it is, or what a Standard JSON Schema validator (a Zod object, say) says it accepts. The result is checked like any other — a validator feature that has no stored equivalent, like a regex, is refused with the reason.
Parameters
| Parameter | Type |
|---|---|
schema | | JsonSchema | StandardJSONSchemaV1<unknown, unknown> |