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

Merged
merged 1 commit into from
Sep 27, 2024

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 mihailpw force-pushed the feature/fix-if-enum branch from 0e9b55d to e5be0c4 Compare March 4, 2024 07:42
@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

@mihailpw mihailpw requested a review from thekaveman September 27, 2024 09:57
@schnuerle schnuerle merged commit d90669a into openmobilityfoundation:main Sep 27, 2024
4 checks passed
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.

3 participants