-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
'type' should be 'integer' for int64 #810
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
I signed it! |
CLAs look good, thanks! |
050db02
to
e75be2b
Compare
Codecov Report
@@ Coverage Diff @@
## master #810 +/- ##
======================================
Coverage 53.3% 53.3%
======================================
Files 30 30
Lines 3371 3371
======================================
Hits 1797 1797
Misses 1399 1399
Partials 175 175
Continue to review full report at Codecov.
|
This has been discussed before in #438, I don't think we will be changing this as it's fundamentally wrong when applied to JSON. See OAI/OpenAPI-Specification#704 for more discussion on this, but as the gRPC-Gateway works with JSON for swagger, we will not be changing this. |
I see very well. Thank you for explaing it. 🙇 |
According to OpenAPI 2.0 spec,
"type"
should be"integer"
forint64
, not"string"
cf: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types
so current protoc-gen-swagger generates invalid swagger file when
int64
is used.This PR fix this problem, just replace
"string"
by"integer"
.