1 |
7206db45
|
Wojtek Kosior
|
{
|
2 |
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
3 |
|
|
"$id": "https://hydrilla.koszko.org/schemas/api_resource_description-2.schema.json",
|
4 |
|
|
"title": "Resource description",
|
5 |
|
|
"description": "Definition of a Hydrilla resource, as served through HTTP API",
|
6 |
|
|
"allOf": [{
|
7 |
|
|
"$ref": "./common_definitions-2.schema.json#/definitions/resource_definition_base"
|
8 |
|
|
}, {
|
9 |
|
|
"$ref": "./common_definitions-2.schema.json#/definitions/item_definition"
|
10 |
|
|
}, {
|
11 |
|
|
"type": "object",
|
12 |
|
|
"required": ["$schema", "type"],
|
13 |
|
|
"properties": {
|
14 |
|
|
"$schema": {
|
15 |
|
|
"description": "Mark this instance as conforming to resource description schema 2.x",
|
16 |
|
|
"type": "string",
|
17 |
|
|
"pattern": "^https://hydrilla\\.koszko\\.org/schemas/api_resource_description-2\\.(([1-9][0-9]*|0)\\.)*schema\\.json$"
|
18 |
|
|
},
|
19 |
|
|
"type": {
|
20 |
|
|
"description": "Identify this item as a resource",
|
21 |
|
|
"const": "resource"
|
22 |
|
|
},
|
23 |
|
|
"scripts": {
|
24 |
|
|
"description": "Which files are resource's scripts and need to be installed",
|
25 |
|
|
"$ref": "./common_definitions-2.schema.json#/definitions/file_ref_list_sha256",
|
26 |
|
|
"default": []
|
27 |
|
|
},
|
28 |
|
|
"dependencies": {
|
29 |
|
|
"description": "Which other resources this resource depends on",
|
30 |
|
|
"$ref": "./common_definitions-2.schema.json#/definitions/item_dep_specifier_array",
|
31 |
|
|
"default": []
|
32 |
|
|
}
|
33 |
|
|
}
|
34 |
|
|
}]
|
35 |
|
|
}
|