@tsed/schema 6.95.8 → 6.96.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/lib/cjs/domain/JsonSchema.js +17 -4
  2. package/lib/cjs/domain/JsonSchema.js.map +1 -1
  3. package/lib/esm/domain/JsonSchema.js +17 -4
  4. package/lib/esm/domain/JsonSchema.js.map +1 -1
  5. package/package.json +5 -5
  6. package/lib/cjs/components/anyMapper.d.ts +0 -2
  7. package/lib/cjs/components/classMapper.d.ts +0 -3
  8. package/lib/cjs/components/genericsMapper.d.ts +0 -5
  9. package/lib/cjs/components/index.d.ts +0 -11
  10. package/lib/cjs/components/inheritedClassMapper.d.ts +0 -5
  11. package/lib/cjs/components/itemMapper.d.ts +0 -2
  12. package/lib/cjs/components/lazyRefMapper.d.ts +0 -3
  13. package/lib/cjs/components/mapMapper.d.ts +0 -9
  14. package/lib/cjs/components/objectMapper.d.ts +0 -8
  15. package/lib/cjs/components/ofMapper.d.ts +0 -3
  16. package/lib/cjs/components/propertiesMapper.d.ts +0 -3
  17. package/lib/cjs/components/schemaMapper.d.ts +0 -3
  18. package/lib/cjs/constants/httpMethods.d.ts +0 -12
  19. package/lib/cjs/constants/httpStatusMessages.d.ts +0 -272
  20. package/lib/cjs/decorators/class/children.d.ts +0 -11
  21. package/lib/cjs/decorators/collections/collectionContains.d.ts +0 -21
  22. package/lib/cjs/decorators/collections/collectionOf.d.ts +0 -101
  23. package/lib/cjs/decorators/collections/maxItems.d.ts +0 -47
  24. package/lib/cjs/decorators/collections/maxProperties.d.ts +0 -70
  25. package/lib/cjs/decorators/collections/minItems.d.ts +0 -51
  26. package/lib/cjs/decorators/collections/minProperties.d.ts +0 -69
  27. package/lib/cjs/decorators/collections/uniqueItems.d.ts +0 -50
  28. package/lib/cjs/decorators/common/additionalProperties.d.ts +0 -11
  29. package/lib/cjs/decorators/common/allOf.d.ts +0 -13
  30. package/lib/cjs/decorators/common/allow.d.ts +0 -28
  31. package/lib/cjs/decorators/common/any.d.ts +0 -38
  32. package/lib/cjs/decorators/common/anyOf.d.ts +0 -17
  33. package/lib/cjs/decorators/common/const.d.ts +0 -61
  34. package/lib/cjs/decorators/common/customKey.d.ts +0 -26
  35. package/lib/cjs/decorators/common/default.d.ts +0 -41
  36. package/lib/cjs/decorators/common/description.d.ts +0 -53
  37. package/lib/cjs/decorators/common/enum.d.ts +0 -98
  38. package/lib/cjs/decorators/common/example.d.ts +0 -11
  39. package/lib/cjs/decorators/common/examples.d.ts +0 -12
  40. package/lib/cjs/decorators/common/exclusiveMaximum.d.ts +0 -69
  41. package/lib/cjs/decorators/common/exclusiveMinimum.d.ts +0 -69
  42. package/lib/cjs/decorators/common/format.d.ts +0 -459
  43. package/lib/cjs/decorators/common/forwardGroups.d.ts +0 -10
  44. package/lib/cjs/decorators/common/groups.d.ts +0 -11
  45. package/lib/cjs/decorators/common/hidden.d.ts +0 -32
  46. package/lib/cjs/decorators/common/ignore.d.ts +0 -58
  47. package/lib/cjs/decorators/common/integer.d.ts +0 -61
  48. package/lib/cjs/decorators/common/jsonEntityFn.d.ts +0 -21
  49. package/lib/cjs/decorators/common/maxLength.d.ts +0 -76
  50. package/lib/cjs/decorators/common/maximum.d.ts +0 -138
  51. package/lib/cjs/decorators/common/minLength.d.ts +0 -77
  52. package/lib/cjs/decorators/common/minimum.d.ts +0 -136
  53. package/lib/cjs/decorators/common/multipleOf.d.ts +0 -68
  54. package/lib/cjs/decorators/common/name.d.ts +0 -32
  55. package/lib/cjs/decorators/common/nullable.d.ts +0 -25
  56. package/lib/cjs/decorators/common/oneOf.d.ts +0 -17
  57. package/lib/cjs/decorators/common/optional.d.ts +0 -10
  58. package/lib/cjs/decorators/common/pattern.d.ts +0 -93
  59. package/lib/cjs/decorators/common/property.d.ts +0 -11
  60. package/lib/cjs/decorators/common/readOnly.d.ts +0 -11
  61. package/lib/cjs/decorators/common/required.d.ts +0 -44
  62. package/lib/cjs/decorators/common/requiredGroups.d.ts +0 -10
  63. package/lib/cjs/decorators/common/schema.d.ts +0 -53
  64. package/lib/cjs/decorators/common/title.d.ts +0 -39
  65. package/lib/cjs/decorators/common/writeOnly.d.ts +0 -11
  66. package/lib/cjs/decorators/config/jsonEntityComponent.d.ts +0 -10
  67. package/lib/cjs/decorators/generics/genericOf.d.ts +0 -76
  68. package/lib/cjs/decorators/generics/generics.d.ts +0 -14
  69. package/lib/cjs/decorators/index.d.ts +0 -68
  70. package/lib/cjs/decorators/operations/consumes.d.ts +0 -19
  71. package/lib/cjs/decorators/operations/contentType.d.ts +0 -20
  72. package/lib/cjs/decorators/operations/deprecated.d.ts +0 -23
  73. package/lib/cjs/decorators/operations/header.d.ts +0 -49
  74. package/lib/cjs/decorators/operations/in.d.ts +0 -64
  75. package/lib/cjs/decorators/operations/inFile.d.ts +0 -25
  76. package/lib/cjs/decorators/operations/location.d.ts +0 -22
  77. package/lib/cjs/decorators/operations/operationId.d.ts +0 -10
  78. package/lib/cjs/decorators/operations/operationPath.d.ts +0 -21
  79. package/lib/cjs/decorators/operations/partial.d.ts +0 -10
  80. package/lib/cjs/decorators/operations/path.d.ts +0 -15
  81. package/lib/cjs/decorators/operations/produces.d.ts +0 -26
  82. package/lib/cjs/decorators/operations/redirect.d.ts +0 -52
  83. package/lib/cjs/decorators/operations/returns.d.ts +0 -253
  84. package/lib/cjs/decorators/operations/route.d.ts +0 -188
  85. package/lib/cjs/decorators/operations/security.d.ts +0 -23
  86. package/lib/cjs/decorators/operations/status.d.ts +0 -127
  87. package/lib/cjs/decorators/operations/summary.d.ts +0 -20
  88. package/lib/cjs/decorators/operations/tags.d.ts +0 -23
  89. package/lib/cjs/domain/DecoratorContext.d.ts +0 -28
  90. package/lib/cjs/domain/JsonAliasMap.d.ts +0 -12
  91. package/lib/cjs/domain/JsonClassStore.d.ts +0 -12
  92. package/lib/cjs/domain/JsonEntityStore.d.ts +0 -135
  93. package/lib/cjs/domain/JsonFormatTypes.d.ts +0 -17
  94. package/lib/cjs/domain/JsonLazyRef.d.ts +0 -11
  95. package/lib/cjs/domain/JsonMap.d.ts +0 -7
  96. package/lib/cjs/domain/JsonMethodStore.d.ts +0 -40
  97. package/lib/cjs/domain/JsonOperation.d.ts +0 -51
  98. package/lib/cjs/domain/JsonOperationPathsMap.d.ts +0 -7
  99. package/lib/cjs/domain/JsonOperationRoute.d.ts +0 -24
  100. package/lib/cjs/domain/JsonParameter.d.ts +0 -22
  101. package/lib/cjs/domain/JsonParameterStore.d.ts +0 -30
  102. package/lib/cjs/domain/JsonParameterTypes.d.ts +0 -16
  103. package/lib/cjs/domain/JsonPropertyStore.d.ts +0 -23
  104. package/lib/cjs/domain/JsonRequestBody.d.ts +0 -11
  105. package/lib/cjs/domain/JsonResponse.d.ts +0 -22
  106. package/lib/cjs/domain/JsonSchema.d.ts +0 -337
  107. package/lib/cjs/domain/SpecTypes.d.ts +0 -5
  108. package/lib/cjs/domain/index.d.ts +0 -16
  109. package/lib/cjs/hooks/alterIgnore.d.ts +0 -9
  110. package/lib/cjs/hooks/alterOneOf.d.ts +0 -3
  111. package/lib/cjs/hooks/alterRequiredGroups.d.ts +0 -6
  112. package/lib/cjs/index.d.ts +0 -20
  113. package/lib/cjs/interfaces/IgnoreCallback.d.ts +0 -4
  114. package/lib/cjs/interfaces/JsonHookContext.d.ts +0 -17
  115. package/lib/cjs/interfaces/JsonOpenSpec.d.ts +0 -9
  116. package/lib/cjs/interfaces/JsonSchemaOptions.d.ts +0 -26
  117. package/lib/cjs/interfaces/index.d.ts +0 -4
  118. package/lib/cjs/registries/JsonSchemaMapperContainer.d.ts +0 -19
  119. package/lib/cjs/utils/buildPath.d.ts +0 -6
  120. package/lib/cjs/utils/concatParameters.d.ts +0 -4
  121. package/lib/cjs/utils/concatPath.d.ts +0 -1
  122. package/lib/cjs/utils/defineStatusModel.d.ts +0 -3
  123. package/lib/cjs/utils/from.d.ts +0 -189
  124. package/lib/cjs/utils/generics.d.ts +0 -50
  125. package/lib/cjs/utils/getComputedType.d.ts +0 -5
  126. package/lib/cjs/utils/getInheritedStores.d.ts +0 -8
  127. package/lib/cjs/utils/getJsonEntityStore.d.ts +0 -15
  128. package/lib/cjs/utils/getJsonPathParameters.d.ts +0 -7
  129. package/lib/cjs/utils/getJsonSchema.d.ts +0 -4
  130. package/lib/cjs/utils/getJsonType.d.ts +0 -5
  131. package/lib/cjs/utils/getOperationsRoutes.d.ts +0 -8
  132. package/lib/cjs/utils/getOperationsStores.d.ts +0 -6
  133. package/lib/cjs/utils/getPropertiesStores.d.ts +0 -20
  134. package/lib/cjs/utils/getRequiredProperties.d.ts +0 -6
  135. package/lib/cjs/utils/getSpec.d.ts +0 -49
  136. package/lib/cjs/utils/isJsonClass.d.ts +0 -4
  137. package/lib/cjs/utils/isSuccessStatus.d.ts +0 -2
  138. package/lib/cjs/utils/mapHeaders.d.ts +0 -9
  139. package/lib/cjs/utils/mapNullableType.d.ts +0 -3
  140. package/lib/cjs/utils/mapRouteOptions.d.ts +0 -5
  141. package/lib/cjs/utils/matchGroups.d.ts +0 -4
  142. package/lib/cjs/utils/mergeOperation.d.ts +0 -17
  143. package/lib/cjs/utils/mergeSpec.d.ts +0 -23
  144. package/lib/cjs/utils/operationIdFormatter.d.ts +0 -4
  145. package/lib/cjs/utils/ref.d.ts +0 -14
  146. package/lib/cjs/utils/toJsonMapCollection.d.ts +0 -7
  147. package/lib/cjs/utils/toJsonRegex.d.ts +0 -5
