Skip to content

Commit

Permalink
add json schema for batch config
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmood committed Jan 16, 2024
1 parent 602a5c3 commit 8e481c9
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions batch_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"description": "A whisper configure file for batch operations. Doc: https://github.com/ysmood/whisper",
"properties": {
"groups": {
"description": "Defines groups of members. The key is the group name, each name should start with '$'.",
"type": "object",
"patternProperties": {
"^\\$.+": {
"$ref": "#/$defs/group"
}
}
},
"admins": {
"description": "Defines the admin group. Members in this group can decrypt all the files.",
"$ref": "#/$defs/group"
},
"files": {
"description": "Defines the files to encrypt. The key is a file path or dir path, the value is the group name. The path should relative to the config file, and uses '/' as the path separator.",
"patternProperties": {
"": {
"$ref": "#/$defs/group"
}
}
},
"outDir": {
"description": "Defines the output directory for encrypted files. The path should relative to the config file, and uses '/' as the path separator.",
"type": "string"
}
},
"$defs": {
"group": {
"description": "Defines a group of members.",
"type": "array",
"items": {
"description": "Defines a member. It can be a github user id, ssh authorized_keys file path or url.",
"type": "string"
}
}
}
}

0 comments on commit 8e481c9

Please sign in to comment.