dataModel.Transportation
dataModel.Transportation copied to clipboard
Cannot use the data model because of an invalid definition
Hi,
Since this morning and this commit https://github.com/smart-data-models/dataModel.Transportation/commit/3df8a11c7ec0ab5dca236f91ef6e0826ab2da304, all applications making use of this context are broken, the following error is raised: invalid type mapping: DateTime
. Guess it is missing the DateTime
definition.
I don't really understand what could be the problem because it is the very same as the NGSI-LD core context https://forge.etsi.org/rep/cim/NGSI-LD/-/blob/master/coreContext/ngsi-ld-core-context.jsonld. Could you provide us with more info. The previous version you mention here simply just not have this attribute. I don't see the issue of having both definitions with the same values. Could this be the problem?
I don't really understand what could be the problem because it is the very same as the NGSI-LD core context https://forge.etsi.org/rep/cim/NGSI-LD/-/blob/master/coreContext/ngsi-ld-core-context.jsonld.
As a side note, better stop using this very old core context (use at least the one from v1.3, it has breaking changes with previous versions and no breaking change, as far as I remember, since then).
Could you provide us with more info. The previous version you mention here simply just not have this attribute. I don't see the issue of having both definitions with the same values. Could this be the problem?
Think it is missing the definition of the DateTime
type (like in https://forge.etsi.org/rep/cim/NGSI-LD/-/blob/master/coreContext/ngsi-ld-core-context-v1.7.jsonld#L12)
I don't really understand what could be the problem because it is the very same as the NGSI-LD core context https://forge.etsi.org/rep/cim/NGSI-LD/-/blob/master/coreContext/ngsi-ld-core-context.jsonld.
As a side note, better stop using this very old core context (use at least the one from v1.3, it has breaking changes with previous versions and no breaking change, as far as I remember, since then).
OMG. Sorry for my mistake.
Could you provide us with more info. The previous version you mention here simply just not have this attribute. I don't see the issue of having both definitions with the same values. Could this be the problem?
Think it is missing the definition of the
DateTime
type (like in https://forge.etsi.org/rep/cim/NGSI-LD/-/blob/master/coreContext/ngsi-ld-core-context-v1.7.jsonld#L12) Let me explore with the new one what can be the problem.
What I see is that the contexts' files you were using have not observedAt at all, and now when one of these have an entry for observedAt we got a problem. But supposedly the URI for observedAt is the same as an updated core context. Can we explore that?
What I see is that the contexts' files you were using have not observedAt at all, and now when one of these have an entry for observedAt we got a problem. But supposedly the URI for observedAt is the same as an updated core context. Can we explore that?
Indeed, observedAt
is part of the NGSI-LD core context so we never add it in our domain contexts. And even if we did, that will be useless since, as stated by the JSON-LD specification: "If a term is redefined within a context, all previous rules associated with the previous definition are removed" (and the NGSI-LD core context shall always be treated as it had been originally placed in the last position).
As said in https://github.com/smart-data-models/dataModel.Transportation/issues/23#issuecomment-1884575256, the problem comes from the incorrect definition of the observedAt
term in the context. You can simply reproduce it if you try to use the context in the JSON-LD playground:
We are in the fixing process by using an extended core context version so the value of Date, Datetime, etc will be finally a URI.
Could you test these one https://github.com/smart-data-models/dataModel.Transportation/blob/master/context2.jsonld
Did a test with this context, it works!
ok, then we are going to do it for all DM.
please be patient with the approval of this change