-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
allow protobuf well known types in params #400
Comments
Adds support for parsing the google.protobuf.Duration as well as native *time.Time and *time.Duration types in url query parameters. Helps grpc-ecosystem#400.
Adds support for parsing the google.protobuf.Duration as well as native *time.Time and *time.Duration types in url query parameters. Helps #400.
Right now, support for
|
Is this not implemented already? Also not sure I understand your comment @AlekSi, are you saying it should support the full range required by the openapi definition of a duration? It might be possible with some pre-json unmarshalling parsing. |
All I'm saying is that current handling is inconsistent. I see several options:
Options 3 and 4 are breaking changes, so probably some generator flag / protobuf option / runtime parameter would be required to use a new behavior. Personally, I would prefer |
What are we doing right now? I thought it was #3. |
This comment has been minimized.
This comment has been minimized.
That's how it works now: "59s": "59s",
"60s": "60s",
"61s": "61s",
"61" : "", // no suffix => error
"2m" : "120s",
"1h" : "3600s",
"1d" : "", // d suffix => error Suffixes |
I see. So #2 but without |
Yes, right now it is #2 without |
@AlekSi would you mind opening a new issue with this background as a feature request? I will close this one since we do support it. |
…em#693) Adds support for parsing the google.protobuf.Duration as well as native *time.Time and *time.Duration types in url query parameters. Helps grpc-ecosystem#400.
example: allow a google.protobuf.Duration in a get param.
The text was updated successfully, but these errors were encountered: