bartkl / cim-to-linkml

Generates LinkML schemas for packages in the CIM information model.
0 stars 0 forks source link

Redundancy: name slot for all elements #7

Closed bartkl closed 3 months ago

bartkl commented 3 months ago
  PerLengthImpedance:
    name: PerLengthImpedance
    attributes:
      ACLineSegments:
        name: ACLineSegments
        range: ACLineSegment

Better might be:

  PerLengthImpedance:
    attributes:
      ACLineSegments:
        range: ACLineSegment
bartkl commented 3 months ago

Easy enough. In the Schema definition simply use the name field for the dict keys, and the sub named tuples (enums, classes, subsets) that exclude the name field.