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

feat: implement credentialsets per spec section 802 #24

Merged
merged 1 commit into from
Nov 13, 2019

Conversation

technosophos
Copy link
Member

This provides a minimal implementation of the credentialset format.

Depends on #23

src/cnab.rs Outdated

/// The JSON Schemata describing the parameters
///
/// TODO: Should use a suitable Rust library as the target for this.
Copy link

@glyn glyn Nov 11, 2019

Choose a reason for hiding this comment

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

Was the intention to fix this TODO in this PR or later? If later, probably worth associating an issue with the TODO.

Copy link
Member Author

@technosophos technosophos Nov 11, 2019

Choose a reason for hiding this comment

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

Created #25

src/cnab.rs Outdated
#[serde(rename_all = "camelCase")]
pub struct Output {
/// An optional exhaustive list of actions producing this output
pub apply_to: Option<Vec<String>>,
Copy link

Choose a reason for hiding this comment

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

The corresponding Go type is just a slice of strings, so could we get away without Option here and use an empty vector to represent "not present"?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't have strong opinions about this one, but the Rust idiom seems to be to avoid allocating empty vectors if possible. I can go either way, though.

Copy link

Choose a reason for hiding this comment

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

Fair enough. Also it may be useful to distinguish between a provided empty list and the default.

@glyn
Copy link

glyn commented Nov 11, 2019

Needs rebasing, but not sure why github hasn't realised.

@radu-matei
Copy link
Member

radu-matei commented Nov 12, 2019

@glyn - most likely, GitHub didn't realise it needs a rebase because there's a branch protection setting to only allow up-to-date branches to be merged, which I just enabled.
(Specifically, I enabled 1 required review, passing checks, and branch must be up-to-date.)

Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
@technosophos
Copy link
Member Author

Is there something left that I need to do on this?

@technosophos technosophos merged commit 2c01696 into cnabio:master Nov 13, 2019
@technosophos technosophos deleted the feat/credentialset branch November 13, 2019 04:19
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

3 participants