---
lang: en
title: 'API docs: repository-json-schema'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.repository-json-schema.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository-json-schema](./repository-json-schema.md)

## repository-json-schema package

[@loopback/repository-json-schema](https://github.com/strongloop/loopback-next/tree/master/packages/repository-json-schema)

## Enumerations

|  Enumeration | Description |
|  --- | --- |
|  [MODEL\_TYPE\_KEYS](./repository-json-schema.model_type_keys.md) | TODO(semver-major) remove these constants in the next major version |

## Functions

|  Function | Description |
|  --- | --- |
|  [getFieldsJsonSchemaFor(modelCtor)](./repository-json-schema.getfieldsjsonschemafor.md) | Build a JSON schema describing the format of the "fields" object used to include or exclude properties of model instances. |
|  [getFilterJsonSchemaFor(modelCtor)](./repository-json-schema.getfilterjsonschemafor.md) | Build a JSON schema describing the format of the "filter" object used to query model instances.<!-- -->Note we don't take the model properties into account yet and return a generic json schema allowing any "where" condition. |
|  [getJsonSchema(ctor, options)](./repository-json-schema.getjsonschema.md) | Gets the JSON Schema of a TypeScript model/class by seeing if one exists in a cache. If not, one is generated and then cached. |
|  [getJsonSchemaRef(modelCtor, options)](./repository-json-schema.getjsonschemaref.md) | Describe the provided Model as a reference to a definition shared by multiple endpoints. The definition is included in the returned schema. |
|  [getNavigationalPropertyForRelation(relMeta, targetRef)](./repository-json-schema.getnavigationalpropertyforrelation.md) | Checks and return navigational property definition for the relation |
|  [getWhereJsonSchemaFor(modelCtor)](./repository-json-schema.getwherejsonschemafor.md) | Build a JSON schema describing the format of the "where" object used to filter model instances to query, update or delete.<!-- -->Note we don't take the model properties into account yet and return a generic json schema allowing any "where" condition. |
|  [isArrayType(type)](./repository-json-schema.isarraytype.md) | Determines whether a given string or constructor is array type or not |
|  [metaToJsonProperty(meta)](./repository-json-schema.metatojsonproperty.md) | Converts property metadata into a JSON property definition |
|  [modelToJsonSchema(ctor, jsonSchemaOptions)](./repository-json-schema.modeltojsonschema.md) | Converts a TypeScript class into a JSON Schema using TypeScript's reflection API |
|  [stringTypeToWrapper(type)](./repository-json-schema.stringtypetowrapper.md) | Gets the wrapper function of primitives string, number, and boolean |

## Interfaces

|  Interface | Description |
|  --- | --- |
|  [JsonSchemaOptions](./repository-json-schema.jsonschemaoptions.md) |  |

## Variables

|  Variable | Description |
|  --- | --- |
|  [JSON\_SCHEMA\_KEY](./repository-json-schema.json_schema_key.md) | Metadata key used to set or retrieve repository JSON Schema |


