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: Remove unnecessary gogoproto.jsontag in the did.proto #177

Merged
merged 2 commits into from
Jul 9, 2021

Conversation

youngjoon-lee
Copy link
Contributor

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

Closes #176

We decided to not make our JSON response as the W3C JSON-LD format: #176 (comment).
But, I just refined the did.proto by removing some unnecessary tags.

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.

👍
Thank you. As long as the CI passes, it can be merged!

@youngjoon-lee
Copy link
Contributor Author

youngjoon-lee commented Jul 8, 2021

@gyuguen
4ead621 I fixed tests by using jsonpb.Unmarshal to read JSON files in the CLI. The json.Unmarshal expected snake_case because I removed (gogoproto.jsontag). Also, it doesn't handle custom types.

Let's think that the rule of thumb is using jsonpb.Unmarshal to unmarshal proto.Messages, regardless of the field names and custome type definitions. No exception anymore. That's also what Google recommends (like the art of abstraction).
We've went through a long journey, but I think this is the end of the story.

@gyuguen
Copy link
Contributor

gyuguen commented Jul 9, 2021

I fixed tests by using jsonpb.Unmarshal to read JSON files in the CLI. The json.Unmarshal expected snake_case because I removed (gogoproto.jsontag). Also, it doesn't handle custom types.

I'm checked.
Test passed well, so we can merge it. :)

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.

👍

@youngjoon-lee youngjoon-lee merged commit 4b41560 into master Jul 9, 2021
@youngjoon-lee youngjoon-lee deleted the ft/176/remove-tags branch July 9, 2021 00:20
@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.

Make DIDDocument returned with camelCase (for W3C specs)
2 participants