AllenNeuralDynamics / aind-metadata-entry-js

Metadata entry using javascript
https://metadata-entry.allenneuraldynamics.org
MIT License
1 stars 1 forks source link

Fix 139: Enable validation for discriminator keyword #150

Closed helen-m-lin closed 6 months ago

helen-m-lin commented 6 months ago

closes #139

  1. Enabled discriminator validation in the JSON Schema validator.
    • This ensures that validation is only done against selected option rather than all oneOf options (resolves the repeated errors for all fields).
    • Added pre-processing to conform to Ajv validator requirements (docs).
  2. Enabled liveOmit and omitExtraData in the RJSF props (docs).
    • This ensures that extra formData is not preserved when the selected option is changed (resolves the repeated must NOT have additional properties errors).
  3. Added unit tests as appropriate.