Skip to content
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

gateway add allowUnknownFields option #4377

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jaronnie
Copy link
Contributor

When I use the gateway framework, I found that when there is a field in the request body that does not exist in proto, an error will be reported as follows: error getting request data: message type hellopb.SayHelloRequest has no known field named name. So adding an option allowUnknownFields to fix it and passing in the value when calling the underlying grpcurl can solve the problem.

@jaronnie
Copy link
Contributor Author

@kevwan help review

Copy link

codecov bot commented Sep 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.03%. Comparing base (8690859) to head (2ead9b0).
Report is 145 commits behind head on master.

Additional details and impacted files
Files with missing lines Coverage Δ
gateway/internal/requestparser.go 100.00% <100.00%> (ø)
gateway/server.go 72.27% <100.00%> (+3.36%) ⬆️

... and 253 files with indirect coverage changes

@jaronnie
Copy link
Contributor Author

@kevwan really need this option, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant