From 90bf38a451fa5c09b795882b13a095df18a26b30 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sat, 10 Dec 2022 11:03:16 +0000 Subject: [PATCH] schemas/fcmaterials_json: Spec of in-array items needs to be correct python `jsonschema` raises no errors when you erroneously forget to wrap the specification of each "array" member in `"items": { ... }`. Closes #203 --- schemas/fcmaterials_journal-v1.0.json | 41 ++++++++++++++------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/schemas/fcmaterials_journal-v1.0.json b/schemas/fcmaterials_journal-v1.0.json index 26e4b88..4415fe2 100644 --- a/schemas/fcmaterials_journal-v1.0.json +++ b/schemas/fcmaterials_journal-v1.0.json @@ -75,27 +75,30 @@ "Items": { "type" : "array", - "required" : [ "id", "Name", "Price", "Stock", "Demand" ], - "properties" : { - "id" : { - "type" : "integer" + "items": { + "type" : "object", + "required" : [ "id", "Name", "Price", "Stock", "Demand" ], + "properties" : { + "id" : { + "type" : "integer" + }, + "Name": { + "type" : "string", + "minLength" : 1 + }, + "Price": { + "type" : "integer" + }, + "Stock": { + "type" : "integer" + }, + "Demand": { + "type" : "integer" + } }, - "Name": { - "type" : "string", - "minLength" : 1 - }, - "Price": { - "type" : "integer" - }, - "Stock": { - "type" : "integer" - }, - "Demand": { - "type" : "integer" + "patternProperties": { + "_Localised$" : { "$ref" : "#/definitions/disallowed" } } - }, - "patternProperties": { - "_Localised$" : { "$ref" : "#/definitions/disallowed" } } } }