summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-08-17 21:24:11 +0200
committerWojtek Kosior <koszko@koszko.org>2022-08-17 21:24:11 +0200
commitd94ef4544faac662f49bed41700c9010804b2450 (patch)
treedef48a31e568866d6176f9ac0d11b3fad01ea99d
parent7206db45f277c10c34d1b7ed9bd35343ac742d30 (diff)
downloadhydrilla-json-schemas-d94ef4544faac662f49bed41700c9010804b2450.tar.gz
hydrilla-json-schemas-d94ef4544faac662f49bed41700c9010804b2450.zip
specify a schema for packages listing generated by HydrillaHEADmaster
-rw-r--r--api_package_list-2.schema.json44
-rw-r--r--api_package_list-2.schema.json.license5
2 files changed, 49 insertions, 0 deletions
diff --git a/api_package_list-2.schema.json b/api_package_list-2.schema.json
new file mode 100644
index 0000000..334586c
--- /dev/null
+++ b/api_package_list-2.schema.json
@@ -0,0 +1,44 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "https://hydrilla.koszko.org/schemas/api_package_list-2.0.1.schema.json",
+ "title": "Package list",
+ "description": "Object with lists of references to all known resources and all known mappings",
+ "type": "object",
+ "required": ["$schema", "resources", "mappings"],
+ "properties": {
+ "$schema": {
+ "description": "Mark this instance as conforming to package list schema 2.x",
+ "type": "string",
+ "pattern": "^https://hydrilla\\.koszko\\.org/schemas/api_package_list-2\\.(([1-9][0-9]*|0)\\.)*schema\\.json$"
+ },
+ "resources": {
+ "description": "References to all resources served by this Hydrilla instance",
+ "type": "array",
+ "items": {
+ "allOf": [{
+ "$ref": "./common_definitions-2.schema.json#/definitions/item_ref"
+ }, {
+ "type": "object",
+ "required": ["revision"],
+ "properties": {
+ "revision": {
+ "description": "Which revision of a packaging of given version of an upstream resource is this",
+ "type": "integer",
+ "minimum": 1
+ }
+ }
+ }]
+ }
+ },
+ "mappings": {
+ "description": "References to all mappings served by this Hydrilla instance",
+ "type": "array",
+ "items": {
+ "$ref": "./common_definitions-2.schema.json#/definitions/item_ref"
+ }
+ },
+ "generated_by": {
+ "$ref": "./common_definitions-2.schema.json#/definitions/generated_by"
+ }
+ }
+}
diff --git a/api_package_list-2.schema.json.license b/api_package_list-2.schema.json.license
new file mode 100644
index 0000000..f41d511
--- /dev/null
+++ b/api_package_list-2.schema.json.license
@@ -0,0 +1,5 @@
+SPDX-License-Identifier: CC0-1.0
+
+Copyright (C) 2022 Wojtek Kosior <koszko@koszko.org>
+
+Available under the terms of Creative Commons Zero v1.0 Universal.