update schema
This commit is contained in:
parent
59f66af792
commit
1e32bc7129
@ -3,6 +3,7 @@
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "certificate",
|
||||
"type": "object",
|
||||
"required": [],
|
||||
"properties": {
|
||||
"publickey": {
|
||||
"type": "string"
|
||||
@ -15,8 +16,8 @@
|
||||
},
|
||||
"SerialNumber": {
|
||||
"type": "integer",
|
||||
"description": "Serial number",
|
||||
"minLength": 1
|
||||
"description": "Serial number",
|
||||
"minLength": 1
|
||||
},
|
||||
"Issuer": {
|
||||
"$ref": "pkixname.schema.json"
|
||||
|
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#",
|
||||
"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" }
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -7,8 +7,8 @@
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "file path",
|
||||
"minLength": 1
|
||||
"description": "file path",
|
||||
"minLength": 1
|
||||
},
|
||||
"owner": {
|
||||
"type": "string"
|
||||
|
@ -8,7 +8,7 @@
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "Resource type name.",
|
||||
"enum": [ "file" ]
|
||||
"enum": [ "openpgp-keyring" ]
|
||||
},
|
||||
"config": {
|
||||
"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