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

[BUG-Javascript] npm package 'jsonschema' used in JsonValidation.js doesn't support "anyOf" propery #279

Closed
patrick-koenig opened this issue Dec 13, 2023 · 2 comments
Labels
Type: Bug Something is not working, and it is confirmed by maintainers to be a bug.

Comments

@patrick-koenig
Copy link

The npm package 'jsonschema' used for JSON-Schema validation in @nfdi4plants/arctrl/ISA/ISA.Json/Validation/JsonValidation.js doesn't support "anyOf" propery, which is used in several JSON Schemas of ISA.

See tdegrunt/jsonschema#388 for a corresponding issue raised in the Github repo of "jsonschema".

The affected JSON schemas of ISA are:

  • factor_value_schema.json
  • material_attribute_value_schema.json
  • ontology_annotation_schema.json
  • process_parameter_value_schema.json
  • process_schema.json

As an alternative, you could try Ajv (https://ajv.js.org), as this officially supports "anyOf": https://ajv.js.org/json-schema.html#anyof

@patrick-koenig patrick-koenig added the Type: Bug Something is not working, and it is confirmed by maintainers to be a bug. label Dec 13, 2023
@Freymaurer
Copy link
Collaborator

Thanks for the feedback! I will look into this.

In case you want to help, you could adapt the following file to the new dependency. This would of great help!

@Freymaurer
Copy link
Collaborator

This was deemed not maintainable for the time being, we moves json schema validation to our unit tests to confirm our produced json is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something is not working, and it is confirmed by maintainers to be a bug.
Projects
None yet
Development

No branches or pull requests

2 participants