sudorandom / protoc-gen-connect-openapi

Plugin for generating OpenAPIv3 from protobufs matching the Connect RPC interface
MIT License
102 stars 7 forks source link

Can ConnectRPC accept numbers and strings for enums? #2

Closed sudorandom closed 9 months ago

sudorandom commented 9 months ago

Answer the question in the title and make adjustments to the jsonschema to match.

sudorandom commented 9 months ago

If ConnectRPC does support both we should add an option to only show string enums

sudorandom commented 9 months ago

Okay, I tested this and ConnectRPC does accept both the integer value or a string value for enums. I will continue this issue by adding an option to hide the integer representation

sudorandom commented 9 months ago

I added the only-string-enum-values option