pepkit / pephub

A web API and database for biological sample metadata
https://pephub.databio.org
BSD 2-Clause "Simplified" License
13 stars 2 forks source link

Invalid schema error is not always informative #292

Open donaldcampbelljr opened 5 months ago

donaldcampbelljr commented 5 months ago

After @khoroshevskyi and I performed some manual testing validating a PEP with the bedboss schema, it appears that if a field is required AND has an enum it does not give an informative error if it fails validation: image

PEP used for Testing: https://pephub.databio.org/donaldcampbelljr/test_minimal_bedboss?tag=samples

From the bedboss schema: https://schema.databio.org/?namespace=pipelines&schema=bedboss

input_type:
  type: string
  description: "file format"
  enum: [ "bigWig", "bigBed", "bed", "wig", "bedGraph" ]

required:
  - sample_name
  - input_file
  - input_type
  - genome