From ffef4542b68d74fb400f7b1505d77c1d6b291f17 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 17 Dec 2023 21:08:08 +0100 Subject: [PATCH 1/6] Add support to discovering instance staff --- schemas/2.2/example.json | 14 ++++++++++++++ schemas/2.2/schema.json | 41 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/schemas/2.2/example.json b/schemas/2.2/example.json index 7999895..97bf1fb 100644 --- a/schemas/2.2/example.json +++ b/schemas/2.2/example.json @@ -3,6 +3,20 @@ "instance": { "name": "New FIđť‘“F" }, + "support": { + "contacts": [ + { + "account": "ordnung", + "email": "contact@diasp.example", + "role": "admin" + }, + { + "email": "security@diasp.example", + "role": "security" + } + ], + "support_page": "https://diasp.example/support.html" + }, "software": { "name": "diaspora", "version": "0.5.0", diff --git a/schemas/2.2/schema.json b/schemas/2.2/schema.json index c30e8ad..ca8aefb 100644 --- a/schemas/2.2/schema.json +++ b/schemas/2.2/schema.json @@ -8,6 +8,7 @@ "required": [ "version", "instance", + "support", "software", "protocols", "services", @@ -34,6 +35,46 @@ } } }, + "support": { + "description": "Support information of an instance.", + "type": "object", + "additionalProperties": false, + "properties": { + "contacts": { + "description": "Support contacts of an instance.", + "type":"array", + "items": { + "description": "Support contact", + "type": "object", + "minProperties": 2, + "additionalProperties": false, + "properties": { + "account": { + "description": "The account identifier in this instance belonging to the contact.", + "type": "string", + "pattern": "^.{0,500}$" + }, + "email": { + "description": "Email belonging to the contact.", + "type": "string", + "pattern": "^.{0,500}$" + }, + "role": { + "description": "Informal description of what the contact is used for. Common roles are 'admin', 'moderator', 'security'.", + "type": "string", + "pattern": "^.{0,500}$" + } + } + } + }, + "support_page": { + "description": "Specify a affiliated page of the instance to give users help.", + "type": "string", + "format": "uri", + "pattern": "^https?://" + } + } + }, "software": { "description": "Metadata about server software in use.", "type": "object", From a7a25e7b2d8d37cca183bba99f92b2f7d43cbba4 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 20 Mar 2024 22:09:26 +0100 Subject: [PATCH 2/6] new idea --- schemas/2.2/example.json | 20 ++++++++++++++------ schemas/2.2/schema.json | 39 +++++++++++++++++++++++++++++++-------- 2 files changed, 45 insertions(+), 14 deletions(-) diff --git a/schemas/2.2/example.json b/schemas/2.2/example.json index 97bf1fb..d060a6f 100644 --- a/schemas/2.2/example.json +++ b/schemas/2.2/example.json @@ -6,16 +6,24 @@ "support": { "contacts": [ { - "account": "ordnung", - "email": "contact@diasp.example", - "role": "admin" + "account": "ordnung", + "email": "contact@diasp.example", + "role": "admin" }, { - "email": "security@diasp.example", - "role": "security" + "email": "security@diasp.example", + "role": "security" } ], - "support_page": "https://diasp.example/support.html" + "pages": [ + { + "url": "https://diasp.example/support.html" + }, + { + "url": "https://diasp.example/tos.html", + "type": "tos" + } + ] }, "software": { "name": "diaspora", diff --git a/schemas/2.2/schema.json b/schemas/2.2/schema.json index ca8aefb..cc834d6 100644 --- a/schemas/2.2/schema.json +++ b/schemas/2.2/schema.json @@ -41,8 +41,8 @@ "additionalProperties": false, "properties": { "contacts": { - "description": "Support contacts of an instance.", - "type":"array", + "description": "Support contacts of an instance. Where a user can initiate contact to.", + "type": "array", "items": { "description": "Support contact", "type": "object", @@ -62,16 +62,39 @@ "role": { "description": "Informal description of what the contact is used for. Common roles are 'admin', 'moderator', 'security'.", "type": "string", - "pattern": "^.{0,500}$" + "enum": [ + "admin", + "security", + "moderator" + ] } } } }, - "support_page": { - "description": "Specify a affiliated page of the instance to give users help.", - "type": "string", - "format": "uri", - "pattern": "^https?://" + "pages": { + "description": "Suport pages where an instance provide users information from.", + "type": "array", + "items": { + "type": "object", + "minProperties": 1, + "additionalProperties": false, + "required": ["url"], + "properties": { + "url": { + "type": "string", + "format": "uri", + "pattern": "^https?://" + }, + "type": { + "type": "string", + "enum": [ + "tos", + "coc", + "abuse" + ] + } + } + } } } }, From 32bf921cdc4cf3cb9ced5fbd54dbda203dbc1ca5 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 20 Mar 2024 22:14:26 +0100 Subject: [PATCH 3/6] require --- schemas/2.2/schema.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/schemas/2.2/schema.json b/schemas/2.2/schema.json index cc834d6..15133e3 100644 --- a/schemas/2.2/schema.json +++ b/schemas/2.2/schema.json @@ -48,6 +48,9 @@ "type": "object", "minProperties": 2, "additionalProperties": false, + "required": [ + "role" + ], "properties": { "account": { "description": "The account identifier in this instance belonging to the contact.", From 5f38eb165b8d374c3442b2307ea9aea061ecb4de Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 20 Mar 2024 22:53:24 +0100 Subject: [PATCH 4/6] more flat solution --- schemas/2.2/example.json | 34 +++++--------- schemas/2.2/schema.json | 97 +++++++++++++++------------------------- 2 files changed, 48 insertions(+), 83 deletions(-) diff --git a/schemas/2.2/example.json b/schemas/2.2/example.json index d060a6f..100b315 100644 --- a/schemas/2.2/example.json +++ b/schemas/2.2/example.json @@ -3,28 +3,18 @@ "instance": { "name": "New FIđť‘“F" }, - "support": { - "contacts": [ - { - "account": "ordnung", - "email": "contact@diasp.example", - "role": "admin" - }, - { - "email": "security@diasp.example", - "role": "security" - } - ], - "pages": [ - { - "url": "https://diasp.example/support.html" - }, - { - "url": "https://diasp.example/tos.html", - "type": "tos" - } - ] - }, + "support": [ + { + "address": "foo@example.org", + "type": "email", // account, website, ... + "purpose": "support" // security, abuse, ... + }, + { + "address": "https://diasp.example/support.html", + "type": "website", + "purpose": "support" + } + ], "software": { "name": "diaspora", "version": "0.5.0", diff --git a/schemas/2.2/schema.json b/schemas/2.2/schema.json index 15133e3..b107b36 100644 --- a/schemas/2.2/schema.json +++ b/schemas/2.2/schema.json @@ -36,67 +36,42 @@ } }, "support": { - "description": "Support information of an instance.", - "type": "object", - "additionalProperties": false, - "properties": { - "contacts": { - "description": "Support contacts of an instance. Where a user can initiate contact to.", - "type": "array", - "items": { - "description": "Support contact", - "type": "object", - "minProperties": 2, - "additionalProperties": false, - "required": [ - "role" - ], - "properties": { - "account": { - "description": "The account identifier in this instance belonging to the contact.", - "type": "string", - "pattern": "^.{0,500}$" - }, - "email": { - "description": "Email belonging to the contact.", - "type": "string", - "pattern": "^.{0,500}$" - }, - "role": { - "description": "Informal description of what the contact is used for. Common roles are 'admin', 'moderator', 'security'.", - "type": "string", - "enum": [ - "admin", - "security", - "moderator" - ] - } - } - } - }, - "pages": { - "description": "Suport pages where an instance provide users information from.", - "type": "array", - "items": { - "type": "object", - "minProperties": 1, - "additionalProperties": false, - "required": ["url"], - "properties": { - "url": { - "type": "string", - "format": "uri", - "pattern": "^https?://" - }, - "type": { - "type": "string", - "enum": [ - "tos", - "coc", - "abuse" - ] - } - } + "description": "Promote support information", + "type": "array", + "items": { + "type": "object", + "required": [ + "address", + "type", + "purpose" + ], + "additionalProperties": false, + "properties": { + "address": { + "type": "string", + "pattern": "^.{0,2000}$" + }, + "type": { + "type": "string", + "enum": [ + "email", + "account", + "website" + ] + }, + "purpose": { + "type": "string", + "enum": [ + "support", + "security", + "admin", + "abuse", + "about", + "donation", + "code_of_conduct", + "terms_of_service", + "privacy_policy" + ] } } } From 7434817072120b67424b55624f42d1e520d68bac Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 20 Mar 2024 22:54:25 +0100 Subject: [PATCH 5/6] fix + nit --- schemas/2.2/example.json | 4 ++-- schemas/2.2/schema.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/schemas/2.2/example.json b/schemas/2.2/example.json index 100b315..eae59db 100644 --- a/schemas/2.2/example.json +++ b/schemas/2.2/example.json @@ -6,8 +6,8 @@ "support": [ { "address": "foo@example.org", - "type": "email", // account, website, ... - "purpose": "support" // security, abuse, ... + "type": "email", + "purpose": "support" }, { "address": "https://diasp.example/support.html", diff --git a/schemas/2.2/schema.json b/schemas/2.2/schema.json index b107b36..4841475 100644 --- a/schemas/2.2/schema.json +++ b/schemas/2.2/schema.json @@ -23,7 +23,7 @@ "2.2" ] }, - "instance":{ + "instance": { "description": "Metadata specific to the instance. An instance is a the concrete installation of a software running on a server.", "type": "object", "additionalProperties": false, From 6501a14a128f598fffdc76b5466338dc5082c592 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sat, 30 Mar 2024 16:30:13 +0100 Subject: [PATCH 6/6] Update schemas/2.2/schema.json --- schemas/2.2/schema.json | 1 + 1 file changed, 1 insertion(+) diff --git a/schemas/2.2/schema.json b/schemas/2.2/schema.json index 4841475..1fd0753 100644 --- a/schemas/2.2/schema.json +++ b/schemas/2.2/schema.json @@ -68,6 +68,7 @@ "abuse", "about", "donation", + "moderation", "code_of_conduct", "terms_of_service", "privacy_policy"