forked from cla-assistant/cla-assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom-fields-schema.json
100 lines (99 loc) · 2.74 KB
/
custom-fields-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
94
95
96
97
98
99
100
{
"title": "JSON Schema for CLA assistant custom fields",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"patternProperties": {
"^[A-Za-z0-9]*$": {
"type": "object",
"description": "Each property describes additional data which should be collected from a CLA signer and generates a form field",
"properties": {
"title": {
"type": "string",
"description": "Title is used to create a label for the form field"
},
"type": {
"oneOf": [{
"enum": ["hidden", "string", "textarea", "number", "boolean"],
"description": "Field of type boolean generates a checkbox"
},
{
"type": "object",
"description": "Field of type enum generates radio buttons",
"properties": {
"enum": {
"type": "array",
"minItems": 2,
"items": {
"type": "string"
},
"uniqueItems": true
}
}
}
]
},
"required": {
"type": "boolean",
"description": "Required fields are marked with asterisk and must be filled by signer"
},
"description": {
"type": "string",
"description": "Field description generates small text behind the label"
},
"maximum": {
"type": "number",
"description": "Can be used for fields of type number"
},
"minimum": {
"type": "number",
"description": "Can be used for fields of type number"
},
"githubKey": {
"type": "string",
"description": "Data of github user profile can be used to prefill the form. This refers to the response of the github api https://developer.github.com/v3/users/#get-a-single-user"
}
},
"anyOf": [{
"properties": {
"type": {
"enum": ["hidden"]
},
"required": {
"enum": [false]
}
}
},
{
"properties": {
"type": {
"enum": ["string", "textarea", "number", "boolean"]
}
}
},
{
"properties": {
"type": {
"type": "object",
"properties": {
"enum": {
"type": "array"
}
}
}
}
}
],
"additionalProperties": false
}
},
"dependencies": {
"type": {
"properties": {
"required": {
"enum": [false]
}
}
}
},
"additionalProperties": false
}