Grpc-gateway-map-null - gRPC Gateway test using nullable values in map

Overview

Demonstrate gRPC gateway behavior with nullable values in maps

Using grpc-gateway v2.7.2.

This is a simple service just echoing a map<string, google.protobuf.StringValue>.

Generated Go code is a map[string]*wrapperspb.StringValue, so the value could be nil.

In grpc-gateway version 2.0.0 or greater, passing null value in a JSON fails and does not set *wrapperspb.StringValue to nil :

In grpc-gateway version 1.16.0, passing null value in a JSON set *wrapperspb.StringValue to empty string "".

Reproduce issue

Checkout the right branch associated with the version of grpc-gateway (git checkout) :

  • master (v2.7.2)
  • v2.0.1
  • v1.16.0

Run server and run gateway :

make server
make gateway

Send a HTTP request with body :

{
  "aMap": {
    "someString": "test",
    "emptyString": "",
    "nullableString": null
  }
}

On version 2.7.2 and 2.0.1 :

$ make echo
{"code":3, "message":"proto: (line 1:70): invalid value for string type: null", "details":[]}

On version 1.16.0 :

$ make echo
{"aMap": {"someString": "test", "emptyString": "", "nullableString": ""}}
Optional-go - Library for conveniently and safely dealing with optional (nullable) values

Optional Go Library for conveniently and safely dealing with optional (nullable)

Adolfo Martinelli 2 Mar 18, 2022
Go based grpc - grpc gateway micro service example

go-grpc-gateway-server This repository provides an example for go based microservice. Go micro services developed based on gRPC protobuf's and also us

Suresh Yekasiri 0 Dec 8, 2021
The Durudex gateway combines all durudex services so that it can be used through a single gateway.

The Durudex gateway combines all durudex services so that it can be used through a single gateway.

null 11 May 7, 2022
Nhat Tran 0 Feb 10, 2022
Simple installation script for grpc-gateway

Grpc-Gateway-installation Grpc-gateway is a plugin of Google protocol buffer compiler, it reads the definitions from .proto file and generates a rever

null 0 Dec 16, 2021
GRPC - A client-server mockup, using gRPC to expose functionality.

gRPC This is a mockup application that I built to help me visualise and understand the basic concepts of gRPC. In this exchange, the client can use a

Fergal Bittles 0 Jan 4, 2022
Grpc-train - Train booking demo using gRPC

gRPC Demo: Train Booking Service Description Usage Contributing Development Tool

Fadi Asfour 0 Feb 6, 2022
Go-grpc-tutorial - Simple gRPC server/client using go

Simple gRPC server/client using go Run server go run usermgmt_server/usermgmt_

Renner Poveda 0 Feb 14, 2022
gRPC LRU-cache server and client with load test

gRPC k-v storage with LRU-cache server & client + load test. Specify LRU-cache capacity: server/cmd/app.go -> StorageCapacity go build ./server/cmd/*

Eldar Mamedov 0 Dec 26, 2021
null

chrome-webrtc-packet-log-parser Project status At this point the project is primerly intended to be used by checking it out and modifying main.go, how

Pro Emergotech Ltd. 25 Sep 23, 2021
This service is intented to collect data using grpc using Go lang backend and cassandra DB as storage

Go Data Collection This service is intented to collect data using grpc using Go lang backend and cassandra DB as storage. Dev Setup make test_env make

Daiem Ali 1 Apr 13, 2022
Log4Shell is a middleware plugin for Traefik which blocks JNDI attacks based on HTTP header values.

Log4Shell Mitigation Log4Shell is a middleware plugin for Traefik which blocks JNDI attacks based on HTTP header values. Related to the Log4J CVE: htt

Traefik Labs 32 Apr 17, 2022
Compute and print message digest hash values from stdin.

Compute and print message digest hash values from stdin.

null 0 Jan 31, 2022
A suite of gRPC debugging tools. Like Fiddler/Charles but for gRPC.

grpc-tools A suite of tools for gRPC debugging and development. Like Fiddler/Charles but for gRPC! The main tool is grpc-dump which transparently inte

Bradley Kemp 1.1k Apr 27, 2022
grpc-http1: A gRPC via HTTP/1 Enabling Library for Go

grpc-http1: A gRPC via HTTP/1 Enabling Library for Go This library enables using all the functionality of a gRPC server even if it is exposed behind a

StackRox 76 May 2, 2022
Server and client implementation of the grpc go libraries to perform unary, client streaming, server streaming and full duplex RPCs from gRPC go introduction

Description This is an implementation of a gRPC client and server that provides route guidance from gRPC Basics: Go tutorial. It demonstrates how to u

Joram Wambugu 0 Nov 24, 2021
Simple grpc web and grpc transcoding with Envoy

gRPC Web and gRPC Transcoding with Envoy This is a simple stand-alone set of con

null 0 Dec 25, 2021