-
Notifications
You must be signed in to change notification settings - Fork 11
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
[Question] @context and "name" attribute #1176
Comments
Hi @EliottPaillard, For the 1st point (
For the 2nd point (provided "@context" point):
For the 3rd point (
|
Hello @bobeal, About point 1 and 2 I understand well now, thank you for this! Regarding point 3 : And I do this request : And the response is: |
Hi @EliottPaillard, The provided context (https://smartdatamodels.org/context.jsonld) contains pieces of the NGSI-LD core context (look for all the terms starting with When Stellio receives the query, it looks at the provided context and thinks the NGSI-LD core context is already included in it since it finds many terms from the NGSI-LD core context. So it does not add it at the end as it should do when the core context is not provided and the JSON-LD compaction is not what you are expecting since some important definitions are missing. For instance, this one:
These contexts including (often outdated) pieces from the core context are really dangerous :( I'll think of a way we can better handle this in Stellio... |
Hey, I tried to manage this context problem by removing the incriminated elements. For example while trying to create this entity: |
Hi, The link you are using is not pointing to a GitHub page. For instance, for this raw context file that we have in one of our repository: https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/master/authorization/jsonld-contexts/authorization-compound.jsonld, the GitHub page version is: https://easy-global-market.github.io/ngsild-api-data-models/authorization/jsonld-contexts/authorization-compound.jsonld Tried to find it for your context but https://eliottpaillard.github.io/context/test.jsonld is giving me a 404. |
Hello.
I'm using Stellio 2.13.0
I POST this entity :
{
"id": "urn:ngsi-ld:Building:001",
"type": "Building",
"name": {
"type": "Property",
"value": "Eiffel Tower"
},
"subCategory": {
"type": "Property",
"value": "tourism"
},
"airQualityLevel": {
"type": "Property",
"value": 4,
"unitCode": "C62",
"observedAt": "2020-09-09T16:40:00.000Z"
},
"almostFull": {
"type": "Property",
"value": false
},
"@context": [
"https://smartdatamodels.org/context.jsonld",
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.7.jsonld"
]
}
Then when I want to retrieve it using:
GET -H "Accept: application/ld+json"
The "name" element become "ngsi-ld:name".
However none of user or core context have such an extended syntax. I thought it would be instead "https://uri.etsi.org/ngsi-ld/name" as it is in the provided user context. Why is this not the case? I did not find why in the API Specifications.
Also I expected the "@context" element to be like the provided one. Instead I have "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.8.jsonld". I believe this is related to Stellio and its version and not related to the context provided when the entity was created but I found it kinda curious actually. Again I did not find anything relevant about this behaviour in the specs but the provided examples with the same Accept header show the "@context" element as an array with an user and a core context.
At the same time, speaking about the "ngsi-ld:name" appearance, I experimented the aggregated methods for the temporal evolutions of entities. And the responses display them as "ngsi-ld:avg" or "ngsi-ld:max". I found it curious as well, and again I did not find in the specs apart one example showing "max" and "avg" in the response. Is this a normal behaviour though?
I hope I am understandable so you can enlighten me.
Thanks in advance
The text was updated successfully, but these errors were encountered: