-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcrop.schema.json
93 lines (90 loc) · 2.66 KB
/
crop.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
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
{
"definitions": {
"flamelink_meta": {
"type": "object",
"properties": {
"schema": { "type": "string", "enum": ["crop"] },
"schemaType": { "type": "string" },
"locale": { "type": "string" },
"env": { "type": "string" },
"docId": { "type": "string" },
"fl_id": { "type": "string" }
},
"required": ["schema", "locale", "env", "docId", "fl_id"]
},
"tags": {
"type": ["string", "array"],
"maxLength": 0,
"items": { "type": "string" }
},
"status": {
"type": "string",
"enum": ["DRAFT", "PUBLISHED"]
},
"crop_type": {
"type": "string",
"enum": ["SINGLE", "ROTATION"]
},
"lo_hi": {
"type": "string",
"enum": ["LOW", "MEDIUM", "HIGH"]
},
"beg_adv": {
"type": "string",
"enum": ["BEGINNER", "INTERMEDIATE", "ADVANCED"]
},
"path_reference": {
"type": "object",
"properties": {
"_path": {
"type": "object",
"title": "Segments define a path to the firebase storage solutions",
"properties": {
"segments": {
"type": "array",
"items": { "type": "string" }
}
},
"required": ["segments"]
}
},
"required": ["_path"]
},
"image": {
"type": "array",
"title": "Path to the image in Cloud Store",
"items": { "$ref": "#/definitions/path_reference" }
},
"crop_stages": {
"type": "array",
"items": {
"type": "object",
"title": "Path to the crop stage in Firestore",
"properties": {
"cropStage": { "$ref": "#/definitions/path_reference" }
},
"required": ["cropStage"]
}
}
},
"type": "object",
"title": "Crop object",
"properties": {
"_fl_meta_": { "$ref": "#/definitions/flamelink_meta" },
"name": { "type": "string" },
"status": { "$ref": "#/definitions/status" },
"summary": { "type": "string" },
"cropType": { "$ref": "#/definitions/crop_type" },
"image": { "$ref": "#/definitions/image" },
"stages": { "$ref": "#/definitions/crop_stages" },
"complexity": { "$ref": "#/definitions/beg_adv" },
"waterRequirement": { "$ref": "#/definitions/lo_hi" },
"profitability": { "$ref": "#/definitions/lo_hi" },
"setupCost": { "$ref": "#/definitions/lo_hi" },
"companionPlants": { "$ref": "#/definitions/tags" },
"nonCompanionPlants": { "$ref": "#/definitions/tags" },
"cropsInRotation": { "$ref": "#/definitions/tags" },
"soilType": { "$ref": "#/definitions/tags" }
},
"required": ["name", "status", "summary", "cropType", "image", "_fl_meta_"]
}