diff --git a/inst/schema/outpack/README.md b/inst/schema/outpack/README.md index 852daa76..83ac244e 100644 --- a/inst/schema/outpack/README.md +++ b/inst/schema/outpack/README.md @@ -1,8 +1,8 @@ # Imported from outpack * Schema version 0.1.1 -* Imported on 2023-08-17 10:00:21.068664 -* From outpack @ ba2bb5bf44a56b3c0ce78128fa419375df109fe3 (main) +* Imported on 2024-07-10 10:46:08.587491 +* From outpack @ f521a290636c01c777d6550bca78e0a8e0f051f8 (main) Do not make changes to files here, they will be overwritten Run ./scripts/update_schemas to update diff --git a/inst/schema/outpack/git.json b/inst/schema/outpack/git.json index 5fe44ac2..9161b1fc 100644 --- a/inst/schema/outpack/git.json +++ b/inst/schema/outpack/git.json @@ -19,5 +19,6 @@ "type": "string" } } - } + }, + "required": ["url", "sha", "branch"] } diff --git a/inst/schema/outpack/metadata.json b/inst/schema/outpack/metadata.json index 85fd1272..7488e413 100644 --- a/inst/schema/outpack/metadata.json +++ b/inst/schema/outpack/metadata.json @@ -60,7 +60,7 @@ "properties": { "path": { "description": "The path of the file", - "type": "string" + "$ref": "relative-path.json" }, "hash": { "$ref": "hash.json" @@ -88,17 +88,16 @@ }, "files": { "type": "array", - "minItems": 1, "items": { "type": "object", "properties": { "here": { "description": "The path of the file in this packet", - "type": "string" + "$ref": "relative-path.json" }, "there": { "description": "The path of the file within the upstream packet", - "type": "string" + "$ref": "relative-path.json" } }, "required": ["here", "there"] diff --git a/inst/schema/outpack/relative-path.json b/inst/schema/outpack/relative-path.json new file mode 100644 index 00000000..1c27adee --- /dev/null +++ b/inst/schema/outpack/relative-path.json @@ -0,0 +1,9 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "File path", + "description": "A relative cross-platform file path", + "version": "0.1.1", + + "type": "string", + "pattern": "^([^<>:\"/\\\\|?*\\x00-\\x1f]+/)*[^<>:\"/\\\\|?*\\x00-\\x1f]+$" +}