From 0b16c89844a4731285e9c42b977a8c8bc8a61267 Mon Sep 17 00:00:00 2001 From: Raghd Hamzeh Date: Tue, 24 Oct 2023 12:11:14 -0400 Subject: [PATCH] chore: add store json schema --- src/schemas/store.json | 128 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 src/schemas/store.json diff --git a/src/schemas/store.json b/src/schemas/store.json new file mode 100644 index 0000000..7539a3b --- /dev/null +++ b/src/schemas/store.json @@ -0,0 +1,128 @@ +{ + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The store name" + }, + "model": { + "type": "string", + "description": "The Authorization Model" + }, + "model_file": { + "type": "string", + "description": "The Authorization Model" + }, + "tuples": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user": { + "type": "string", + "description": "The user" + }, + "relation": { + "type": "string", + "description": "The relation" + }, + "object": { + "type": "string", + "description": "The object" + } + } + } + }, + "tests": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The test name" + }, + "description": { + "type": "string", + "description": "The test description" + }, + "tuples": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user": { + "type": "string", + "description": "The user" + }, + "relation": { + "type": "string", + "description": "The relation" + }, + "object": { + "type": "string", + "description": "The object" + } + } + } + }, + "check": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user": { + "type": "string", + "description": "The user" + }, + "object": { + "type": "string", + "description": "The object" + }, + "assertions": { + "type": "object", + "patternProperties": { + "*": { + "type": "boolean" + } + } + } + } + } + }, + "list_objects": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user": { + "type": "string", + "description": "The user" + }, + "relation": { + "type": "string", + "description": "The relation" + }, + "type": { + "type": "string", + "description": "The object type" + }, + "assertions": { + "type": "object", + "patternProperties": { + "*": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } +} \ No newline at end of file