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

Onto-ns expects entity in the "wrong" format #38

Closed
sygout opened this issue Sep 4, 2023 · 5 comments · Fixed by #40
Closed

Onto-ns expects entity in the "wrong" format #38

sygout opened this issue Sep 4, 2023 · 5 comments · Fixed by #40
Assignees
Labels
bug Something isn't working

Comments

@sygout
Copy link

sygout commented Sep 4, 2023

Some DLite entites are defined with an array of dimensions and an array of properties. onto-ns seems to expect that to be a dictionnary of dimensions or properties.

Test:

As it is, the problem is solved by converting the array to dictionnaries. It would be better if it can handle the array case.

@sygout sygout added the bug Something isn't working label Sep 4, 2023
@CasperWA
Copy link
Collaborator

Could you please give a reference to the array data model? What do to the arrays look like?

@sygout
Copy link
Author

sygout commented Sep 15, 2023

The references are the two examples of entities stored in the Atlas MongoDB as mentioned in the issue. I removed the one I created that were not working.

@sygout
Copy link
Author

sygout commented Sep 15, 2023

You can also have a look here https://gitlab.sintef.no/team40/demonstrators/mylittledemo-datamodel/-/tree/main/tests/data) and see the difference between premod_simple_ version 0.1 and 0.2

@CasperWA
Copy link
Collaborator

Ah, I meant more an example of the array data models, not the dict data models, which already exists. I'll take a look in GitLab links - cheers 👍

@CasperWA
Copy link
Collaborator

Hmm. Starting to implement this I was thinking: The models currently used in the service are only meant for the "returned" entities, i.e., not to validate the created entities.
Why not instead ensure the old SOFT5-style data models are converted to SOFT7-style models upon upload or on-the-fly between finding them in the backend and serving them?

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

Successfully merging a pull request may close this issue.

2 participants