Skip to content

Simplified response blocks show a VocabProperty as a bare string - #32

Merged
jason-fox merged 1 commit into
FIWARE:NGSI-LDfrom
kzangeli:fix/expected-blocks-vocab
Sep 21, 2026
Merged

jason-fox merged 1 commit into
FIWARE:NGSI-LDfrom
kzangeli:fix/expected-blocks-vocab

Conversation

@kzangeli

Copy link
Copy Markdown

Every sensor 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, on the simplified format:

For each VocabProperty, a member whose key is the Property name (a term) and whose value is a JSON Object containing a single Attribute with a key called vocab where the value shall correspond to a VocabProperty vocab.

EXAMPLE 5 in that clause is "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.

Checkable against the page alone, no broker needed. Found by comparing documented responses against real ones at value level; the same defect is in tutorials.CRUD-Operations (#25).

🤖 Generated with Claude Code

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) <noreply@anthropic.com>
@jason-fox
jason-fox merged commit 5ac7168 into FIWARE:NGSI-LD Sep 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants