From 903969c397916945bbd55fc0291b3ac9f4a19304 Mon Sep 17 00:00:00 2001 From: Clemens Vasters Date: Mon, 1 Dec 2025 08:30:44 +0100 Subject: [PATCH] Fix inconsistent ref usage in examples - Update set items example to wrap ref in type attribute - Update map values example to wrap ref in type attribute - Update choice examples to wrap ref in type attribute All examples now comply with the rule in section 3.4.1 that ref is only permitted inside the type attribute value. Fixes #21 --- draft-vasters-json-structure-core.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/draft-vasters-json-structure-core.md b/draft-vasters-json-structure-core.md index 65c2fd3..559128a 100644 --- a/draft-vasters-json-structure-core.md +++ b/draft-vasters-json-structure-core.md @@ -577,7 +577,7 @@ Example: ~~~ json { "type": "set", - "items": { "$ref": "#/Namespace/TypeName" } + "items": { "type": { "$ref": "#/Namespace/TypeName" } } } ~~~ @@ -603,7 +603,7 @@ Example: ~~~ json { "type": "map", - "values": { "$ref": "#/StringType" } + "values": { "type": { "$ref": "#/StringType" } } } ~~~ @@ -735,8 +735,8 @@ Example: "$extends": "#/definitions/Address", "selector": "addressType", "choices": { - "StreetAddress": { "$ref": "#/definitions/StreetAddress" }, - "PostOfficeBoxAddress": { "$ref": "#/definitions/PostOfficeBoxAddress" } + "StreetAddress": { "type": { "$ref": "#/definitions/StreetAddress" } }, + "PostOfficeBoxAddress": { "type": { "$ref": "#/definitions/PostOfficeBoxAddress" } } }, "definitions" : { "Address": {