# PropertyMetadata Class

Module
import { PropertyMetadata } from "@tsed/common"
Source/packages/common/src/jsonschema/class/PropertyMetadata.ts

# Overview

class PropertyMetadata extends Storable implements IPropertyOptions {
    allowedRequiredValues: any[];
    ignoreProperty: boolean;
    onSerialize: Function;
    onDeserialize: Function;
    constructor(target: any, propertyKey: any);
    get type(): Type<any>;
    set type(value: Type<any>);
    get schema(): JsonSchema;
    get required(): boolean;
    set required(value: boolean);
}

# Members

allowedRequiredValues: any[]

Allowed value when the entity is required.


ignoreProperty: boolean

onSerialize: Function

onDeserialize: Function

get type(): Type<any>

set type(value: Type<any>)

get schema(): JsonSchema

get required(): boolean

Return the required state.


set required(value: boolean)

Change the state of the required data.