Skip to content

Commit

Permalink
Merge branch 'master' into request_context
Browse files Browse the repository at this point in the history
  • Loading branch information
yugui committed Jan 25, 2017
2 parents 71ed796 + a51e1d5 commit 44ee51f
Show file tree
Hide file tree
Showing 21 changed files with 786 additions and 249 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,15 @@ To use the same port for custom HTTP handlers (e.g. serving `swagger.json`), gRP
* Method parameters in request body
* Method parameters in request path
* Method parameters in query string
* Mapping streaming APIs to JSON streams
* Mapping HTTP headers with `Grpc-Metadata-` prefix to gRPC metadata
* Enum fields in path parameter (including repeated enum fields).
* Mapping streaming APIs to newline-delimited JSON streams
* Mapping HTTP headers with `Grpc-Metadata-` prefix to gRPC metadata (prefixed with `grpcgateway-`)
* Optionally emitting API definition for [Swagger](http://swagger.io).
* Setting [gRPC timeouts](http://www.grpc.io/docs/guides/wire.html) through inbound HTTP `Grpc-Timeout` header.

### Want to support
But not yet.
* bytes and enum fields in path parameter. #5
* bytes fields in path parameter. #5
* Optionally generating the entrypoint. #8
* `import_path` parameter

Expand All @@ -231,7 +232,9 @@ But patch is welcome.
* HTTP request source IP is added as `X-Forwarded-For` gRPC request header
* HTTP request host is added as `X-Forwarded-Host` gRPC request header
* HTTP `Authorization` header is added as `authorization` gRPC request header
* Remaining HTTP header keys are prefixed with `Grpc-Metadata-` and added with their values to gRPC request header
* Remaining Permanent HTTP header keys (as specified by the IANA [here](http://www.iana.org/assignments/message-headers/message-headers.xhtml) are prefixed with `grpcgateway-` and added with their values to gRPC request header
* HTTP headers that start with 'Grpc-Metadata-' are mapped to gRPC metadata (prefixed with `grpcgateway-`)
* While configurable, the default {un,}marshaling uses [jsonpb](https://godoc.org/github.com/golang/protobuf/jsonpb) with `OrigName: true`.

# Contribution
See [CONTRIBUTING.md](http://github.com/grpc-ecosystem/grpc-gateway/blob/master/CONTRIBUTING.md).
Expand Down
2 changes: 1 addition & 1 deletion examples/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"gulp-shell": "^0.5.2",
"jasmine": "^2.4.1",
"phantomjs": "^2.1.7",
"swagger-client": "^2.1.14",
"swagger-client": "^2.1.28",
"webpack-stream": "^3.2.0"
}
}
2 changes: 1 addition & 1 deletion examples/clients/abe/ABitOfEverythingNested.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
)

type ABitOfEverythingNested struct {
Amount int64 `json:"amount,omitempty"`
Name string `json:"name,omitempty"`
Amount int64 `json:"amount,omitempty"`
Ok NestedDeepEnum `json:"ok,omitempty"`

}
38 changes: 19 additions & 19 deletions examples/clients/abe/ExamplepbABitOfEverything.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@ import (
)

type ExamplepbABitOfEverything struct {
BoolValue bool `json:"bool_value,omitempty"`
DoubleValue float64 `json:"double_value,omitempty"`
EnumValue ExamplepbNumericEnum `json:"enum_value,omitempty"`
Fixed32Value int64 `json:"fixed32_value,omitempty"`
Fixed64Value string `json:"fixed64_value,omitempty"`
SingleNested ABitOfEverythingNested `json:"single_nested,omitempty"`
Uuid string `json:"uuid,omitempty"`
Nested []ABitOfEverythingNested `json:"nested,omitempty"`
FloatValue float32 `json:"float_value,omitempty"`
Int32Value int32 `json:"int32_value,omitempty"`
DoubleValue float64 `json:"double_value,omitempty"`
Int64Value string `json:"int64_value,omitempty"`
MapValue map[string]ExamplepbNumericEnum `json:"map_value,omitempty"`
MappedNestedValue map[string]ABitOfEverythingNested `json:"mapped_nested_value,omitempty"`
MappedStringValue map[string]string `json:"mapped_string_value,omitempty"`
Nested []ABitOfEverythingNested `json:"nested,omitempty"`
NonConventionalNameValue string `json:"nonConventionalNameValue,omitempty"`
OneofEmpty ProtobufEmpty `json:"oneof_empty,omitempty"`
OneofString string `json:"oneof_string,omitempty"`
RepeatedStringValue []string `json:"repeated_string_value,omitempty"`
Uint64Value string `json:"uint64_value,omitempty"`
Int32Value int32 `json:"int32_value,omitempty"`
Fixed64Value string `json:"fixed64_value,omitempty"`
Fixed32Value int64 `json:"fixed32_value,omitempty"`
BoolValue bool `json:"bool_value,omitempty"`
StringValue string `json:"string_value,omitempty"`
Uint32Value int64 `json:"uint32_value,omitempty"`
EnumValue ExamplepbNumericEnum `json:"enum_value,omitempty"`
Sfixed32Value int32 `json:"sfixed32_value,omitempty"`
Sfixed64Value string `json:"sfixed64_value,omitempty"`
SingleNested ABitOfEverythingNested `json:"single_nested,omitempty"`
Sint32Value int32 `json:"sint32_value,omitempty"`
Sint64Value string `json:"sint64_value,omitempty"`
StringValue string `json:"string_value,omitempty"`
RepeatedStringValue []string `json:"repeated_string_value,omitempty"`
OneofEmpty ProtobufEmpty `json:"oneof_empty,omitempty"`
OneofString string `json:"oneof_string,omitempty"`
MapValue map[string]ExamplepbNumericEnum `json:"map_value,omitempty"`
MappedStringValue map[string]string `json:"mapped_string_value,omitempty"`
MappedNestedValue map[string]ABitOfEverythingNested `json:"mapped_nested_value,omitempty"`
NonConventionalNameValue string `json:"nonConventionalNameValue,omitempty"`
TimestampValue time.Time `json:"timestamp_value,omitempty"`
Uint32Value int64 `json:"uint32_value,omitempty"`
Uint64Value string `json:"uint64_value,omitempty"`
Uuid string `json:"uuid,omitempty"`

}
Loading

0 comments on commit 44ee51f

Please sign in to comment.