@iamcalegari/mongoat / ModelValidationSchema
Interface: ModelValidationSchema<T>
Defined in: src/types/model.ts:120
Extends
JSONSchema4Subset
Type Parameters
T
T extends DefaultProperties = any
Properties
additionalProperties?
optionaladditionalProperties?:boolean|JSONSchema4Subset
Defined in: src/types/model.ts:25
Inherited from
JSONSchema4Subset.additionalProperties
bsonType
bsonType:
string|string[]
Defined in: src/types/model.ts:138
description?
optionaldescription?:string
Defined in: src/types/model.ts:26
Inherited from
JSONSchema4Subset.description
enum?
optionalenum?:unknown[]
Defined in: src/types/model.ts:27
Inherited from
JSONSchema4Subset.enum
items?
optionalitems?:ModelValidationSchema<any>
Defined in: src/types/model.ts:139
maximum?
optionalmaximum?:number
Defined in: src/types/model.ts:36
Fragmento usado pelo açúcar @Max sobre @Prop.
Inherited from
JSONSchema4Subset.maximum
maxLength?
optionalmaxLength?:number
Defined in: src/types/model.ts:32
Fragmentos usados pelos açúcares @MaxLength/@MinLength sobre @Prop — mesma semântica de $jsonSchema do MongoDB para strings.
Inherited from
JSONSchema4Subset.maxLength
minimum?
optionalminimum?:number
Defined in: src/types/model.ts:41
Fragmento usado pelo açúcar @Min sobre @Prop.
Inherited from
JSONSchema4Subset.minimum
minLength?
optionalminLength?:number
Defined in: src/types/model.ts:37
Inherited from
JSONSchema4Subset.minLength
pattern?
optionalpattern?:string
Defined in: src/types/model.ts:42
Inherited from
JSONSchema4Subset.pattern
properties?
optionalproperties?: { [k in string | number | symbol]: ModelValidationSchema<any> }
Defined in: src/types/model.ts:140
required?
optionalrequired?: keyofT[]
Defined in: src/types/model.ts:143