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

Ignore unknown fields #12

Merged
merged 2 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## UNRELEASED

# 0.1.17 - 2024-07-30
- Ignore unknown fields in JSON decoding

# 0.1.16 - 2024-07-09
- Support requests in camel case

Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
grpc-rest (0.1.16)
grpc-rest (0.1.17)
grpc
rails (>= 6.0)

Expand Down
2 changes: 1 addition & 1 deletion lib/grpc_rest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def map_proto_type(proto, params)

def init_request(request_class, params)
map_proto_type(request_class.descriptor, params)
request_class.decode_json(JSON.generate(params))
request_class.decode_json(JSON.generate(params), ignore_unknown_fields: true)
end

def assign_params(request, param_hash, body_string, params)
Expand Down
2 changes: 1 addition & 1 deletion lib/grpc_rest/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module GrpcRest
VERSION = '0.1.16'
VERSION = '0.1.17'
end
Loading