UNPKG

@loopback/docs

Version:
36 lines (23 loc) 1.1 kB
--- lang: en title: 'API docs: openapi-v3.jsontoschemaobject' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar editurl: https://github.com/strongloop/loopback-next/tree/master/packages/openapi-v3 permalink: /doc/en/lb4/apidocs.openapi-v3.jsontoschemaobject.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/openapi-v3](./openapi-v3.md) &gt; [jsonToSchemaObject](./openapi-v3.jsontoschemaobject.md) ## jsonToSchemaObject() function Converts JSON Schemas into a SchemaObject <b>Signature:</b> ```typescript export declare function jsonToSchemaObject(json: JsonSchema, visited?: Map<JsonSchema, SchemaObject | SchemaRef>): SchemaObject | SchemaRef; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | json | <code>JsonSchema</code> | JSON Schema to convert from | | visited | <code>Map&lt;JsonSchema, SchemaObject &#124; SchemaRef&gt;</code> | A map to keep track of mapped json schemas to handle circular references | <b>Returns:</b> `SchemaObject | SchemaRef`