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: Use the protobuf oneof keyword for VerificationRelationship #169

Merged
merged 1 commit into from
Jul 8, 2021

Conversation

youngjoon-lee
Copy link
Contributor

@youngjoon-lee youngjoon-lee commented Jul 8, 2021

VerificationRelationship is a good place to use the protobuf oneof keyword, because it contains either a string or a VerificationMethod.

The current definition is old-fashioned that I implemented in Panacea v1.3.
The oneof is much more intuitive and much easier for client developers.

We don't need to worry about JSON <-> Protobuf, because we've already been relying on gogoproto.customtype.
Initially, I tried to remove the gogoproto.customtype, but the default behavior of jsonpb doesn't handle oneof stuff the way we want.
So, let's keep gogoproto.customtype. There's no choice in order to obey the W3C spec.

Copy link
Contributor

@gyuguen gyuguen left a comment

Choose a reason for hiding this comment

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

👍
I think it's a very nice way.

@youngjoon-lee youngjoon-lee merged commit 3a41553 into master Jul 8, 2021
@youngjoon-lee youngjoon-lee deleted the fix/na/oneof branch July 8, 2021 05:04
@youngjoon-lee youngjoon-lee added this to the v2.0.0 milestone Jul 12, 2021
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.

2 participants