From ae1f3a2da34195d0fbfe93573a06d03928a16820 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Tue, 30 Jul 2024 16:33:19 -0400 Subject: [PATCH] update `parent` schema to correctly reference `#entry` if in an array, move description to root of `parent` schema --- hayagriva.schema.json | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/hayagriva.schema.json b/hayagriva.schema.json index 56a7f420..11bb9f19 100644 --- a/hayagriva.schema.json +++ b/hayagriva.schema.json @@ -130,28 +130,31 @@ ] }, "parent": { + "description": "The item in which the item was published or to which it is strongly associated.", "anyOf": [ { - "$dynamicRef": "#entry" + "$dynamicRef": "#entry", + "$comment": "^ This references the `entry` schema defined above by the `$dynamicAnchor` keyword." }, { "type": "array", "items": { - "$ref": "entry" + "$dynamicRef": "#entry", + "$comment": "^ This references the `entry` schema defined above by the `$dynamicAnchor` keyword." }, "minItems": 1, "uniqueItems": true, - "description": "The item in which the item was published or to which it is strongly associated.", - "$comment": "^ This references the it's parent entry based on the `id`.", "examples": [ - { - "type": "Anthology", - "title": "Automata studies", - "editor": [ - "Shannon, C. E.", - "McCarthy, J." - ] - } + [ + { + "type": "Anthology", + "title": "Automata studies", + "editor": [ + "Shannon, C. E.", + "McCarthy, J." + ] + } + ] ] } ]