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 discriminator support in validator and fix validation errors #151

Closed helen-m-lin closed 6 months ago

helen-m-lin commented 6 months ago

closes #139

  1. Enabled discriminator support in the JSON Schema validator so that validation is only done against currently selected option.
    • This resolves the "multiple errors for all fields" issue since validator was previously comparing against all possible options.
  2. Enabled liveOmit and omitExtraData in the RJSF props (docs).
    • This resolves must NOT have additional properties errors caused by extra formData being preserved when selected option is changed.
  3. Updated {} check in preProcessHelper() so that [] is not being included.
    • This resolves must NOT have additional properties errors caused by additional properties incorrectly added by the preprocessing logic.
  4. Updated unit tests as appropriate.