update schema
This commit is contained in:
parent
59f66af792
commit
1e32bc7129
@ -3,6 +3,7 @@
|
|||||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
"title": "certificate",
|
"title": "certificate",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [],
|
||||||
"properties": {
|
"properties": {
|
||||||
"publickey": {
|
"publickey": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
9
internal/resource/schemas/constraints.schema.json
Normal file
9
internal/resource/schemas/constraints.schema.json
Normal 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"]
|
||||||
|
}
|
||||||
|
}
|
9
internal/resource/schemas/dependencies.schema.json
Normal file
9
internal/resource/schemas/dependencies.schema.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
@ -3,9 +3,26 @@
|
|||||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
"title": "document",
|
"title": "document",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [],
|
||||||
],
|
|
||||||
"properties": {
|
"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": {
|
"configurations": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"description": "Configurations list",
|
"description": "Configurations list",
|
||||||
@ -31,6 +48,7 @@
|
|||||||
{ "$ref": "iptable-declaration.schema.json" },
|
{ "$ref": "iptable-declaration.schema.json" },
|
||||||
{ "$ref": "network-route-declaration.schema.json" },
|
{ "$ref": "network-route-declaration.schema.json" },
|
||||||
{ "$ref": "openpgp-keyring-declaration.schema.json" },
|
{ "$ref": "openpgp-keyring-declaration.schema.json" },
|
||||||
|
{ "$ref": "openpgp-signature-declaration.schema.json" },
|
||||||
{ "$ref": "package-declaration.schema.json" },
|
{ "$ref": "package-declaration.schema.json" },
|
||||||
{ "$ref": "pki-declaration.schema.json" },
|
{ "$ref": "pki-declaration.schema.json" },
|
||||||
{ "$ref": "user-declaration.schema.json" }
|
{ "$ref": "user-declaration.schema.json" }
|
||||||
|
@ -10,10 +10,22 @@
|
|||||||
"description": "Resource type name.",
|
"description": "Resource type name.",
|
||||||
"enum": [ "file" ]
|
"enum": [ "file" ]
|
||||||
},
|
},
|
||||||
|
"transition": {
|
||||||
|
"$ref": "storagetransition.schema.json"
|
||||||
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Config name"
|
"description": "Config name"
|
||||||
},
|
},
|
||||||
|
"onerror": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "error handling strategy",
|
||||||
|
"enum": [
|
||||||
|
"stop",
|
||||||
|
"fail",
|
||||||
|
"skip"
|
||||||
|
]
|
||||||
|
},
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"$ref": "file.schema.json"
|
"$ref": "file.schema.json"
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"type": {
|
"type": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Resource type name.",
|
"description": "Resource type name.",
|
||||||
"enum": [ "file" ]
|
"enum": [ "openpgp-keyring" ]
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
23
internal/resource/schemas/openpgp-signature.schema.json
Normal file
23
internal/resource/schemas/openpgp-signature.schema.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
17
internal/resource/schemas/ref.schema.json
Normal file
17
internal/resource/schemas/ref.schema.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user