From 59ff922568557b20654d8b0251411244bd3735c8 Mon Sep 17 00:00:00 2001 From: Carlgo11 Date: Fri, 2 Aug 2024 22:09:44 +0200 Subject: [PATCH] Remove contact element in APIv4 --- scripts/APIv4.js | 7 ------- tests/schemas/APIv4.json | 27 --------------------------- 2 files changed, 34 deletions(-) diff --git a/scripts/APIv4.js b/scripts/APIv4.js index 54cd9dcf9a4..d32e0523019 100644 --- a/scripts/APIv4.js +++ b/scripts/APIv4.js @@ -59,12 +59,6 @@ const processEntries = async (files) => { const data = await readJSONFile(file); const entry = data[Object.keys(data)[0]]; - // Rename contact.twitter to contact.x if it exists - if (entry.contact && entry.contact.twitter) { - entry.contact.x = entry.contact.twitter; - delete entry.contact.twitter; - } - // Add the main domain entry entries[entry.domain] = entry; @@ -93,7 +87,6 @@ const generateApi = async (entries) => { Object.entries(entries).map(async ([domain, entry]) => { const apiEntry = { methods: entry["tfa"], - contact: entry.contact, "custom-software": entry["custom-software"], "custom-hardware": entry["custom-hardware"], documentation: entry.documentation, diff --git a/tests/schemas/APIv4.json b/tests/schemas/APIv4.json index 6abf023381d..c6e54fea693 100644 --- a/tests/schemas/APIv4.json +++ b/tests/schemas/APIv4.json @@ -23,33 +23,6 @@ ] } }, - "contact": { - "type": "object", - "description": "Contact information for the service.", - "properties": { - "email": { - "type": "string", - "format": "email" - }, - "facebook": { - "type": "string", - "minLength": 1 - }, - "x": { - "type": "string", - "pattern": "^(\\w){1,15}$" - }, - "form": { - "type": "string", - "format": "uri" - }, - "language": { - "type": "string", - "pattern": "^[a-z]{2}$" - } - }, - "additionalProperties": false - }, "custom-software": { "type": "array", "description": "Custom software 2FA solutions used by the service.",