grpc-gateway
grpc-gateway copied to clipboard
Fixed required body parameter when part of the proto message is path param
References to other Issues or PRs
Fixes #4666
Have you read the Contributing Guidelines?
Yes
Brief description of what is fixed or changed
If a message field (in the body) is marked as required and it contains a field which is part of the path parameters, then the OpenAPI Swagger object created does not show this message field as required. Inside the renderFieldAsDefinition
, code to getFieldBehaviorOption()
is added when path params exists so that the required property of the message field can be captured.