Skip to content
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

Cannot use the data model because of an invalid definition #23

Open
bobeal opened this issue Dec 20, 2023 · 9 comments
Open

Cannot use the data model because of an invalid definition #23

bobeal opened this issue Dec 20, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@bobeal
Copy link

bobeal commented Dec 20, 2023

Hi,

Since this morning and this commit 3df8a11, 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.

@bobeal bobeal added the bug Something isn't working label Dec 20, 2023
bobeal added a commit to easy-global-market/c2jn-data-models that referenced this issue Dec 23, 2023
bobeal added a commit to easy-global-market/c2jn-data-models that referenced this issue Dec 23, 2023
@albertoabellagarcia
Copy link
Contributor

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?

@bobeal
Copy link
Author

bobeal commented Jan 10, 2024

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)

@albertoabellagarcia
Copy link
Contributor

albertoabellagarcia commented Jan 10, 2024

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.

@albertoabellagarcia
Copy link
Contributor

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?

@bobeal
Copy link
Author

bobeal commented Jan 11, 2024

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 #23 (comment), 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:

Screenshot 2024-01-11 at 08 05 42

@albertoabellagarcia
Copy link
Contributor

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.

@albertoabellagarcia
Copy link
Contributor

@bobeal
Copy link
Author

bobeal commented Jan 26, 2024

Did a test with this context, it works!

@albertoabellagarcia
Copy link
Contributor

ok, then we are going to do it for all DM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants