-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatatypes.definitions.schema.json
60 lines (60 loc) · 1.96 KB
/
datatypes.definitions.schema.json
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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/AmadlaOrg/common-json-schemas/master/datatypes.definitions.schema.json",
"title": "Data Types Definitions Schema",
"description": "Defines the definitions of different special data types.",
"$defs": {
"name": {
"type": "string",
"pattern": "^[a-zA-Z0-9_-]+$",
"description": "A non-empty string containing only letters, numbers, underscores, or hyphens."
},
"string_or_list": {
"oneOf": [
{
"type": "string",
"description": "A single string value."
},
{
"$ref": "#/$defs/list_of_strings",
"description": "A list of unique strings."
}
],
"description": "A data type that can be either a single string or a list of unique strings."
},
"list_of_strings": {
"type": "array",
"items": {
"type": "string",
"description": "Each item in the array must be a string."
},
"uniqueItems": true,
"description": "An array of unique strings."
},
"list_or_dict": {
"oneOf": [
{
"type": "object",
"patternProperties": {
".+": {
"type": ["string", "number", "boolean", "null"],
"description": "Values can be strings, numbers, booleans, or null."
}
},
"additionalProperties": false,
"description": "An object where each key is a non-empty string and each value is a string, number, boolean, or null."
},
{
"type": "array",
"items": {
"type": "string",
"description": "Each item in the array must be a string."
},
"uniqueItems": true,
"description": "An array of unique strings."
}
],
"description": "A data type that can be either a dictionary with specific value types or a list of unique strings."
}
}
}