Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ObjectProp

An object property is a property that references some other object. This will validate the value it is connected with and render it down

Hierarchy

Indexable

[key: string]: any

An object property is a property that references some other object. This will validate the value it is connected with and render it down

Index

Constructors

constructor

  • new ObjectProp(node: any, name: string, symbols: any, parentObj: any): ObjectProp
  • Parameters

    • node: any

      The node being managed

    • name: string

      The name of the node

    • symbols: any

      The entire symbol tree

    • parentObj: any

      The immediate parent of this node

    Returns ObjectProp

Properties

Optional $ref

$ref: string | null

The generated jsons schema reference path

Optional class

class: __type | null

The properties (json schema props) for this class

classSourcePath

classSourcePath: string | null

The path to the the prooperty from the base property

Optional defaultValue

defaultValue: any

A default value for the property

Optional description

description: undefined | string

Detailed documentation

Optional empty

empty: any

Checks if given value is empty (=== '', === null, === undefined).

Optional equals

equals: any

Checks if value equals ("===") comparison

Optional isDefined

isDefined: any

Checks if value is defined (!== undefined, !== null). This is the only decorator that ignores skipMissingProperties option.

Optional isIn

isIn: any[]

Checks if value is in a array of allowed values.

Optional isNotIn

isNotIn: any[]

Checks if value is not in a array of disallowed values.

Optional isOptional

isOptional: undefined | false | true

Checks if given value is empty (=== null, === undefined) and if so, ignores all the validators on the property.

name

name: string

The name of the symbol

Optional notEmpty

notEmpty: any

Checks if given value is empty (=== '', === null, === undefined).

Optional notEquals

notEquals: any

Checks if value equals ("===") comparison.

Protected ownDecorator

ownDecorator: string = "IsString"

The prop instance's own type decorator

Protected parentObj

parentObj: any

The immediate parent of this node

reportedType

reportedType: string

The type that was defined in the json/yaml

Protected symbols

symbols: any

The entire symbol tree

Protected sys

sys: LoDashStatic = sys

A local for templates to access lodash

Optional title

title: undefined | string

Short documentation

typeName

typeName: string = ""

The name typescript expects for the type

Accessors

prop

  • get prop(): string

Methods

Protected decs

  • decs(): string[]

headers

  • headers(): string[]
  • Things like extra classes and enums that need to be at the top level of the module

    Returns string[]

imports

  • imports(): string[]
  • Things like extra classes and enums that need to be at the top level of the module

    Returns string[]

renderDeclarations

  • renderDeclarations(): string[]

renderProp

  • renderProp(): string

validationImports

  • validationImports(): string[]

Object literals

Protected defaultTemplateOptions

defaultTemplateOptions: object

The default options for the template render

compileDebug

compileDebug: boolean = false

debug

debug: boolean = false

rmWhitespace

rmWhitespace: boolean = false

escape

  • escape(s: any): any

propToTemplate

propToTemplate: object

The map from property to template decorators of the class validator class

empty

empty: string = "IsEmpty"

equals

equals: string = "Equals"

isDefined

isDefined: string = "IsDefined"

isIn

isIn: string = "IsIn"

isNotIn

isNotIn: string = "IsNotIn"

notEmpty

notEmpty: string = "NotEmpty"

notEquals

notEquals: string = "NotEquals"

Generated using TypeDoc