Commit 9a8cce10 authored by kzangeli's avatar kzangeli
Browse files

fix(018_10,018_13,019_13,019_16,019_24): keep objectType in normalized linked-entity join



Per ETSI NGSI-LD annex C.2.2.1.2 (inline) and C.2.2.1.3 (flattened), a
Relationship rendered in a normalized Linked-Entity join retains its
objectType alongside the added entity/entityList sub-attribute. The
normalized expectation files had dropped objectType; restore it. The
simplified variants are unaffected (simplified replaces the Relationship,
so objectType does not appear).

019_24 (POST-query mirror of 019_13) reuses the 019-13 expectation files
but fed building-relationship.jsonld (no objectType), so it only passed
while the shared expectation also lacked objectType. Align its input to
019_13's building-relationship-with-objectType.jsonld, matching the
stated intent that 019_24 has the same expectations as 019_13.

Co-Authored-By: default avatarClaude Opus 4.8 (1M context) <noreply@anthropic.com>
parent b638e4a7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ Test Template Query Entities With Joins And Representations


*** Variables ***
${linking_entity_filename}=     building-relationship.jsonld
${linking_entity_filename}=     building-relationship-with-objectType.jsonld
${linked_entity_filename}=      city-minimal.jsonld


+3 −2
Original line number Diff line number Diff line
@@ -4,7 +4,8 @@
    "type": "Building",
    "locatedAt": {
      "type": "Relationship",
      "object": "urn:ngsi-ld:City:Paris"
      "object": "urn:ngsi-ld:City:Paris",
      "objectType": "City"
    }
  },
  {
+2 −1
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
  "locatedAt": {
    "type": "Relationship",
    "object": "urn:ngsi-ld:City:Paris",
    "objectType": "City",
    "entity": {
      "id": "urn:ngsi-ld:City:Paris",
      "type": "City"
+5 −3
Original line number Diff line number Diff line
@@ -4,7 +4,8 @@
    "type": "Building",
    "locatedAt": {
      "type": "Relationship",
      "object": "urn:ngsi-ld:City:Paris"
      "object": "urn:ngsi-ld:City:Paris",
      "objectType": "City"
    }
  },
  {
@@ -12,7 +13,8 @@
    "type": "City",
    "locatedAt": {
      "type": "Relationship",
      "object": "urn:ngsi-ld:Country:France"
      "object": "urn:ngsi-ld:Country:France",
      "objectType": "Country"
    }
  },
  {
+3 −1
Original line number Diff line number Diff line
@@ -4,12 +4,14 @@
  "locatedAt": {
    "type": "Relationship",
    "object": "urn:ngsi-ld:City:Paris",
    "objectType": "City",
    "entity": {
      "id": "urn:ngsi-ld:City:Paris",
      "type": "City",
      "locatedAt": {
        "type": "Relationship",
        "object": "urn:ngsi-ld:Country:France",
        "objectType": "Country",
        "entity": {
          "id": "urn:ngsi-ld:Country:France",
          "type": "Country"
Loading