From 8dd91e5cdd60e54c329f2caa8faeb9aa2b4eb8f0 Mon Sep 17 00:00:00 2001 From: kzangeli Date: Sat, 19 Sep 2026 14:40:43 +0200 Subject: [PATCH] fix: simplified blocks show a VocabProperty as a bare string Every TemperatureSensor and FillingLevelSensor on this page is created with "category": { "type": "VocabProperty", "vocab": "sensor" } but the three simplified-format response blocks show "category": "sensor" Clause 5.3.2.4 of the NGSI-LD API says that in simplified format a VocabProperty is represented as "a JSON Object containing a single Attribute with a key called vocab", and gives EXAMPLE 5: "gender": {"vocab": "Male"} A Property simplifies to its bare value; a VocabProperty keeps the `vocab` wrapper. The creation payloads on this page already have it right - only the expected output dropped it. Co-Authored-By: Claude Opus 5 (1M context) --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 74d7d39..33ddb28 100644 --- a/README.md +++ b/README.md @@ -315,7 +315,9 @@ curl -X GET \ "id": "urn:ngsi-ld:TemperatureSensor:001", "type": "TemperatureSensor", "description": "Temperature Gauge 1", - "category": "sensor", + "category": { + "vocab": "sensor" + }, "controlledProperty": "temperature", "temperature": 20 }, @@ -323,7 +325,9 @@ curl -X GET \ "id": "urn:ngsi-ld:TemperatureSensor:002", "type": "TemperatureSensor", "description": "Temperature Gauge 2", - "category": "sensor", + "category": { + "vocab": "sensor" + }, "controlledProperty": "temperature", "temperature": 21 }, @@ -430,7 +434,9 @@ The updated response including the `controlledAsset` attribute is shown below: "id": "urn:ngsi-ld:TemperatureSensor:001", "type": "TemperatureSensor", "description": "Temperature Gauge 1", - "category": "sensor", + "category": { + "vocab": "sensor" + }, "controlledProperty": "temperature", "temperature": 20, "controlledAsset": "urn:ngsi-ld:Building:farm001"