Skip to content

Commit 9b9925b

Browse files
committed
Replace dataclass by msgspec for OpenVEX models
Signed-off-by: tdruez <[email protected]>
1 parent 0f470c0 commit 9b9925b

File tree

8 files changed

+673
-186
lines changed

8 files changed

+673
-186
lines changed

dejacode_toolkit/openvex/README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
CSAF Models
2-
===========
1+
OpenVEX Models
2+
==============
33

44
Install the code generator
55
--------------------------
@@ -9,18 +9,13 @@ $ pip install 'datamodel-code-generator'
99
Generate the models
1010
-------------------
1111

12-
$ TARGET_PYTHON_VERSION=3.13
13-
14-
# --use-schema-description \
15-
# --use-field-description \
16-
1712
$ datamodel-codegen \
1813
--input dejacode_toolkit/openvex/openvex_json_schema_0.2.0.json \
1914
--output dejacode_toolkit/openvex/__init__.py \
20-
--output-model-type dataclasses.dataclass \
15+
--output-model-type msgspec.Struct \
2116
--input-file-type jsonschema \
22-
--target-python-version $TARGET_PYTHON_VERSION \
17+
--target-python-version 3.13 \
2318
--custom-file-header-path dejacode_toolkit/HEADER \
19+
--wrap-string-literal \
20+
--use-double-quotes \
2421
--disable-future-imports
25-
26-
$ make valid

0 commit comments

Comments
 (0)