-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Signed-off-by: tdruez <[email protected]>
- Loading branch information
Showing
30 changed files
with
3,362 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# | ||
# Copyright (c) nexB Inc. and others. All rights reserved. | ||
# DejaCode is a trademark of nexB Inc. | ||
# SPDX-License-Identifier: AGPL-3.0-only | ||
# See https://github.com/aboutcode-org/dejacode for support or download. | ||
# See https://aboutcode.org for more information about AboutCode FOSS projects. | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
CSAF Models | ||
=========== | ||
|
||
Install the code generator | ||
-------------------------- | ||
|
||
$ pip install 'datamodel-code-generator[http]' | ||
|
||
Generate the models | ||
------------------- | ||
|
||
$ TARGET_PYTHON_VERSION=3.12 | ||
$ datamodel-codegen \ | ||
--input dejacode_toolkit/csaf/schema_v2.0/csaf_json_schema.json \ | ||
--output dejacode_toolkit/csaf/ \ | ||
--output-model-type pydantic_v2.BaseModel \ | ||
--input-file-type jsonschema \ | ||
--target-python-version $TARGET_PYTHON_VERSION \ | ||
--custom-file-header-path dejacode_toolkit/csaf/HEADER \ | ||
--use-schema-description \ | ||
--use-default-kwarg | ||
|
||
$ rm dejacode_toolkit/csaf/cvss_v2.py dejacode_toolkit/csaf/cvss_v3.py | ||
$ make valid |
Oops, something went wrong.