-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSB_Flowchart_Schema.yaml
107 lines (98 loc) · 3.52 KB
/
SB_Flowchart_Schema.yaml
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
# yaml-language-server: $schema=https://json-schema.org/draft/2020-12/schema
$schema: "https://json-schema.org/draft/2020-12/schema"
title: Schema with questions leading to results
description: >-
This schema can be used to describe a set questions and results.
For example an app can ask its user these questions in the defined order
and return or use the result afterwards.
This schema was originally created to define the SponsorBlock flowchart
(see https://github.com/cole8888/SponsorBlock-Flowchart) in a structural way.
line_endings: unix
type: object
properties:
info_bubbles:
type: object
title: List of informational bubbles for clarifying certain terminology
additionalProperties:
type: object
title: Title of the information bubble, should be the term to be clarified
description: Clarification of the term in the title.
required:
- title
- description
results:
type: object
title: List of results possible after answering some questions
additionalProperties:
type: object
title: Single result possible
description: >-
Some results might directly refer to a category, but this is not required.
If connected to a category, the user should still the result for verification purposes.
properties:
title:
type: string
title: Userfriendly title representing the result
description: >-
If this result is connected to a category, the title must be the userfriendly name of the category.
Otherwise the title should describe what the user should do next.
description:
type: string
title: Userfriendly description describing the result
description: >-
If this result is connected to a category, the description must describe the category.
Otherwise the description should precise the next actions the user should do.
category:
type: string
title: Category name in SponsorBlock
description: >-
If given, this must be a valid category name for SponsorBlock.
required:
- title
additionalProperties: false
questions:
type: object
additionalProperties:
type: object
title: Single question
properties:
text:
type: string
title: Userfriendly question text
answers:
type: array
title: All possible answers shown & selectable by the user
minItems: 2
uniqueItems: yes
items:
type: object
title: Single possible answer
properties:
text:
type: string
title: Userfriendly answer shown to user
description: >-
This can be as short as "Yes" or "No".
It must not refer to the target of the answer except it is required to know for answering the question.
target:
type: string
title: Type of target to go to when user answered with this
enum:
- question
- result
target_id:
type: string
title: Key of either a result or a question
required:
- text
- target
- target_id
additionalProperties: false
required:
- text
- answers
additionalProperties: false
required:
- results
- questions
additionalProperties: false