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

NGSI-LD Validate nested properties dynamically #301

Closed
Maghnie opened this issue Jul 10, 2024 · 1 comment
Closed

NGSI-LD Validate nested properties dynamically #301

Maghnie opened this issue Jul 10, 2024 · 1 comment
Assignees
Labels
feature request Request a potential feature NGSI-LD

Comments

@Maghnie
Copy link
Contributor

Maghnie commented Jul 10, 2024

Is your feature request related to a problem? Please describe.
Currently, only the first level of properties is validated. Validating further sublevels should be handled carefully because the number of property sublevels isn't known in advance.

Furthermore, properties can be singular or a list. But right now there's no explicit validation for these data types.

Describe the solution you'd like
Validate properties recursively, until all sublevels are exhausted. Implementing an artificial stopping condition could be useful to prevent the program from running forever, in case of unexpected input.

Also, check if the data type confirms to either a singular property or a list of properties.

Hint: To the functionality, this test entity can be used

self.entity_sub_props_dict = {
"id": "urn:ngsi-ld:Vehicle:test1243",
"type": "Vehicle",
"prop1": {
"type": "Property",
"value": 1,
"sub_property": {
"type": "Property",
"value": 10,
"sub_sub_property": {
"type": "Property",
"value": 100

Describe alternatives you've considered
Limit the validation to the outermost level of properties and log a message/warning that no further sublevels are validated.

@Maghnie Maghnie added feature request Request a potential feature NGSI-LD labels Jul 10, 2024
@Maghnie Maghnie self-assigned this Jul 10, 2024
@djs0109 djs0109 changed the title Validate nested properties dynamically NGSI-LD Validate nested properties dynamically Jul 10, 2024
@RWTH-EBC RWTH-EBC deleted a comment from github-actions bot Jul 10, 2024
@Maghnie
Copy link
Contributor Author

Maghnie commented Sep 3, 2024

Comments continued on the PR page: #320

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request a potential feature NGSI-LD
Projects
None yet
Development

No branches or pull requests

1 participant