@tsed/schema 7.84.1 → 7.85.0
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.
- package/lib/browser/schema.umd.min.js +1 -1
- package/lib/browser/schema.umd.min.js.map +1 -1
- package/lib/cjs/components/default/anyMapper.js +1 -1
- package/lib/cjs/components/default/anyMapper.js.map +1 -1
- package/lib/cjs/components/default/inheritedClassMapper.js +16 -2
- package/lib/cjs/components/default/inheritedClassMapper.js.map +1 -1
- package/lib/cjs/decorators/common/labelledAs.js +39 -0
- package/lib/cjs/decorators/common/labelledAs.js.map +1 -0
- package/lib/cjs/decorators/generics/genericOf.js +2 -2
- package/lib/cjs/decorators/generics/genericOf.js.map +1 -1
- package/lib/cjs/decorators/operations/returns.js +2 -2
- package/lib/cjs/decorators/operations/returns.js.map +1 -1
- package/lib/cjs/fn/allOf.js +16 -0
- package/lib/cjs/fn/allOf.js.map +1 -0
- package/lib/cjs/fn/any.js +14 -0
- package/lib/cjs/fn/any.js.map +1 -0
- package/lib/cjs/fn/anyOf.js +16 -0
- package/lib/cjs/fn/anyOf.js.map +1 -0
- package/lib/cjs/fn/boolean.js +14 -0
- package/lib/cjs/fn/boolean.js.map +1 -0
- package/lib/cjs/fn/collection.js +56 -0
- package/lib/cjs/fn/collection.js.map +1 -0
- package/lib/cjs/fn/date.js +33 -0
- package/lib/cjs/fn/date.js.map +1 -0
- package/lib/cjs/fn/email.js +22 -0
- package/lib/cjs/fn/email.js.map +1 -0
- package/lib/cjs/fn/enums.js +12 -0
- package/lib/cjs/fn/enums.js.map +1 -0
- package/lib/cjs/fn/from.js +32 -0
- package/lib/cjs/fn/from.js.map +1 -0
- package/lib/cjs/fn/integer.js +17 -0
- package/lib/cjs/fn/integer.js.map +1 -0
- package/lib/cjs/fn/lazyRef.js +21 -0
- package/lib/cjs/fn/lazyRef.js.map +1 -0
- package/lib/cjs/fn/number.js +14 -0
- package/lib/cjs/fn/number.js.map +1 -0
- package/lib/cjs/fn/object.js +26 -0
- package/lib/cjs/fn/object.js.map +1 -0
- package/lib/cjs/fn/oneOf.js +17 -0
- package/lib/cjs/fn/oneOf.js.map +1 -0
- package/lib/cjs/fn/string.js +14 -0
- package/lib/cjs/fn/string.js.map +1 -0
- package/lib/cjs/fn/uri.js +17 -0
- package/lib/cjs/fn/uri.js.map +1 -0
- package/lib/cjs/fn/url.js +15 -0
- package/lib/cjs/fn/url.js.map +1 -0
- package/lib/cjs/index.js +18 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/registries/JsonSchemaMapperContainer.js +3 -3
- package/lib/cjs/registries/JsonSchemaMapperContainer.js.map +1 -1
- package/lib/cjs/utils/ref.js.map +1 -1
- package/lib/esm/components/default/anyMapper.js +2 -2
- package/lib/esm/components/default/anyMapper.js.map +1 -1
- package/lib/esm/components/default/inheritedClassMapper.js +16 -2
- package/lib/esm/components/default/inheritedClassMapper.js.map +1 -1
- package/lib/esm/decorators/common/labelledAs.js +35 -0
- package/lib/esm/decorators/common/labelledAs.js.map +1 -0
- package/lib/esm/decorators/generics/genericOf.js +1 -1
- package/lib/esm/decorators/generics/genericOf.js.map +1 -1
- package/lib/esm/decorators/operations/returns.js +1 -1
- package/lib/esm/decorators/operations/returns.js.map +1 -1
- package/lib/esm/fn/allOf.js +12 -0
- package/lib/esm/fn/allOf.js.map +1 -0
- package/lib/esm/fn/any.js +10 -0
- package/lib/esm/fn/any.js.map +1 -0
- package/lib/esm/fn/anyOf.js +12 -0
- package/lib/esm/fn/anyOf.js.map +1 -0
- package/lib/esm/fn/boolean.js +10 -0
- package/lib/esm/fn/boolean.js.map +1 -0
- package/lib/esm/fn/collection.js +50 -0
- package/lib/esm/fn/collection.js.map +1 -0
- package/lib/esm/fn/date.js +27 -0
- package/lib/esm/fn/date.js.map +1 -0
- package/lib/esm/fn/email.js +18 -0
- package/lib/esm/fn/email.js.map +1 -0
- package/lib/esm/fn/enums.js +8 -0
- package/lib/esm/fn/enums.js.map +1 -0
- package/lib/esm/fn/from.js +28 -0
- package/lib/esm/fn/from.js.map +1 -0
- package/lib/esm/fn/integer.js +13 -0
- package/lib/esm/fn/integer.js.map +1 -0
- package/lib/esm/fn/lazyRef.js +17 -0
- package/lib/esm/fn/lazyRef.js.map +1 -0
- package/lib/esm/fn/number.js +10 -0
- package/lib/esm/fn/number.js.map +1 -0
- package/lib/esm/fn/object.js +22 -0
- package/lib/esm/fn/object.js.map +1 -0
- package/lib/esm/fn/oneOf.js +13 -0
- package/lib/esm/fn/oneOf.js.map +1 -0
- package/lib/esm/fn/string.js +10 -0
- package/lib/esm/fn/string.js.map +1 -0
- package/lib/esm/fn/uri.js +13 -0
- package/lib/esm/fn/uri.js.map +1 -0
- package/lib/esm/fn/url.js +11 -0
- package/lib/esm/fn/url.js.map +1 -0
- package/lib/esm/index.js +18 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/registries/JsonSchemaMapperContainer.js +1 -1
- package/lib/esm/registries/JsonSchemaMapperContainer.js.map +1 -1
- package/lib/esm/utils/ref.js.map +1 -1
- package/lib/types/decorators/common/labelledAs.d.ts +24 -0
- package/lib/types/fn/allOf.d.ts +9 -0
- package/lib/types/fn/any.d.ts +7 -0
- package/lib/types/fn/anyOf.d.ts +9 -0
- package/lib/types/fn/boolean.d.ts +7 -0
- package/lib/types/fn/collection.d.ts +43 -0
- package/lib/types/fn/date.d.ts +19 -0
- package/lib/types/fn/email.d.ts +14 -0
- package/lib/types/fn/enums.d.ts +1 -0
- package/lib/types/fn/from.d.ts +14 -0
- package/lib/types/fn/integer.d.ts +10 -0
- package/lib/types/fn/lazyRef.d.ts +5 -0
- package/lib/types/fn/number.d.ts +6 -0
- package/lib/types/fn/object.d.ts +21 -0
- package/lib/types/fn/oneOf.d.ts +10 -0
- package/lib/types/fn/string.d.ts +7 -0
- package/lib/types/fn/uri.d.ts +9 -0
- package/lib/types/fn/url.d.ts +7 -0
- package/lib/types/index.d.ts +18 -1
- package/lib/types/registries/JsonSchemaMapperContainer.d.ts +1 -1
- package/lib/types-esm/decorators/common/labelledAs.d.ts +24 -0
- package/lib/types-esm/fn/allOf.d.ts +9 -0
- package/lib/types-esm/fn/any.d.ts +7 -0
- package/lib/types-esm/fn/anyOf.d.ts +9 -0
- package/lib/types-esm/fn/boolean.d.ts +7 -0
- package/lib/types-esm/fn/collection.d.ts +43 -0
- package/lib/types-esm/fn/date.d.ts +19 -0
- package/lib/types-esm/fn/email.d.ts +14 -0
- package/lib/types-esm/fn/enums.d.ts +1 -0
- package/lib/types-esm/fn/from.d.ts +14 -0
- package/lib/types-esm/fn/integer.d.ts +10 -0
- package/lib/types-esm/fn/lazyRef.d.ts +5 -0
- package/lib/types-esm/fn/number.d.ts +6 -0
- package/lib/types-esm/fn/object.d.ts +21 -0
- package/lib/types-esm/fn/oneOf.d.ts +10 -0
- package/lib/types-esm/fn/string.d.ts +7 -0
- package/lib/types-esm/fn/uri.d.ts +9 -0
- package/lib/types-esm/fn/url.d.ts +7 -0
- package/lib/types-esm/index.d.ts +18 -1
- package/lib/types-esm/registries/JsonSchemaMapperContainer.d.ts +1 -1
- package/package.json +8 -8
- package/lib/cjs/utils/from.js +0 -280
- package/lib/cjs/utils/from.js.map +0 -1
- package/lib/esm/utils/from.js +0 -256
- package/lib/esm/utils/from.js.map +0 -1
- package/lib/types/utils/from.d.ts +0 -190
- package/lib/types-esm/utils/from.d.ts +0 -190
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { Type } from "@tsed/core";
|
|
2
|
-
import { JsonSchema } from "../domain/JsonSchema.js";
|
|
3
|
-
/**
|
|
4
|
-
* Create a new model from the given type.
|
|
5
|
-
*
|
|
6
|
-
* ```typescript
|
|
7
|
-
* from(String)
|
|
8
|
-
* ```
|
|
9
|
-
*
|
|
10
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
11
|
-
*
|
|
12
|
-
* @schemaFunctional
|
|
13
|
-
*/
|
|
14
|
-
export declare function from(type?: Type<any>): JsonSchema;
|
|
15
|
-
/**
|
|
16
|
-
* Declare a new number model.
|
|
17
|
-
*
|
|
18
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
19
|
-
*
|
|
20
|
-
* @schemaFunctional
|
|
21
|
-
*/
|
|
22
|
-
export declare function number(): JsonSchema;
|
|
23
|
-
/**
|
|
24
|
-
* Declare a new integer model.
|
|
25
|
-
*
|
|
26
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
27
|
-
*
|
|
28
|
-
* @schemaFunctional
|
|
29
|
-
*/
|
|
30
|
-
export declare function integer(): JsonSchema;
|
|
31
|
-
/**
|
|
32
|
-
* Declare a new string model.
|
|
33
|
-
*
|
|
34
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
35
|
-
*
|
|
36
|
-
* @schemaFunctional
|
|
37
|
-
*/
|
|
38
|
-
export declare function string(): JsonSchema;
|
|
39
|
-
/**
|
|
40
|
-
* Declare a new boolean model.
|
|
41
|
-
*
|
|
42
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
43
|
-
*
|
|
44
|
-
* @schemaFunctional
|
|
45
|
-
*/
|
|
46
|
-
export declare function boolean(): JsonSchema;
|
|
47
|
-
/**
|
|
48
|
-
* Declare a new string model with `format: date`.
|
|
49
|
-
*
|
|
50
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
51
|
-
*
|
|
52
|
-
* @schemaFunctional
|
|
53
|
-
*/
|
|
54
|
-
export declare function date(): JsonSchema;
|
|
55
|
-
/**
|
|
56
|
-
* Declare a new string model with `format: datetime`.
|
|
57
|
-
*
|
|
58
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
59
|
-
*
|
|
60
|
-
* @schemaFunctional
|
|
61
|
-
*/
|
|
62
|
-
export declare function datetime(): JsonSchema;
|
|
63
|
-
/**
|
|
64
|
-
* Declare a new string model with `format: time`.
|
|
65
|
-
*
|
|
66
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
67
|
-
*
|
|
68
|
-
* @schemaFunctional
|
|
69
|
-
*/
|
|
70
|
-
export declare function time(): JsonSchema;
|
|
71
|
-
/**
|
|
72
|
-
* Declare a new string model with `format: email`.
|
|
73
|
-
*
|
|
74
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
75
|
-
*
|
|
76
|
-
* @schemaFunctional
|
|
77
|
-
*/
|
|
78
|
-
export declare function email(): JsonSchema;
|
|
79
|
-
/**
|
|
80
|
-
* Declare a new string model with `format: uri`.
|
|
81
|
-
*
|
|
82
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
83
|
-
*
|
|
84
|
-
* @schemaFunctional
|
|
85
|
-
*/
|
|
86
|
-
export declare function uri(): JsonSchema;
|
|
87
|
-
/**
|
|
88
|
-
* Declare a new string model with `format: url`.
|
|
89
|
-
*
|
|
90
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
91
|
-
*
|
|
92
|
-
* @schemaFunctional
|
|
93
|
-
*/
|
|
94
|
-
export declare function url(): JsonSchema;
|
|
95
|
-
/**
|
|
96
|
-
* Declare a new object model with `additionalProperties: true`.
|
|
97
|
-
*
|
|
98
|
-
* ```json
|
|
99
|
-
* {
|
|
100
|
-
* "type": "array"
|
|
101
|
-
* }
|
|
102
|
-
* ```
|
|
103
|
-
*
|
|
104
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
105
|
-
*
|
|
106
|
-
* @schemaFunctional
|
|
107
|
-
*/
|
|
108
|
-
export declare function array(): JsonSchema;
|
|
109
|
-
/**
|
|
110
|
-
* Declare a new object model with `additionalProperties: true`.
|
|
111
|
-
*
|
|
112
|
-
* ```json
|
|
113
|
-
* {
|
|
114
|
-
* "type": "object",
|
|
115
|
-
* "additionalProperties": true
|
|
116
|
-
* }
|
|
117
|
-
* ```
|
|
118
|
-
*
|
|
119
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
120
|
-
*
|
|
121
|
-
* @schemaFunctional
|
|
122
|
-
*/
|
|
123
|
-
export declare function map(): JsonSchema;
|
|
124
|
-
/**
|
|
125
|
-
* Declare a new array model with `uniqueItems: true`.
|
|
126
|
-
*
|
|
127
|
-
* ```json
|
|
128
|
-
* {
|
|
129
|
-
* "type": "array",
|
|
130
|
-
* "uniqueItems": true
|
|
131
|
-
* }
|
|
132
|
-
* ```
|
|
133
|
-
*
|
|
134
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
135
|
-
*
|
|
136
|
-
* @schemaFunctional
|
|
137
|
-
*/
|
|
138
|
-
export declare function set(): JsonSchema;
|
|
139
|
-
/**
|
|
140
|
-
* Declare a new object model.
|
|
141
|
-
*
|
|
142
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
143
|
-
*
|
|
144
|
-
* @schemaFunctional
|
|
145
|
-
*/
|
|
146
|
-
export declare function object(properties?: {
|
|
147
|
-
[key: string]: JsonSchema;
|
|
148
|
-
}): JsonSchema;
|
|
149
|
-
/**
|
|
150
|
-
* Declare a model with any type (By default: `integer`, `number`, `string`, `boolean`, `array`, `object`, `null`)
|
|
151
|
-
*
|
|
152
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
153
|
-
*
|
|
154
|
-
* @schemaFunctional
|
|
155
|
-
*/
|
|
156
|
-
export declare function any(...types: any[]): JsonSchema;
|
|
157
|
-
/**
|
|
158
|
-
* See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27
|
|
159
|
-
*
|
|
160
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
161
|
-
*
|
|
162
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27
|
|
163
|
-
* @schemaFunctional
|
|
164
|
-
*/
|
|
165
|
-
export declare function anyOf(...anyOf: any[]): JsonSchema;
|
|
166
|
-
/**
|
|
167
|
-
* See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28
|
|
168
|
-
*
|
|
169
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
170
|
-
*
|
|
171
|
-
* @schemaFunctional
|
|
172
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28
|
|
173
|
-
*/
|
|
174
|
-
export declare function oneOf(...oneOf: any[]): JsonSchema;
|
|
175
|
-
/**
|
|
176
|
-
* See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26
|
|
177
|
-
*
|
|
178
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
179
|
-
*
|
|
180
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26
|
|
181
|
-
* @schemaFunctional
|
|
182
|
-
*/
|
|
183
|
-
export declare function allOf(...allOf: any[]): JsonSchema;
|
|
184
|
-
/**
|
|
185
|
-
* Declare a sub schema which will be resolved later. Use this function when you have a circular reference between two schemes.
|
|
186
|
-
*
|
|
187
|
-
* @schemaFunctional
|
|
188
|
-
*/
|
|
189
|
-
export declare function lazyRef(cb: () => Type<any>): any;
|
|
190
|
-
export declare function enums(e: Record<string, any>): JsonSchema;
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { Type } from "@tsed/core";
|
|
2
|
-
import { JsonSchema } from "../domain/JsonSchema.js";
|
|
3
|
-
/**
|
|
4
|
-
* Create a new model from the given type.
|
|
5
|
-
*
|
|
6
|
-
* ```typescript
|
|
7
|
-
* from(String)
|
|
8
|
-
* ```
|
|
9
|
-
*
|
|
10
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
11
|
-
*
|
|
12
|
-
* @schemaFunctional
|
|
13
|
-
*/
|
|
14
|
-
export declare function from(type?: Type<any>): JsonSchema;
|
|
15
|
-
/**
|
|
16
|
-
* Declare a new number model.
|
|
17
|
-
*
|
|
18
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
19
|
-
*
|
|
20
|
-
* @schemaFunctional
|
|
21
|
-
*/
|
|
22
|
-
export declare function number(): JsonSchema;
|
|
23
|
-
/**
|
|
24
|
-
* Declare a new integer model.
|
|
25
|
-
*
|
|
26
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
27
|
-
*
|
|
28
|
-
* @schemaFunctional
|
|
29
|
-
*/
|
|
30
|
-
export declare function integer(): JsonSchema;
|
|
31
|
-
/**
|
|
32
|
-
* Declare a new string model.
|
|
33
|
-
*
|
|
34
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
35
|
-
*
|
|
36
|
-
* @schemaFunctional
|
|
37
|
-
*/
|
|
38
|
-
export declare function string(): JsonSchema;
|
|
39
|
-
/**
|
|
40
|
-
* Declare a new boolean model.
|
|
41
|
-
*
|
|
42
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
43
|
-
*
|
|
44
|
-
* @schemaFunctional
|
|
45
|
-
*/
|
|
46
|
-
export declare function boolean(): JsonSchema;
|
|
47
|
-
/**
|
|
48
|
-
* Declare a new string model with `format: date`.
|
|
49
|
-
*
|
|
50
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
51
|
-
*
|
|
52
|
-
* @schemaFunctional
|
|
53
|
-
*/
|
|
54
|
-
export declare function date(): JsonSchema;
|
|
55
|
-
/**
|
|
56
|
-
* Declare a new string model with `format: datetime`.
|
|
57
|
-
*
|
|
58
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
59
|
-
*
|
|
60
|
-
* @schemaFunctional
|
|
61
|
-
*/
|
|
62
|
-
export declare function datetime(): JsonSchema;
|
|
63
|
-
/**
|
|
64
|
-
* Declare a new string model with `format: time`.
|
|
65
|
-
*
|
|
66
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
67
|
-
*
|
|
68
|
-
* @schemaFunctional
|
|
69
|
-
*/
|
|
70
|
-
export declare function time(): JsonSchema;
|
|
71
|
-
/**
|
|
72
|
-
* Declare a new string model with `format: email`.
|
|
73
|
-
*
|
|
74
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
75
|
-
*
|
|
76
|
-
* @schemaFunctional
|
|
77
|
-
*/
|
|
78
|
-
export declare function email(): JsonSchema;
|
|
79
|
-
/**
|
|
80
|
-
* Declare a new string model with `format: uri`.
|
|
81
|
-
*
|
|
82
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
83
|
-
*
|
|
84
|
-
* @schemaFunctional
|
|
85
|
-
*/
|
|
86
|
-
export declare function uri(): JsonSchema;
|
|
87
|
-
/**
|
|
88
|
-
* Declare a new string model with `format: url`.
|
|
89
|
-
*
|
|
90
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
91
|
-
*
|
|
92
|
-
* @schemaFunctional
|
|
93
|
-
*/
|
|
94
|
-
export declare function url(): JsonSchema;
|
|
95
|
-
/**
|
|
96
|
-
* Declare a new object model with `additionalProperties: true`.
|
|
97
|
-
*
|
|
98
|
-
* ```json
|
|
99
|
-
* {
|
|
100
|
-
* "type": "array"
|
|
101
|
-
* }
|
|
102
|
-
* ```
|
|
103
|
-
*
|
|
104
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
105
|
-
*
|
|
106
|
-
* @schemaFunctional
|
|
107
|
-
*/
|
|
108
|
-
export declare function array(): JsonSchema;
|
|
109
|
-
/**
|
|
110
|
-
* Declare a new object model with `additionalProperties: true`.
|
|
111
|
-
*
|
|
112
|
-
* ```json
|
|
113
|
-
* {
|
|
114
|
-
* "type": "object",
|
|
115
|
-
* "additionalProperties": true
|
|
116
|
-
* }
|
|
117
|
-
* ```
|
|
118
|
-
*
|
|
119
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
120
|
-
*
|
|
121
|
-
* @schemaFunctional
|
|
122
|
-
*/
|
|
123
|
-
export declare function map(): JsonSchema;
|
|
124
|
-
/**
|
|
125
|
-
* Declare a new array model with `uniqueItems: true`.
|
|
126
|
-
*
|
|
127
|
-
* ```json
|
|
128
|
-
* {
|
|
129
|
-
* "type": "array",
|
|
130
|
-
* "uniqueItems": true
|
|
131
|
-
* }
|
|
132
|
-
* ```
|
|
133
|
-
*
|
|
134
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
135
|
-
*
|
|
136
|
-
* @schemaFunctional
|
|
137
|
-
*/
|
|
138
|
-
export declare function set(): JsonSchema;
|
|
139
|
-
/**
|
|
140
|
-
* Declare a new object model.
|
|
141
|
-
*
|
|
142
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
143
|
-
*
|
|
144
|
-
* @schemaFunctional
|
|
145
|
-
*/
|
|
146
|
-
export declare function object(properties?: {
|
|
147
|
-
[key: string]: JsonSchema;
|
|
148
|
-
}): JsonSchema;
|
|
149
|
-
/**
|
|
150
|
-
* Declare a model with any type (By default: `integer`, `number`, `string`, `boolean`, `array`, `object`, `null`)
|
|
151
|
-
*
|
|
152
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
153
|
-
*
|
|
154
|
-
* @schemaFunctional
|
|
155
|
-
*/
|
|
156
|
-
export declare function any(...types: any[]): JsonSchema;
|
|
157
|
-
/**
|
|
158
|
-
* See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27
|
|
159
|
-
*
|
|
160
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
161
|
-
*
|
|
162
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27
|
|
163
|
-
* @schemaFunctional
|
|
164
|
-
*/
|
|
165
|
-
export declare function anyOf(...anyOf: any[]): JsonSchema;
|
|
166
|
-
/**
|
|
167
|
-
* See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28
|
|
168
|
-
*
|
|
169
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
170
|
-
*
|
|
171
|
-
* @schemaFunctional
|
|
172
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28
|
|
173
|
-
*/
|
|
174
|
-
export declare function oneOf(...oneOf: any[]): JsonSchema;
|
|
175
|
-
/**
|
|
176
|
-
* See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26
|
|
177
|
-
*
|
|
178
|
-
* * See @@JsonSchema@@ to discover available methods.
|
|
179
|
-
*
|
|
180
|
-
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26
|
|
181
|
-
* @schemaFunctional
|
|
182
|
-
*/
|
|
183
|
-
export declare function allOf(...allOf: any[]): JsonSchema;
|
|
184
|
-
/**
|
|
185
|
-
* Declare a sub schema which will be resolved later. Use this function when you have a circular reference between two schemes.
|
|
186
|
-
*
|
|
187
|
-
* @schemaFunctional
|
|
188
|
-
*/
|
|
189
|
-
export declare function lazyRef(cb: () => Type<any>): any;
|
|
190
|
-
export declare function enums(e: Record<string, any>): JsonSchema;
|