Are you an LLM? You can read better optimized documentation at /documentation/api/core/functions/toJsonSchema.md for this page in Markdown format
ws-asyncapi API / core / toJsonSchema
Function: toJsonSchema()
toJsonSchema(
schema,io?,target?):object
Defined in: .api-entries/core/index.d.ts:209
Produce a JSON Schema for the AsyncAPI contract / CLI codegen. Resolution ladder:
- StandardJSONSchemaV1 — native
~standard.jsonSchema[io]()(Zod ≥4.2, ArkType ≥2.1.28). - Registered vendor converter — for validators that validate but emit JSON Schema elsewhere (e.g. Valibot via
@valibot/to-json-schema); see registerJsonSchemaConverter. {}— runtime validation still works; the generated type isunknown.
Parameters
schema
io?
target?
Returns
object