Skip to content

Commit 90bf6bb

Browse files
authored
docs: add JSON schema for upctl.yaml (#397)
Mostly following https://github.com/SchemaStore/schemastore/blob/master/CONTRIBUTING.md#best-practices Closes #385
1 parent 6d84a6f commit 90bf6bb

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

docs/upctl.schema.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"type": "object",
4+
"title": "upctl configuration schema",
5+
"description": "upctl is a command line client for UpCloud services.\nThe upctl.yaml file can be used to configure it.\nhttps://upcloudltd.github.io/upcloud-cli/",
6+
"properties": {
7+
"token": {
8+
"type": "string",
9+
"description": "Authentication token\nhttps://upcloudltd.github.io/upcloud-cli/#configure-credentials"
10+
},
11+
"username": {
12+
"type": "string",
13+
"description": "Authentication username\nhttps://upcloudltd.github.io/upcloud-cli/#configure-credentials"
14+
},
15+
"password": {
16+
"type": "string",
17+
"description": "Authentication password\nhttps://upcloudltd.github.io/upcloud-cli/#configure-credentials"
18+
},
19+
"client-timeout": {
20+
"type": "string",
21+
"description": "Client timeout duration\nhttps://pkg.go.dev/time#ParseDuration",
22+
"pattern": "^([0-9]+(h|m|[muµn]?s)?)+$"
23+
},
24+
"output": {
25+
"type": "string",
26+
"description": "Output format",
27+
"enum": [
28+
"human",
29+
"yaml",
30+
"json"
31+
],
32+
"default": "human"
33+
}
34+
},
35+
"additionalProperties": false
36+
}

0 commit comments

Comments
 (0)