### Interface: JsonSchemaOptions

Properties

Name | Type | Default Value | Flags | Description
--- | --- | --- | --- | ---
visited | `undefined | anonymous` |  | exported optional |

### Function: getJsonSchema

#### getJsonSchema(ctor: Function, options: JsonSchemaOptions) : JSONSchema

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.

Parameters

Name | Type | Default Value | Flags | Description
--- | --- | --- | --- | ---
ctor | `Function` |  |  | Contructor of class to get JSON Schema from
options | `JsonSchemaOptions` |  | optional |

### Function: getJsonSchemaRef

#### getJsonSchemaRef(modelCtor: Function, options: JsonSchemaOptions) : JSONSchema

Describe the provided Model as a reference to a definition shared by multiple endpoints. The definition is included in the returned schema.

Parameters

Name | Type | Default Value | Flags | Description
--- | --- | --- | --- | ---
modelCtor | `Function` |  |  | The model constructor (e.g. `Product`)
options | `JsonSchemaOptions` |  | optional | Additional options

### Function: isArrayType

#### isArrayType(type: string | Function) : boolean

Determines whether a given string or constructor is array type or not

Parameters

Name | Type | Default Value | Flags | Description
--- | --- | --- | --- | ---
type | `string | Function` |  |  | Type as string or wrapper

### Function: metaToJsonProperty

#### metaToJsonProperty(meta: PropertyDefinition) : JSONSchema

Converts property metadata into a JSON property definition

Parameters

Name | Type | Default Value | Flags | Description
--- | --- | --- | --- | ---
meta | `PropertyDefinition` |  |  |

### Function: modelToJsonSchema

#### modelToJsonSchema(ctor: Function, jsonSchemaOptions: JsonSchemaOptions) : JSONSchema

Converts a TypeScript class into a JSON Schema using TypeScript's reflection API

Parameters

Name | Type | Default Value | Flags | Description
--- | --- | --- | --- | ---
ctor | `Function` |  |  | Constructor of class to convert from
jsonSchemaOptions | `JsonSchemaOptions` | {} |  |

### Function: stringTypeToWrapper

#### stringTypeToWrapper(type: string | Function) : Function

Gets the wrapper function of primitives string, number, and boolean

Parameters

Name | Type | Default Value | Flags | Description
--- | --- | --- | --- | ---
type | `string | Function` |  |  | Name of type