-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathperson-schema.tid
89 lines (88 loc) · 1.82 KB
/
person-schema.tid
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
title: $:/plugins/btheado/jsoneditor/person-schema.json
type: application/javascript
{
"title": "Person",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "First and Last name",
"minLength": 4,
"default": "Jeremy Dorn"
},
"age": {
"type": "integer",
"default": 25,
"minimum": 18,
"maximum": 99
},
"favorite_color": {
"type": "string",
"format": "color",
"title": "favorite color",
"default": "#ffa500"
},
"gender": {
"type": "string",
"enum": [
"male",
"female"
]
},
"location": {
"type": "object",
"title": "Location",
"properties": {
"city": {
"type": "string",
"default": "San Francisco"
},
"state": {
"type": "string",
"default": "CA"
},
"citystate": {
"type": "string",
"description": "This is generated automatically from the previous two fields",
"template": "{{city}}, {{state}}",
"watch": {
"city": "location.city",
"state": "location.state"
}
}
}
},
"pets": {
"type": "array",
"format": "table",
"title": "Pets",
"uniqueItems": true,
"items": {
"type": "object",
"title": "Pet",
"properties": {
"type": {
"type": "string",
"enum": [
"cat",
"dog",
"bird",
"reptile",
"other"
],
"default": "dog"
},
"name": {
"type": "string"
}
}
},
"default": [
{
"type": "dog",
"name": "Walter"
}
]
}
}
}