dataclass_jsonschema

compas.data.dataclass_jsonschema(cls, filepath=None, draft=None)[source]

Generate a JSON schema for a COMPAS object class.

Parameters:
clscompas.data.Data

The COMPAS object class.

filepathstr, optional

The path to the file where the schema should be saved.

draftstr, optional

The JSON schema draft to use.

Returns:
dict

The JSON schema.