-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtypeschema.json
More file actions
381 lines (381 loc) · 11.5 KB
/
Copy pathtypeschema.json
File metadata and controls
381 lines (381 loc) · 11.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
{
"definitions": {
"DefinitionType": {
"description": "The abstract base type for all schema definitions. It provides common metadata such as descriptions and deprecation status.",
"type": "struct",
"base": true,
"properties": {
"description": {
"description": "A brief explanation of the purpose and usage of this definition.",
"type": "string"
},
"type": {
"description": "The discriminator value used to identify the specific definition type.",
"type": "string"
},
"deprecated": {
"description": "Indicates whether this type is deprecated and should not be used in new implementations.",
"type": "boolean"
}
},
"discriminator": "type",
"mapping": {
"StructDefinitionType": "struct",
"MapDefinitionType": "map",
"ArrayDefinitionType": "array"
}
},
"StructDefinitionType": {
"description": "Represents an object with a fixed set of properties (such as a class or record). Supports inheritance and explicit property typing.",
"type": "struct",
"parent": {
"type": "reference",
"target": "DefinitionType"
},
"properties": {
"type": {
"type": "string",
"default": "struct"
},
"parent": {
"description": "A reference to another struct definition from which this struct inherits properties.",
"type": "reference",
"target": "ReferencePropertyType"
},
"base": {
"description": "When set to true, marks this struct as an abstract base type that cannot be instantiated directly.",
"type": "boolean"
},
"properties": {
"description": "A map of property names to their respective schema definitions.",
"type": "map",
"schema": {
"type": "reference",
"target": "PropertyType"
}
},
"discriminator": {
"description": "The property name used to determine the concrete subclass during deserialization.",
"type": "string"
},
"mapping": {
"description": "Maps discriminator field values to their corresponding definition names to support polymorphism.",
"type": "map",
"schema": {
"type": "string"
}
}
}
},
"CollectionDefinitionType": {
"description": "The abstract base type for collection definitions that contain multiple elements of a uniform type.",
"type": "struct",
"parent": {
"type": "reference",
"target": "DefinitionType"
},
"base": true,
"properties": {
"type": {
"description": "The collection type identifier (e.g., 'map' or 'array').",
"type": "string"
},
"schema": {
"description": "The schema definition for the elements or values contained in this collection.",
"type": "reference",
"target": "PropertyType"
}
},
"discriminator": "type",
"mapping": {
"MapDefinitionType": "map",
"ArrayDefinitionType": "array"
}
},
"MapDefinitionType": {
"description": "Represents a key-value map with dynamic key names where all values conform to the same schema.",
"type": "struct",
"parent": {
"type": "reference",
"target": "CollectionDefinitionType"
},
"properties": {
"type": {
"type": "string",
"default": "map"
}
}
},
"ArrayDefinitionType": {
"description": "Represents an ordered list of elements where every item conforms to the same schema.",
"type": "struct",
"parent": {
"type": "reference",
"target": "CollectionDefinitionType"
},
"properties": {
"type": {
"type": "string",
"default": "array"
}
}
},
"PropertyType": {
"description": "The abstract base type for all property definitions within a struct or collection.",
"type": "struct",
"base": true,
"properties": {
"description": {
"description": "Documentation explaining the purpose and usage of this property.",
"type": "string"
},
"type": {
"description": "The discriminator value used to identify the specific property type.",
"type": "string"
},
"deprecated": {
"description": "Indicates whether this property is deprecated and should no longer be used.",
"type": "boolean"
},
"nullable": {
"description": "Indicates whether this property accepts a null value.",
"type": "boolean"
}
},
"discriminator": "type",
"mapping": {
"StringPropertyType": "string",
"IntegerPropertyType": "integer",
"NumberPropertyType": "number",
"BooleanPropertyType": "boolean",
"MapPropertyType": "map",
"ArrayPropertyType": "array",
"AnyPropertyType": "any",
"GenericPropertyType": "generic",
"ReferencePropertyType": "reference"
}
},
"ScalarPropertyType": {
"description": "The abstract base type for simple scalar value properties (strings, integers, numbers, booleans).",
"type": "struct",
"parent": {
"type": "reference",
"target": "PropertyType"
},
"base": true,
"properties": {
"type": {
"description": "The specific scalar type name.",
"type": "string"
}
},
"discriminator": "type",
"mapping": {
"StringPropertyType": "string",
"IntegerPropertyType": "integer",
"NumberPropertyType": "number",
"BooleanPropertyType": "boolean"
}
},
"StringPropertyType": {
"description": "Represents a sequence of characters, with optional formatting rules.",
"type": "struct",
"parent": {
"type": "reference",
"target": "ScalarPropertyType"
},
"properties": {
"type": {
"type": "string",
"default": "string"
},
"format": {
"description": "Specifies a semantic format or hint for the string value (e.g., 'date-time', 'email', 'uri').",
"type": "string"
},
"default": {
"description": "The default string value to use if the property is omitted.",
"type": "string"
}
}
},
"IntegerPropertyType": {
"description": "Represents a whole number without fractional components.",
"type": "struct",
"parent": {
"type": "reference",
"target": "ScalarPropertyType"
},
"properties": {
"type": {
"type": "string",
"default": "integer"
}
}
},
"NumberPropertyType": {
"description": "Represents a numeric value, including floating-point and decimal numbers.",
"type": "struct",
"parent": {
"type": "reference",
"target": "ScalarPropertyType"
},
"properties": {
"type": {
"type": "string",
"default": "number"
}
}
},
"BooleanPropertyType": {
"description": "Represents a boolean true or false value.",
"type": "struct",
"parent": {
"type": "reference",
"target": "ScalarPropertyType"
},
"properties": {
"type": {
"type": "string",
"default": "boolean"
}
}
},
"CollectionPropertyType": {
"description": "The abstract base type for properties that define inline collections (maps or arrays).",
"type": "struct",
"parent": {
"type": "reference",
"target": "PropertyType"
},
"base": true,
"properties": {
"type": {
"description": "The collection type identifier.",
"type": "string"
},
"schema": {
"description": "The schema definition for the items contained within this collection property.",
"type": "reference",
"target": "PropertyType"
}
},
"discriminator": "type",
"mapping": {
"MapPropertyType": "map",
"ArrayPropertyType": "array"
}
},
"MapPropertyType": {
"description": "Represents a property containing a key-value map where all values share the same schema.",
"type": "struct",
"parent": {
"type": "reference",
"target": "CollectionPropertyType"
},
"properties": {
"type": {
"type": "string",
"default": "map"
}
}
},
"ArrayPropertyType": {
"description": "Represents a property containing a list of items that share the same schema.",
"type": "struct",
"parent": {
"type": "reference",
"target": "CollectionPropertyType"
},
"properties": {
"type": {
"type": "string",
"default": "array"
}
}
},
"AnyPropertyType": {
"description": "Represents a wildcard property that accepts any valid JSON value (object, array, string, number, boolean, or null).",
"type": "struct",
"parent": {
"type": "reference",
"target": "PropertyType"
},
"properties": {
"type": {
"type": "string",
"default": "any"
}
}
},
"GenericPropertyType": {
"description": "Represents a generic placeholder type that is resolved at runtime or via template arguments.",
"type": "struct",
"parent": {
"type": "reference",
"target": "PropertyType"
},
"properties": {
"type": {
"type": "string",
"default": "generic"
},
"name": {
"description": "The generic parameter name (e.g., 'T'), which is bound via the template map in a reference.",
"type": "string"
}
}
},
"ReferencePropertyType": {
"description": "Represents a reference to a type defined in the global definitions dictionary.",
"type": "struct",
"parent": {
"type": "reference",
"target": "PropertyType"
},
"properties": {
"type": {
"type": "string",
"default": "reference"
},
"target": {
"description": "The key of the target definition in the definitions map.",
"type": "string"
},
"template": {
"description": "Binds generic parameter names in the target definition to concrete definition names.",
"type": "map",
"schema": {
"type": "string"
}
}
}
},
"TypeSchema": {
"description": "The root document object containing namespace imports, type definitions, and the root entry point.",
"type": "struct",
"properties": {
"import": {
"description": "Maps namespace aliases to external TypeSchema document locations.",
"type": "map",
"schema": {
"type": "string"
}
},
"definitions": {
"description": "A dictionary mapping definition names to their respective schema definitions.",
"type": "map",
"schema": {
"type": "reference",
"target": "DefinitionType"
}
},
"root": {
"description": "The name of the primary entry-point definition for this schema.",
"type": "string"
}
}
}
},
"root": "TypeSchema"
}