From def7bd98e601baa469d7e20af18f03273b4d0859 Mon Sep 17 00:00:00 2001 From: Nikolay Pachkov Date: Sat, 16 Sep 2023 22:32:06 +0200 Subject: [PATCH] ktl-1171 fix: validation schema for universities.json --- data/schemas/universities.json | 36 +++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/data/schemas/universities.json b/data/schemas/universities.json index ef8e99b0685..c62de5ec6be 100644 --- a/data/schemas/universities.json +++ b/data/schemas/universities.json @@ -11,16 +11,24 @@ "type": "string" }, "courses": { - "type": "object", - "properties": { - "name": { - "type": "string" + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": [ + "string", + "null" + ], + "format": "uri" + } }, - "url": { - "type": "string" - } - }, - "additionalProperties": false + "required": ["name", "url"], + "additionalProperties": false + } }, "geo": { "type": "object", @@ -32,15 +40,11 @@ "type": "number" } }, + "required": ["lat", "lng"], "additionalProperties": false } }, - "additionalProperties": false, - "required": [ - "title", - "location", - "courses", - "geo" - ] + "required": ["title", "location", "courses", "geo"], + "additionalProperties": false } }