Order Independent YAML Schema Reference
Currently the order of the section definition in the YAML schema is used for the reference somehow.
If I make a schema
definitions:
name: Bug
sections:
A:
base_sections:
- nomad.datamodel.data.EntryData
quantities:
a:
type: str
m_annotations:
eln:
component: StringEditQuantity
upload it and create an instance of A
I get:
If I then modify the schema by adding a section B
definitions:
name: Bug
sections:
B:
base_sections:
- nomad.datamodel.data.EntryData
quantities:
b:
type: str
m_annotations:
eln:
component: StringEditQuantity
A:
base_sections:
- nomad.datamodel.data.EntryData
quantities:
a:
type: str
m_annotations:
eln:
component: StringEditQuantity
reupload the schema and reprocess. The instance of A
from before will now be referenced as type B
.
If I place the section B
below A
I don't get this behavior which I assume means that the reference somehow picks the section based on index (order) and not name.