Page Contents
Home > @loopback/openapi-v3 > jsonToSchemaObject
jsonToSchemaObject() function
Converts JSON Schemas into a SchemaObject
Signature:
export declare function jsonToSchemaObject(json: JsonSchema, visited?: Map<JsonSchema, SchemaObject | SchemaRef>): SchemaObject | SchemaRef;
Parameters
Parameter | Type | Description |
---|---|---|
json | JsonSchema | JSON Schema to convert from |
visited | Map<JsonSchema, SchemaObject | SchemaRef> | (Optional) A map to keep track of mapped json schemas to handle circular references |
Returns:
SchemaObject | SchemaRef