elixir-europe / MARS

Multi-Repository Data Submission using ISA-JSON
MIT License
5 stars 4 forks source link

BioSamples Repository services only accept ontology annotations. #40

Open xiaoranzhou opened 2 months ago

xiaoranzhou commented 2 months ago

The Lombok value type at this line only accepts ontology annotations: https://github.com/elixir-europe/MARS/blob/5d84a547598b50751615876429d19b66fce10255/repository-services/isajson-biosamples/src/main/java/com/elixir/biohackaton/ISAToSRA/model/Value.java#L8C6-L8C33

This causes an error when the submitted ISA-JSON is a number or string:

com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `com.elixir.biohackaton.ISAToSRA.model.Value` (although at least one Creator exists): no int/Int-argument constructor/factory method to deserialize from Number value

According to the ISA-JSON specification, the value can be "number," "string," or "ontology annotation": https://github.com/ISA-tools/isa-api/blob/972f4d81642eca30da5266b400b7cbd222c65848/isatools/resources/schemas/isa_model_version_1_0_schemas/core/process_parameter_value_schema.json#L15