-
Notifications
You must be signed in to change notification settings - Fork 84
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
issue while using "unique: true" for the sequence data type #196
Comments
Mkay, good catch. I think the error stems from 2 different places https://github.com/Grokzen/pykwalify/blob/master/pykwalify/core.py#L449 is where the errors is stored during parsing to later be added to the errors list. But when the iterator runs over this temporary lits here https://github.com/Grokzen/pykwalify/blob/master/pykwalify/core.py#L468 we run iteration over a dict and i guess you get out the keys only and in this case that would be the |
Thank you for looking into it & your immediate response. |
@MinalRajendra I can't give any estimate as i can't give this project to much of my free time right now. If you want a fix, the absolute fastest way is for you to test to modify the parts above i mentioned and submit a PR. Otherwise, maybe in Dec, most likley in Jan at this point |
Environment
Steps to Reproduce
test.yml
mydata:
name: 123
age: ABCD
hobbies: [cooking, painting, cooking]
validate_yml.py
python3 validate_yml.py
OUTPUT
Schema
Data
Expected Behavior
Expected data type of the error below is 'pykwalify.errors.SchemaError.SchemaErrorEntry'
error --> Value 'cooking' is not unique. Previous path: '/mydata/hobbies/0'. Path: '/mydata/hobbies/2'
Data Type of error is --> <class 'str'>
Observed Behavior
Data type is different than the other error data types
error --> Value 'cooking' is not unique. Previous path: '/mydata/hobbies/0'. Path: '/mydata/hobbies/2'
Data Type of error is --> <class 'str'>
The text was updated successfully, but these errors were encountered: