From 7e5407f7e87851c66cf15c6e83c9dfc602e67e1f Mon Sep 17 00:00:00 2001 From: Lisa Dusseault Date: Wed, 26 Nov 2025 15:10:30 -0800 Subject: [PATCH 1/2] Adds a schemas directory and one schema so far, for the OCM Discovery response in section 5 --- schemas/ocm-discovery.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 schemas/ocm-discovery.json diff --git a/schemas/ocm-discovery.json b/schemas/ocm-discovery.json new file mode 100644 index 0000000..79a4c56 --- /dev/null +++ b/schemas/ocm-discovery.json @@ -0,0 +1 @@ +ocm-discovery.json From d6507182948ae9a88297f9f407c205ea7967e9c3 Mon Sep 17 00:00:00 2001 From: Lisa Dusseault Date: Fri, 28 Nov 2025 22:10:43 -0800 Subject: [PATCH 2/2] Add actual contents of schema file --- schemas/ocm-discovery.json | 102 ++++++++++++++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 1 deletion(-) diff --git a/schemas/ocm-discovery.json b/schemas/ocm-discovery.json index 79a4c56..d0df119 100644 --- a/schemas/ocm-discovery.json +++ b/schemas/ocm-discovery.json @@ -1 +1,101 @@ -ocm-discovery.json +{ + "title": "OCM API Discovery", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "apiVersion": { + "type": "string" + }, + "endPoint": { + "type": "string", + "format": "uri" + }, + "provider": { + "type": "string" + }, + "resourceTypes": { + "type": "array", + "items": { "$ref": "#/$defs/resourceType" } + }, + "capabilities": { + "type": "array", + "description": "Capabilities values of 'exchange-token', 'webdav-uri', 'protocol-object', 'invites', 'invite-wayf' defined in draft", + "items": { + "type": "string" + } + }, + "criteria": { + "type": "array", + "description": "Criteria values of 'http-request-signatures', 'token-exchange', 'denlyist' and 'allowlist' are defined in draft", + "items": { + "type": "string" + } + }, + "publicKey": { + "$ref": "#/$defs/publicKey" + }, + "inviteAcceptDialog": { + "type": "string", + "format": "uri" + }, + "tokenEndPoint": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "enabled", + "apiVersion", + "endPoint", + "resourceTypes" + ], + "$defs": { + "resourceType": { + "properties": { + "name": { + "type": "string" + }, + "shareTypes": { + "type": "array" + }, + "protocols": { "$ref": "#/$defs/protocols" } + }, + "required": ["name", "shareTypes", "protocols"] + }, + "protocols": { + "type": "object", + "minProperties": 1, + "description": "Additional protocols besides 'webdav', 'webapp' and 'datatx' may be defined.", + "properties": { + "webdav": { + "type": "string", + "pattern": "^/" + }, + "webapp": { + "type": "string", + "pattern": "^/" + }, + "datatx": { + "type": "string", + "pattern": "^/" + } + } + }, + "publicKey": { + "type": "object", + "properties": { + "keyId": { + "type": "string" + }, + "publicKeyPem": { + "type": "string" + } + }, + "required": ["keyId", "publicKeyPem" ] + + } + } +} \ No newline at end of file