bartkl / cim-to-linkml

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

Remove empty collections from schema #3

Closed bartkl closed 3 months ago

bartkl commented 3 months ago

Top-level packages that contain no classes and enums have empty keys for each:

enums:
classes:
subsets: {}

I'd rather have these removed.

bartkl commented 3 months ago

Is attributes: also a thing in schemas?

Yes there are:

  ModelToBeDeleted:
    name: ModelToBeDeleted
    attributes:
    class_uri: cim:ModelToBeDeleted
    is_a: IdentifiedObject
    description: A Model is a collection of Datasets.
    in_subset:
    - TC57CIM.IEC61970.InfIEC61970.InfPart303.NetworkModelFrames

In the Core.yaml file.

bartkl commented 3 months ago

Solved in writer.py during serialization since this is a display desire, not a data model question.