From 289f4c2caf21de6b646b699d6a2e7ae5af054fe1 Mon Sep 17 00:00:00 2001 From: John D'Orazio Date: Fri, 20 May 2022 20:04:28 +0200 Subject: [PATCH] fix LitCalMetadata schema: obj not array --- schemas/LitCalMetadata.json | 215 ++++++++++++++++++------------------ 1 file changed, 106 insertions(+), 109 deletions(-) diff --git a/schemas/LitCalMetadata.json b/schemas/LitCalMetadata.json index a4d8bc89..c085099c 100644 --- a/schemas/LitCalMetadata.json +++ b/schemas/LitCalMetadata.json @@ -1,135 +1,132 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "type": "array", - "items": { - "$ref": "#/definitions/LitCalMetadata" + "type": "object", + "properties": { + "LitCalMetadata": { + "$ref": "#/definitions/LitCalMetadata" + } }, + "required": [ + "LitCalMetadata" + ], + "title": "LitCalMetadata", "definitions": { "LitCalMetadata": { "type": "object", "properties": { - "LitCalMetadata": { + "NationalCalendars": { "type": "object", - "properties": { - "NationalCalendars": { - "type": "object", - "propertyNames": { - "$ref": "https://litcal.org/api/dev/schemas/CommonDef.json#/definitions/Region" - }, - "patternProperties": { - "": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "DiocesanCalendars": { - "type": "object", - "patternProperties": { - "": { - "type": "object", - "properties": { - "nation": { - "$ref": "https://litcal.org/api/dev/schemas/CommonDef.json#/definitions/Region" - }, - "diocese": { - "type": "string" - }, - "group": { - "type": "string" - } - }, - "required": [ - "nation", - "diocese" - ] - } - } - }, - "DiocesanGroups": { + "propertyNames": { + "$ref": "https://litcal.org/api/dev/schemas/CommonDef.json#/definitions/Region" + }, + "patternProperties": { + "": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "DiocesanCalendars": { + "type": "object", + "patternProperties": { + "": { "type": "object", - "patternProperties": { - "": { - "type": "array", - "items": { - "type": "string" - } + "properties": { + "nation": { + "$ref": "https://litcal.org/api/dev/schemas/CommonDef.json#/definitions/Region" + }, + "diocese": { + "type": "string" + }, + "group": { + "type": "string" } - } - }, - "WiderRegions": { + }, + "required": [ + "nation", + "diocese" + ] + } + } + }, + "DiocesanGroups": { + "type": "object", + "patternProperties": { + "": { "type": "array", "items": { - "type": "string", - "enum": [ - "Africa", - "Alsace", - "Americas", - "Anatolia", - "Antarctica", - "Asia", - "Australasia", - "Central Africa", - "Central America", - "Europe", - "Indies", - "North Africa", - "Oceania", - "Scandinavia", - "South America", - "West Indies" - ] + "type": "string" } - }, - "RomanMissals": { + } + } + }, + "WiderRegions": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Africa", + "Alsace", + "Americas", + "Anatolia", + "Antarctica", + "Asia", + "Australasia", + "Central Africa", + "Central America", + "Europe", + "Indies", + "North Africa", + "Oceania", + "Scandinavia", + "South America", + "West Indies" + ] + } + }, + "RomanMissals": { + "type": "object", + "propertyNames": { + "$ref": "https://litcal.org/api/dev/schemas/CommonDef.json#/definitions/MissalDef" + }, + "patternProperties": { + "": { "type": "object", - "propertyNames": { - "$ref": "https://litcal.org/api/dev/schemas/CommonDef.json#/definitions/MissalDef" - }, - "patternProperties": { - "": { + "properties": { + "value": { + "$ref": "https://litcal.org/api/dev/schemas/CommonDef.json#/definitions/Missal" + }, + "name": { + "$ref": "https://litcal.org/api/dev/schemas/CommonDef.json#/definitions/MissalName" + }, + "sanctoraleFileName": { + "$ref": "https://litcal.org/api/dev/schemas/CommonDef.json#/definitions/MissalFileName" + }, + "yearLimits": { "type": "object", "properties": { - "value": { - "$ref": "https://litcal.org/api/dev/schemas/CommonDef.json#/definitions/Missal" + "sinceYear": { + "type": "integer" }, - "name": { - "$ref": "https://litcal.org/api/dev/schemas/CommonDef.json#/definitions/MissalName" - }, - "sanctoraleFileName": { - "$ref": "https://litcal.org/api/dev/schemas/CommonDef.json#/definitions/MissalFileName" - }, - "yearLimits": { - "type": "object", - "properties": { - "sinceYear": { - "type": "integer" - }, - "untilYear": { - "type": "integer" - } - }, - "required": [ "sinceYear" ] + "untilYear": { + "type": "integer" } }, - "required": [ - "value", - "name", - "sanctoraleFileName", - "yearLimits" - ] + "required": [ "sinceYear" ] } - } + }, + "required": [ + "value", + "name", + "sanctoraleFileName", + "yearLimits" + ] } } } - }, - "required": [ - "LitCalMetadata" - ], - "title": "LitCalMetadata" + } } } }