@@ -1,272 +0,0 @@
1
- export declare const HTTP_STATUS_MESSAGES: {
2
- "100": {
3
- label: string;
4
- code: string;
5
- };
6
- "101": {
7
- label: string;
8
- code: string;
9
- };
10
- "102": {
11
- label: string;
12
- code: string;
13
- };
14
- "103": {
15
- label: string;
16
- code: string;
17
- };
18
- "200": {
19
- label: string;
20
- code: string;
21
- };
22
- "201": {
23
- label: string;
24
- code: string;
25
- };
26
- "202": {
27
- label: string;
28
- code: string;
29
- };
30
- "203": {
31
- label: string;
32
- code: string;
33
- };
34
- "204": {
35
- label: string;
36
- code: string;
37
- };
38
- "205": {
39
- label: string;
40
- code: string;
41
- };
42
- "206": {
43
- label: string;
44
- code: string;
45
- };
46
- "207": {
47
- label: string;
48
- code: string;
49
- };
50
- "208": {
51
- label: string;
52
- code: string;
53
- };
54
- "226": {
55
- label: string;
56
- code: string;
57
- };
58
- "300": {
59
- label: string;
60
- code: string;
61
- };
62
- "301": {
63
- label: string;
64
- code: string;
65
- };
66
- "302": {
67
- label: string;
68
- code: string;
69
- };
70
- "303": {
71
- label: string;
72
- code: string;
73
- };
74
- "304": {
75
- label: string;
76
- code: string;
77
- };
78
- "305": {
79
- label: string;
80
- code: string;
81
- };
82
- "306": {
83
- label: string;
84
- code: string;
85
- };
86
- "307": {
87
- label: string;
88
- code: string;
89
- };
90
- "308": {
91
- label: string;
92
- code: string;
93
- };
94
- "310": {
95
- label: string;
96
- code: string;
97
- };
98
- "400": {
99
- label: string;
100
- code: string;
101
- };
102
- "401": {
103
- label: string;
104
- code: string;
105
- };
106
- "402": {
107
- label: string;
108
- code: string;
109
- };
110
- "403": {
111
- label: string;
112
- code: string;
113
- };
114
- "404": {
115
- label: string;
116
- code: string;
117
- };
118
- "405": {
119
- label: string;
120
- code: string;
121
- };
122
- "406": {
123
- label: string;
124
- code: string;
125
- };
126
- "407": {
127
- label: string;
128
- code: string;
129
- };
130
- "408": {
131
- label: string;
132
- code: string;
133
- };
134
- "409": {
135
- label: string;
136
- code: string;
137
- };
138
- "410": {
139
- label: string;
140
- code: string;
141
- };
142
- "411": {
143
- label: string;
144
- code: string;
145
- };
146
- "412": {
147
- label: string;
148
- code: string;
149
- };
150
- "413": {
151
- label: string;
152
- code: string;
153
- };
154
- "414": {
155
- label: string;
156
- code: string;
157
- };
158
- "415": {
159
- label: string;
160
- code: string;
161
- };
162
- "416": {
163
- label: string;
164
- code: string;
165
- };
166
- "417": {
167
- label: string;
168
- code: string;
169
- };
170
- "418": {
171
- label: string;
172
- code: string;
173
- };
174
- "421": {
175
- label: string;
176
- code: string;
177
- };
178
- "422": {
179
- label: string;
180
- code: string;
181
- };
182
- "423": {
183
- label: string;
184
- code: string;
185
- };
186
- "424": {
187
- label: string;
188
- code: string;
189
- };
190
- "425": {
191
- label: string;
192
- code: string;
193
- };
194
- "426": {
195
- label: string;
196
- code: string;
197
- };
198
- "427": {
199
- label: string;
200
- code: string;
201
- };
202
- "428": {
203
- label: string;
204
- code: string;
205
- };
206
- "429": {
207
- label: string;
208
- code: string;
209
- };
210
- "430": {
211
- label: string;
212
- code: string;
213
- };
214
- "431": {
215
- label: string;
216
- code: string;
217
- };
218
- "451": {
219
- label: string;
220
- code: string;
221
- };
222
- "500": {
223
- label: string;
224
- code: string;
225
- };
226
- "501": {
227
- label: string;
228
- code: string;
229
- };
230
- "502": {
231
- label: string;
232
- code: string;
233
- };
234
- "503": {
235
- label: string;
236
- code: string;
237
- };
238
- "504": {
239
- label: string;
240
- code: string;
241
- };
242
- "505": {
243
- label: string;
244
- code: string;
245
- };
246
- "506": {
247
- label: string;
248
- code: string;
249
- };
250
- "507": {
251
- label: string;
252
- code: string;
253
- };
254
- "508": {
255
- label: string;
256
- code: string;
257
- };
258
- "509": {
259
- label: string;
260
- code: string;
261
- };
262
- "510": {
263
- label: string;
264
- code: string;
265
- };
266
- "511": {
267
- label: string;
268
- code: string;
269
- };
270
- };
271
- export declare function getStatusConstant(status: number | string): any;
272
- export declare function getStatusMessage(status: number | string): any;
@@ -1,11 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- /**
3
- * Add Children class to compose routes
4
- *
5
- * @decorator
6
- * @swagger
7
- * @schema
8
- * @classDecorator
9
- * @param children
10
- */
11
- export declare function Children(...children: Type<any>[]): ClassDecorator;
@@ -1,21 +0,0 @@
1
- /**
2
- * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...
3
- *
4
- * The array instance will be valid against "contains" if at least one of its elements is valid against the given schema.
5
- *
6
- * ```typescript
7
- * class Model {
8
- * @CollectionContains(String).MinLength(0).MaxLength(0)
9
- * property: string[];
10
- * }
11
- * ```
12
- *
13
- * @param {Type<any>} type
14
- * @decorator
15
- * @validation
16
- * @swagger
17
- * @schema
18
- * @input
19
- * @collections
20
- */
21
- export declare function CollectionContains(type: any): import("./collectionOf").CollectionOfChainedDecorators;
@@ -1,101 +0,0 @@
1
- export interface ArrayOfChainedDecorators {
2
- (...args: any): any;
3
- /**
4
- * An array instance is valid against `minItems` if its size is greater than, or equal to, the value of this keyword.
5
- *
6
- * ::: warning
7
- * The value `minItems` MUST be a non-negative integer.
8
- * :::
9
- *
10
- * ::: tip
11
- * Omitting this keyword has the same behavior as a value of 0.
12
- * :::
13
- */
14
- MinItems(minItems: number): this;
15
- /**
16
- * The value `maxItems` MUST be a non-negative integer.
17
- *
18
- * An array instance is valid against `maxItems` if its size is less than, or equal to, the value of this keyword.
19
- *
20
- * :: warning
21
- * The value `maxItems` MUST be a non-negative integer.
22
- * :::
23
- */
24
- MaxItems(maxItems: number): this;
25
- /**
26
- * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...
27
- *
28
- * The array instance will be valid against "contains" if at least one of its elements is valid against the given schema.
29
- */
30
- Contains(): this;
31
- /**
32
- * If this keyword has boolean value false, the instance validates successfully. If it has boolean value true, the instance validates successfully if all of its elements are unique.
33
- */
34
- UniqueItems(uniqueItems?: boolean): this;
35
- }
36
- export interface MapOfChainedDecorators {
37
- (...args: any): any;
38
- /**
39
- * An object instance is valid against `minProperties` if its number of properties is less than, or equal to, the value of this keyword.
40
- *
41
- * ::: warning
42
- * The value of this keyword MUST be a non-negative integer.
43
- * :::
44
- */
45
- MinProperties(minProperties: number): this;
46
- /**
47
- * An object instance is valid against `maxProperties` if its number of properties is less than, or equal to, the value of this keyword.
48
- *
49
- * ::: warning
50
- * The value of this keyword MUST be a non-negative integer.
51
- * :::
52
- */
53
- MaxProperties(maxProperties: number): this;
54
- }
55
- export interface CollectionOfChainedDecorators extends MapOfChainedDecorators, ArrayOfChainedDecorators {
56
- }
57
- /**
58
- * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...
59
- *
60
- * ```typescript
61
- * class Model {
62
- * @CollectionOf(String).MinLength(0).MaxLength(0)
63
- * property: string[];
64
- * }
65
- * ```
66
- * ::: warning
67
- * You mustn't use the `type Type = string | number` as parameters Type.
68
- *
69
- * This example doesn't work:
70
- *
71
- * ```typescript
72
- * type Type = "string" | "number"
73
- * class Model {
74
- * @CollectionOf(Type)
75
- * property: Type[];
76
- * }
77
- * ```
78
- * :::
79
- *
80
- * @param {Type<any>} type
81
- * @param collectionType
82
- * @decorator
83
- * @validation
84
- * @swagger
85
- * @schema
86
- * @input
87
- * @collections
88
- */
89
- export declare function CollectionOf(type: any, collectionType?: any): CollectionOfChainedDecorators;
90
- /**
91
- * Alias of @@GenericOf@@ decorator.
92
- * @param type
93
- * @decorator
94
- */
95
- export declare function ArrayOf(type: any): ArrayOfChainedDecorators;
96
- /**
97
- * Alias of @@GenericOf@@ decorator.
98
- * @param type
99
- * @decorator
100
- */
101
- export declare function MapOf(type: any): MapOfChainedDecorators;
@@ -1,47 +0,0 @@
1
- /**
2
- * The value `maxItems` MUST be a non-negative integer.
3
- *
4
- * An array instance is valid against `maxItems` if its size is less than, or equal to, the value of this keyword.
5
- *
6
- * :: warning
7
- * The value `maxItems` MUST be a non-negative integer.
8
- * :::
9
- *
10
- * :: warning
11
- * This decorator will be removed in v7.
12
- * For v6 user, use @@MaxItems@@ from @tsed/schema instead of @tsed/common.
13
- * :::
14
- *
15
- * ## Example
16
- *
17
- * ```typescript
18
- * class Model {
19
- * @CollectionOf(String)
20
- * @MaxItems(10)
21
- * property: string[];
22
- * }
23
- * ```
24
- *
25
- * Will produce:
26
- *
27
- * ```json
28
- * {
29
- * "type": "object",
30
- * "properties": {
31
- * "property": {
32
- * "type": "number",
33
- * "maxItems": 10
34
- * }
35
- * }
36
- * }
37
- * ```
38
- *
39
- * @param {number} maxItems
40
- * @decorator
41
- * @validation
42
- * @swagger
43
- * @schema
44
- * @input
45
- * @collections
46
- */
47
- export declare function MaxItems(maxItems: number): (...args: any[]) => any;
@@ -1,70 +0,0 @@
1
- /**
2
- * An object instance is valid against `maxProperties` if its number of properties is less than, or equal to, the value of this keyword.
3
- *
4
- * ::: warning
5
- * The value of this keyword MUST be a non-negative integer.
6
- * :::
7
- *
8
- * ::: warning
9
- * This decorator will be removed in v7.
10
- * For v6 user, use @@MaxProperties@@ from @tsed/schema instead of @tsed/common.
11
- * :::
12
- *
13
- * ## Example
14
- * ### On prop
15
- * ```typescript
16
- * class Model {
17
- * @MaxProperties(10)
18
- * property: any;
19
- * }
20
- * ```
21
- *
22
- * Will produce:
23
- *
24
- * ```json
25
- * {
26
- * "type": "object",
27
- * "properties": {
28
- * "property": {
29
- * "type": "any",
30
- * "maxProperties": 10
31
- * }
32
- * }
33
- * }
34
- * ```
35
- *
36
- * ### On class
37
- *
38
- * ```typescript
39
- * @MaxProperties(10)
40
- * class Model {
41
- * }
42
- * ```
43
- *
44
- * Will produce:
45
- *
46
- * ```json
47
- * {
48
- * "type": "object",
49
- * "maxProperties": 10
50
- * }
51
- * ```
52
- *
53
- * ### On Parameter
54
- *
55
- * ```typescript
56
- *
57
- * class Model {
58
- * method(@Any() @MaxProperties(10) obj: any){}
59
- * }
60
- * ```
61
- *
62
- * @param {number} maxProperties The maximum properties allowed on the given object
63
- * @decorator
64
- * @validation
65
- * @swagger
66
- * @schema
67
- * @input
68
- * @collections
69
- */
70
- export declare function MaxProperties(maxProperties: number): (...args: any[]) => any;
@@ -1,51 +0,0 @@
1
- /**
2
- * An array instance is valid against `minItems` if its size is greater than, or equal to, the value of this keyword.
3
- *
4
- * ::: warning
5
- * The value `minItems` MUST be a non-negative integer.
6
- * :::
7
- *
8
- * ::: tip
9
- * Omitting this keyword has the same behavior as a value of 0.
10
- * :::
11
- *
12
- * ::: warning
13
- * For v6 user, use @@MinItems@@ from @tsed/schema instead of @tsed/common.
14
- * :::
15
- *
16
- * ## Example
17
- *
18
- * ```typescript
19
- * class Model {
20
- * @CollectionOf(String)
21
- * @MinItems(10)
22
- * property: string[];
23
- * }
24
- * ```
25
- *
26
- * Will produce:
27
- *
28
- * ```json
29
- * {
30
- * "type": "object",
31
- * "properties": {
32
- * "property": {
33
- * "type": "array",
34
- * "minItems": 10,
35
- * "items": {
36
- * "type": "string"
37
- * }
38
- * }
39
- * }
40
- * }
41
- * ```
42
- *
43
- * @param {number} minItems
44
- * @decorator
45
- * @validation
46
- * @swagger
47
- * @schema
48
- * @input
49
- * @collections
50
- */
51
- export declare function MinItems(minItems: number): (...args: any[]) => any;
@@ -1,69 +0,0 @@
1
- /**
2
- * An object instance is valid against `minProperties` if its number of properties is less than, or equal to, the value of this keyword.
3
- *
4
- * ::: warning
5
- * The value of this keyword MUST be a non-negative integer.
6
- * :::
7
- *
8
- * ::: warning
9
- * For v6 user, use @@MinProperties@@ from @tsed/schema instead of @tsed/common.
10
- * :::
11
- *
12
- * ## Example
13
- * ### On prop
14
- * ```typescript
15
- * class Model {
16
- * @MinProperties(10)
17
- * property: any;
18
- * }
19
- * ```
20
- *
21
- * Will produce:
22
- *
23
- * ```json
24
- * {
25
- * "type": "object",
26
- * "properties": {
27
- * "property": {
28
- * "type": "any",
29
- * "minProperties": 10
30
- * }
31
- * }
32
- * }
33
- * ```
34
- *
35
- * ### On class
36
- *
37
- * ```typescript
38
- * @MinProperties(10)
39
- * class Model {
40
- * }
41
- * ```
42
- *
43
- * Will produce:
44
- *
45
- * ```json
46
- * {
47
- * "type": "object",
48
- * "minProperties": 10
49
- * }
50
- * ```
51
- *
52
- * ### On Parameter
53
- *
54
- * ```typescript
55
- *
56
- * class Model {
57
- * method(@Any() @MinProperties(10) obj: any){}
58
- * }
59
- * ```
60
- *
61
- * @param {number} minProperties The minimum properties allowed on the object.
62
- * @decorator
63
- * @validation
64
- * @swagger
65
- * @schema
66
- * @input
67
- * @collections
68
- */
69
- export declare function MinProperties(minProperties: number): (...args: any[]) => any;
@@ -1,50 +0,0 @@
1
- /**
2
- * If this keyword has boolean value false, the instance validates successfully. If it has boolean value true, the instance validates successfully if all of its elements are unique.
3
- *
4
- * ::: warning
5
- * For v6 user, use @@UniqueItems@@ from @tsed/schema instead of @tsed/common.
6
- * :::
7
- *
8
- * ## Example
9
- *
10
- * ```typescript
11
- * class Model {
12
- * @UniqueItems() // default true
13
- * property: number[];
14
- * }
15
- * ```
16
- *
17
- * * ```typescript
18
- * class Model {
19
- * @CollectionOf(String)
20
- * @UniqueItems()
21
- * property: string[];
22
- * }
23
- * ```
24
- *
25
- * Will produce:
26
- *
27
- * ```json
28
- * {
29
- * "type": "object",
30
- * "properties": {
31
- * "property": {
32
- * "type": "array",
33
- * "uniqueItems": true,
34
- * "items": {
35
- * "type": "string"
36
- * }
37
- * }
38
- * }
39
- * }
40
- * ```
41
- *
42
- * @param {boolean} uniqueItems
43
- * @decorator
44
- * @validation
45
- * @swagger
46
- * @schema
47
- * @input
48
- * @collections
49
- */
50
- export declare function UniqueItems(uniqueItems?: boolean): (...args: any[]) => any;
@@ -1,11 +0,0 @@
1
- import { AnyJsonSchema } from "../../domain/JsonSchema";
2
- /**
3
- * Accept unknown properties on the deserialized model.
4
- *
5
- * @param schema
6
- * @decorator
7
- * @validation
8
- * @swagger
9
- * @schema
10
- */
11
- export declare function AdditionalProperties(schema: boolean | AnyJsonSchema): (...args: any[]) => any;