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

Library - Validate CBOR structs according to the cddl schema for nodes/models misc #6690

Open
nazmulidris opened this issue Oct 20, 2023 · 3 comments
Assignees
Labels
Component: API ockam_api hacktoberfest Apply to issues you want contributors to help with help wanted Implementation: Rust

Comments

@nazmulidris
Copy link
Contributor

nazmulidris commented Oct 20, 2023

The ockam_api crate exchanges many structs with the Controller. Those structs are serialized using CBOR and should conform to the cddl schema.

Currently there are only a handful of structs tested for conformance to the schema:

The purpose of this issue is to complete the testing by:

  • adding more quickcheck properties similar to the ones above
  • adding missing schema.cddl definitions where necessary
  • additionally remove the lifetime annotations on structs, like this one (and replace CowStr<'a> with String)

To the following list of structs:

  • nodes/models/base/NodeStatus
  • nodes/models/credentials/GetCredentialRequest
  • nodes/models/credentials/PresentCredentialRequest
  • nodes/models/flow_controls/AddConsumer
  • nodes/models/forwarder/CreateForwarder
  • nodes/models/forwarder/ForwarderInfo
  • nodes/models/identity/LongIdentityResponse
  • nodes/models/identity/ShortIdentityResponse
  • nodes/models/policy/Policy
  • nodes/models/policy/PolicyList
  • nodes/models/policy/Expression

Note

Related epic: #6235


We love helping new contributors! ❤️
If you have questions or need help as you explore, please join us on Discord. If you're looking for other issues to contribute to, please checkout our good first issues.

@shautvast
Copy link
Contributor

did the first 2, looks easy enough. please assign

@mrinalwadhwa
Copy link
Member

@shautvast That's awesome, all yours.

Please let us know if your have any questions as you explore. You can also ask questions on the contributors discord https://discord.ockam.io

@shautvast
Copy link
Contributor

submitted PR #7169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: API ockam_api hacktoberfest Apply to issues you want contributors to help with help wanted Implementation: Rust
Projects
None yet
Development

No branches or pull requests

3 participants