You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, the gateway returns enum fields as strings in the JSON response.
Is there a way to configure it so that enums are returned as their numeric values instead?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Looking at Kong’s gRPC-Gateway plugin config reference:
https://developer.konghq.com/plugins/grpc-gateway/reference/
By default, the gateway returns enum fields as strings in the JSON response.
Is there a way to configure it so that enums are returned as their numeric values instead?
For example, in Apache APISIX you can do this with the enum_as_value option:
https://apisix.apache.org/docs/apisix/plugins/grpc-transcode/#options-for-pb_option
Is there an equivalent setting or workaround in Kong’s gRPC-Gateway?
Beta Was this translation helpful? Give feedback.
All reactions