update schema

This commit is contained in:
Matthew Rich 2025-08-25 03:12:08 +00:00
parent 59f66af792
commit 1e32bc7129
10 changed files with 117 additions and 7 deletions

View File

@ -3,6 +3,7 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "certificate",
"type": "object",
"required": [],
"properties": {
"publickey": {
"type": "string"

View File

@ -0,0 +1,9 @@
{
"$id": "constraints.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "constraints",
"type": "object",
"additionalProperties": {
"type": ["string", "number", "object", "array", "boolean", "null"]
}
}

View File

@ -0,0 +1,9 @@
{
"$id": "dependencies.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "dependencies",
"type": "object",
"additionalProperties": {
"$ref": "constraints.schema.json"
}
}

View File

@ -3,9 +3,26 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "document",
"type": "object",
"required": [
],
"required": [],
"properties": {
"source": {
"type": "string",
"description": "Document URI"
},
"format": {
"$ref": "codec.schema.json"
},
"requires": {
"$ref": "dependencies.schema.json"
},
"imports": {
"type": "array",
"description": "List of other documents to import",
"items": {
"type": "string",
"description": "Document URI"
}
},
"configurations": {
"type": "array",
"description": "Configurations list",
@ -31,6 +48,7 @@
{ "$ref": "iptable-declaration.schema.json" },
{ "$ref": "network-route-declaration.schema.json" },
{ "$ref": "openpgp-keyring-declaration.schema.json" },
{ "$ref": "openpgp-signature-declaration.schema.json" },
{ "$ref": "package-declaration.schema.json" },
{ "$ref": "pki-declaration.schema.json" },
{ "$ref": "user-declaration.schema.json" }

View File

@ -10,10 +10,22 @@
"description": "Resource type name.",
"enum": [ "file" ]
},
"transition": {
"$ref": "storagetransition.schema.json"
},
"config": {
"type": "string",
"description": "Config name"
},
"onerror": {
"type": "string",
"description": "error handling strategy",
"enum": [
"stop",
"fail",
"skip"
]
},
"attributes": {
"$ref": "file.schema.json"
}

View File

@ -8,7 +8,7 @@
"type": {
"type": "string",
"description": "Resource type name.",
"enum": [ "file" ]
"enum": [ "openpgp-keyring" ]
},
"config": {
"type": "string",

View File

@ -0,0 +1,21 @@
{
"$id": "openpgp-signature-declaration.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "openpgp-signature-declaration",
"type": "object",
"required": [ "type", "attributes" ],
"properties": {
"type": {
"type": "string",
"description": "Resource type name.",
"enum": [ "openpgp-signature" ]
},
"config": {
"type": "string",
"description": "Config name"
},
"attributes": {
"$ref": "openpgp-signature.schema.json"
}
}
}

View File

@ -0,0 +1,23 @@
{
"$id": "openpgp-signature.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "openpgp-signature",
"type": "object",
"required": [ ],
"properties": {
"signature": {
"type": "string",
"description": "ASCII-armored PGP signature"
},
"sourceref": {
"$ref": "ref.schema.json"
},
"keyringref": {
"$ref": "ref.schema.json"
},
"signatureref": {
"$ref": "ref.schema.json",
"description": "file content signature uri"
}
}
}

View File

@ -0,0 +1,17 @@
{
"$id": "ref.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ref",
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Type of object referred to",
"enum": [ "resource", "document" ]
},
"uri": {
"type": "string",
"description": "URI of the object referred to"
}
}
}