-
Notifications
You must be signed in to change notification settings - Fork 15
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
CBOR validation for type choice in array #116
Comments
Thanks for reporting @tomachristian! Indeed this is a bug as I have repro'd on my end. Will take a look at this. |
@tomachristian fixed in #117 and will be included in the |
Thank you @anweiss! I will have a try on it. I have quite a large protocol described with lots of CDDL and I am currently using the "official" gem for validating CDDL (the one mentioned from the spec), but it has lots of bugs and is outdated... I really really want to use your validator instead, so I will have another try with it, would you mind if I come back with other bugs? :) |
Sounds great!! Yes, no problem at all. The more feedback and bug reports, the better. I've been maintaining this crate myself for a few years now and only recently has there been more traction with CDDL, and thus, this crate has garnered more interest from folks in the community. |
CBOR is getting traction, so I think that is why CDDL is recently getting the same as well |
Hello @anweiss! I checked the fix and it works for the specific scenario outlined above, but there are still problems with CDDL
(Also tried without against the same input CBOR as above. The error message is similar to the previous one:
So I would say that this problem still exists with a similar effect even though the cause here might be different. PS: If you'd like, you can write some smoke tests and I can provide a lot of such scenarios (that would also protect the software from regressions). |
Also a bug. Will fix. |
Using the latest version at this point in time:
0.9.0-beta.1
.I am having a problem with validating CBOR
[18]
(hex:9F12FF
- regardless of definite/indefinite array) against CDDLtester = [18/12]
which should be valid.But I am getting:
and validating CBOR
[12]
(hex:9F0CFF
) against the same CDDL also yields:but validating CBOR
[12]
and[18]
against CDDLtester = [18//12]
works.According to the specification type choices should have worked, am I mistaken or is this something that is currently not supported in this package?
Thank you for your great work!
The text was updated successfully, but these errors were encountered: