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

Fix if-enum statement #46

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mihailpw
Copy link

@mihailpw mihailpw commented Mar 1, 2024

Seems like there are bugs in if statement
Demo: https://jsonschema.dev/s/ohogp

@mihailpw
Copy link
Author

mihailpw commented Mar 1, 2024

PTAL @schnuerle @thekaveman

Copy link
Collaborator

@thekaveman thekaveman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is a correct change:

event_types is an array with multiple different allowed values per mode and per vehicle_state.

enum restricts the value to a single option within the listed options.

contains restricts an array to contain one or more of the listed options.

@mihailpw
Copy link
Author

mihailpw commented Mar 4, 2024

@thekaveman thanks for your review. I agree with you and fixed my code. Please take a look again
The reason why I'm sure that current version is wrong because it raises an exception while I'm trying to validate the json object. I prepared the demo for you: https://programiz.pro/ide/python/NCTKKNMZFG

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

Successfully merging this pull request may close these issues.

None yet

2 participants