-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser-arguments-schema.json
More file actions
171 lines (171 loc) · 4.09 KB
/
user-arguments-schema.json
File metadata and controls
171 lines (171 loc) · 4.09 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "argspec-v1.0.2-user",
"title": "Argument Specification Schema",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"description": "The schema followed by the JSON file"
},
"program": {
"type": "string",
"description": "The name of the program"
},
"description": {
"type": "string",
"description": "A brief description of the program"
},
"longDescription": {
"type": "string",
"description": "A longer description of the program"
},
"licence": {
"type": "string",
"description": "The license text of the program. SIMPLY NAMING THE LICENSE IS NOT ENOUGH HERE"
},
"version": {
"type": "string",
"description": "The current version of the program"
},
"date": {
"type": "string",
"description": "The date when the program was most recently changed"
},
"seeAlso": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Program or library function name"
},
"manLocation": {
"type": "integer",
"description": "man section"
}
},
"required": [
"name",
"manLocation"
],
"additionalProperties": false
},
"description": "A list of references the reader of a man page may find useful"
},
"bugs": {
"type": "string",
"description": "A list of known bugs and how to report them"
},
"author": {
"type": "string",
"description": "Miscellaneous information about the program or author"
},
"args": {
"type": "array",
"items": {
"type": "object",
"properties": {
"short": {
"type": "string",
"description": "Concise variant of the argument (eg. -v)",
"pattern": "-[^\\s]"
},
"long": {
"type": "string",
"description": "Verbose variant of the argument (eg. --verbose)",
"pattern": "--[^\\s]+"
},
"metaDest": {
"type": "string",
"description": "A user-friendly name for the value, e.g. 'verbosity_level'"
},
"type": {
"type": "string",
"enum": [
"string",
"char",
"int",
"flag",
"help"
],
"description": "The type of the value or 'help' to output a help message and exit"
},
"default": {
"type": "string",
"description": "If left unspecified, the value taken by the argument"
},
"choices": {
"type": "array",
"items": {
"type": "string"
},
"description": "A set of values which may be taken by the argument. If omitted, values are unbounded"
},
"mandatory": {
"type": "boolean",
"description": "Indicates whether a omitting this argument would invalidate a call to the program",
"default": false
},
"help": {
"type": "string",
"description": "A short description of the argument"
}
},
"required": [
"help"
],
"anyOf": [
{
"required": [
"short"
]
},
{
"required": [
"long"
]
}
],
"additionalProperties": true
},
"uniqueItems": true,
"additionalProperties": false,
"description": "List of the arguments accepted by the program"
},
"autoGenerateSynopsis": {
"type": "boolean",
"default": true,
"description": "Specify whether a synopsis should be automatically generated---allows an entirely bespoke _examples_ section to replace the synopsis"
},
"examples": {
"type": "array",
"items": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "A brief description of the example case; what the input means and what the output means"
},
"input": {
"type": "string",
"description": "An input on the command line"
},
"output": {
"type": "string",
"description": "The output corresponding to the specified input"
}
},
"required": [
"input"
]
}
}
},
"required": [
"program",
"args"
],
"description": "A schema for generating documentation for arbitrary programs"
}