Skip to content

validation of optional metadata fields with "schema": "subschema.json" #42

@keara-soloway

Description

@keara-soloway

ID3A is unable to submit records that have no value for "sample_crystallographic_phases" even though their schema has "optional": true for that key.

The error message upon submitting the record below contains "missing keys [sample_crystallographic_phases.name sample_crystallographic_phases.space_group sample_crystallographic_phases.unit_cell]".

Example record:

{
  "facility": "CHESS",
  "cycle": "2026-1",
  "pi": "Lamberson",
  "btr": "lamberso-4806-a",
  "experimenters": "BeaverE, LambersonL, WalterG, ArringtonA, PollockM",
  "beamline": [
    "3A"
  ],
  "staff_scientist": [
    "ShanksKS",
    "DasA"
  ],
  "beamline_funding_partner": [
    "CHEXS_NSF"
  ],
  "cesr_conditions": [
    "9x5_bunch_mode"
  ],
  "insertion_device": [
    "CCU"
  ],
  "monochromator": [
    "multilayer_30A"
  ],
  "focusing": [
    "None"
  ],
  "beam_energy": 61.332,
  "detectors": [
    "dual_dexelas",
    "other"
  ],
  "experiment_type": [
    "scattering/diffraction"
  ],
  "technique": [
    "powder_diffraction"
  ],
  "in_situ": true,
  "mechanical_load_frame": [
    "Other"
  ],
  "supplementary_technique": [
    "other"
  ],
  "alignment": true,
  "data_location_raw": "/nfs/chess/id3a/2026-1/lamberso-4806-a/setup-1",
  "data_location_meta": "/nfs/chess/aux/metadata/cycles/2026-1/id3a/lamberso-4806-a/setup-1",
  "data_location_reduced": "/nfs/chess/aux/reduced_data/cycles/2026-1/id3a/lamberso-4806-a/setup-1",
  "data_location_scratch": "/nfs/chess/scratch/cycles/2026-1/id3a/lamberso-4806-a/setup-1",
  "data_location_beamtime_notes": "/nfs/chess/aux/cycles/2026-1/id3a/lamberso-4806-a/metadata/setup-1/setup-1_notebook.txt",
  "mechanical_test": false,
  "mechanical_test_type": [
    ""
  ],
  "mechanical_grips": [
    ""
  ],
  "calibration": false,
  "sample_name": "setup-1",
  "sample_common_name": "Ti64",
  "sample_geometry": "RAMSII tensile sample",
  "sample_mat_ped_heat_treatment": "None",
  "sample_mat_ped_processing_route": "None"
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions