Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation error on anyOf property #2277

Open
JoranHonig opened this issue Jan 20, 2025 · 0 comments
Open

Validation error on anyOf property #2277

JoranHonig opened this issue Jan 20, 2025 · 0 comments

Comments

@JoranHonig
Copy link

Describe the bug
Model generation seems to fail on anyOf, I encountered this issue for the SARIF spec:

To Reproduce

Used commandline:

wget https://raw.githubusercontent.com/oasis-tcs/sarif-spec/123e95847b13fbdd4cbe2120fa5e33355d4a042b/Schemata/sarif-schema-2.1.0.json
$ datamodel-codegen sarif-schema-2.1.0.json --output model.py
...
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 2 validation errors for JsonSchemaObject
properties -> anyOf
  value is not a valid dict (type=type_error.dict)
properties -> anyOf
  value could not be parsed to a boolean (type=type_error.bool)

Expected behavior
No errors 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant