Methods
ValidateParam
- ValidateParam(property, rawValue, name?, fieldErrors, isBodyParam, parent?): any
Returns any
Private
combineProperties
Private
getAllCombinations
- getAllCombinations<T>(arrays): T[][]
Returns T[][]
Private
getExcessPropertiesFor
- getExcessPropertiesFor(modelDefinition, properties): string[]
Returns string[]
hasCorrectJsType
- hasCorrectJsType(value, type, isBodyParam): boolean
Parameters
- value: any
- type: "string" | "number" | "boolean" | "object"
- isBodyParam: boolean
Returns boolean
Private
selfIntersectionCombinations
validateArray
- validateArray(name, value, fieldErrors, isBodyParam, schema?, validators?, parent?): undefined | any[]
Returns undefined | any[]
validateBool
- validateBool(name, value, fieldErrors, isBodyParam, validators?, parent?): any
Returns any
validateBuffer
- validateBuffer(_name, value): Buffer
Parameters
- _name: string
- value: string
Returns Buffer
validateDate
- validateDate(name, value, fieldErrors, isBodyParam, validators?, parent?): undefined | Date
Returns undefined | Date
validateDateTime
- validateDateTime(name, value, fieldErrors, isBodyParam, validators?, parent?): undefined | Date
Returns undefined | Date
validateEnum
- validateEnum(name, value, fieldErrors, members?, parent?): unknown
Parameters
- name: string
- value: unknown
- fieldErrors: FieldErrors
Optional
members: (null | string | number | boolean)[]- parent: string = ''
Returns unknown
validateFloat
- validateFloat(name, value, fieldErrors, isBodyParam, validators?, parent?): undefined | number
Returns undefined | number
validateInt
- validateInt(name, value, fieldErrors, isBodyParam, validators?, parent?): undefined | number
Returns undefined | number
validateIntersection
- validateIntersection(name, value, fieldErrors, isBodyParam, subSchemas, parent?): any
Returns any
validateModel
- validateModel(input): any
Parameters
- input: {
fieldErrors: FieldErrors;
isBodyParam: boolean;
modelDefinition: TsoaRoute.ModelSchema;
name: string;
parent?: string;
value: any;
}isBodyParam: boolean
name: string
Optional
parent?: string
value: any
Returns any
validateNestedObjectLiteral
- validateNestedObjectLiteral(name, value, fieldErrors, isBodyParam, nestedProperties, additionalProperties, parent): any
Returns any
validateString
- validateString(name, value, fieldErrors, validators?, parent?): undefined | string
Returns undefined | string
validateUndefined
- validateUndefined(name, value, fieldErrors, parent?): undefined
Parameters
- name: string
- value: any
- fieldErrors: FieldErrors
- parent: string = ''
Returns undefined
validateUnion
- validateUnion(name, value, fieldErrors, isBodyParam, property, parent?): any
Returns any
combine all schemas once, ignoring order ie input: [[value1], [value2]] should be [[value1, value2]] not [[value1, value2],[value2, value1]] and input: [[value1, value2], [value3, value4], [value5, value6]] should be [ [value1, value3, value5], [value1, value3, value6], [value1, value4, value5], [value1, value4, value6], [value2, value3, value5], [value2, value3, value6], [value2, value4, value5], [value2, value4, value6], ]