forked from telefonicaid/fiware-orion
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge-Patch keyValues treats Object attributes as Property-of-Property #1262
Labels
Comments
Open
Fixed in PR #1285 |
Still failing on Build 1196 curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/entities/' \
-H 'Content-Type: application/json' \
-H 'Link: <http://context/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
--data-raw '{
"id": "urn:ngsi-ld:City:001",
"type": "City",
"temperature": {
"type": "Property",
"value": 25,
"unitCode": "CEL",
"observedAt": "2022-06-30T00:00:00.000Z"
},
"location": {
"type": "GeoProperty",
"value": {
"type": "Point",
"coordinates": [
28.955,
41.0136
]
}
},
"population": {
"type": "Property",
"value": 15840900,
"observedAt": "2022-12-31T00:00:00.000Z"
},
"address": {
"type": "Property",
"value": {
"streetAddress": "Kanlıca İskele Meydanı",
"addressRegion": "İstanbul",
"addressLocality": "Beşiktaş",
"postalCode": "12345"
}
},
"name": {
"type": "LanguageProperty",
"languageMap": {
"el": "Κωνσταντινούπολις",
"en": "Constantinople",
"tr": "İstanbul"
}
},
"runBy": {
"type": "Relationship",
"object": "urn:ngsi-ld:Adminstration:001"
}
}' curl -L -X PATCH 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001?options=keyValues' \
-H 'Link: <http://context/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
-H 'Content-Type: application/json' \
--data-raw '{
"temperature": 19,
"location": {
"type": "Point",
"coordinates": [
13.3505,
52.5146
]
},
"address": {
"addressLocality": "Beyoğlu",
"postalCode": "98765"
},
"runBy": "urn:ngsi-ld:Adminstration:Adalet_ve_Kalkınma_Partisi"
}'
curl -L -X GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001?attrs=address,temperature,location,runBy' \
-H 'Link: <http://context/json-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
-H 'Accept: application/json' "address": {
"type": "Property",
"value": {
"streetAddress": "Kanlıca İskele Meydanı",
"addressRegion": "İstanbul",
"addressLocality": "Beşiktaş",
"postalCode": "12345"
},
"addressLocality": {
"type": "Property",
"value": "Beyoğlu"
},
"postalCode": {
"type": "Property",
"value": "98765"
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create an entity with an Object property like Address:
Attempt to update with keyValues:
The subattributes are treated as Property-of-Property rather than part of the object. In normalized terms, this update should be considered as:
Not as
The text was updated successfully, but these errors were encountered: