Modify the jsonschema to make it compatible with datamodel-code-generator which is quite buggy.
- Remove $id
- Remove tags: and imports: prefix in $ref
pip install datamodel-code-generator
datamodel-codegen --input data/CVE_Record_Format.json --input-file-type jsonschema --output vdb/lib/cve_model --output-model-type pydantic_v2.BaseModel --target-python-version 3.10 --use-annotated --class-name CVE