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

jsonpb convert int64 to integer instead of string #296

Closed
arun0009 opened this issue Jan 10, 2017 · 2 comments
Closed

jsonpb convert int64 to integer instead of string #296

arun0009 opened this issue Jan 10, 2017 · 2 comments

Comments

@arun0009
Copy link

// 64bit integer types are marshaled as string in the default JSONPb marshaler.
// TODO(yugui) Add an option to declare 64bit integers as int64.
I see the above comment in code., but just wondering is there a way to generate swagger docs with int64 proto type to integer instead of string?

@tmc
Copy link
Collaborator

tmc commented Jan 10, 2017

This is defined in the proto3->json mapping here https://developers.google.com/protocol-buffers/docs/proto3#json

@tmc
Copy link
Collaborator

tmc commented Jan 10, 2017

I'm not sure this is an appropriate change as we don't currently have a way to expose marshaler customization to the swagger generation path -- I'm open to an issue that represents that but until then I don't consider this a problem.

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

No branches or pull requests

2 participants