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

Rebase Feature/oneof opt body #759

Conversation

Tommy-42
Copy link

a small rebase from master ( this one was really outdated )

yugui and others added 30 commits June 23, 2017 11:05
…arge registries (grpc-ecosystem#421)

Memoise calls to fullyQualifiedNameToSwaggerName for all registries ever seen instead of just the last one.
* Fallback to JSON name when matching URL parameter.
* Add tests using JSON name for URL param parsing.
* Add Handler method to pass in a client

Right now if you want to embed the JSON proxy into your service you end
up having to have a client talking to loopback which is messy. With this
API addition you can simply pass in something which implements the
client interface -- meaning you could wrap it yourself and return
directly (without all the loopback and serialization overhead).

Note that this does not apply interceptors and other gRPC
niceties. Please ensure your application doesn't need
interceptors before using this method.
In ESP, wrapped primitives in URL can also be parsed from seralized
string format of the primitive directly without ".value" field
reference. This PR changes URL parsing logic to conform with this
behavior.
…rpc-ecosystem#145)

Creates additional options that can be applied to RPCs and messages that provide additional information in the OpenAPIv2 spec. These new options allow for the inclusion of 

Swagger object information (maps to a .proto file):
 * `info`
 * `host`
 * `base_path`
 * `schemes`
 * `consumes`
 * `produces`
 * `external_docs`

Service information:
 * `tags`
 * `summary`
 * `description`
 * `external_docs`
 * `operation_id`
 * `consumes`
 * `produces`
 * `schemes`

Operation information (maps to a method):
 * `tags`
 * `summary`
 * `description`
 * `external_docs`
 * `operation_id`
 * `consumes`
 * `produces`
 * `schemes`

Schema information (maps to a message):
 * `json_schema`
 * `descriptor`
 * `read_only`
 * `external_docs`
 * `example`

Additionally:
* Change from 'Swagger: ' to 'OpenAPI: ' prefix.

It should also be relatively simple to add any field that is missing to the new OpenAPI proto objects.
If you provide a go_package, your wishes will be reflected in the grpc-gateway output.
With the addition of the delimiter interface users can now override the
delimiter in the stream. With this additional interface we want to
maintain compatibility-- namely we want to continue using a newline in
the event that the marshaler doesn't implement the new interface (for
backwards compatibility).

Fixes grpc-ecosystem#495
* Fix gen-swagger to support more well known types
This was generated with github_changelog_generator with the following
parameters:

git_remote=upstream
author=false
compare-link=false
user=grpc-ecosystem
project=grpc-gateway
issues=false
Go master contains the commit hash that it was built at (or some similar
token). Unfortunately our regexp that we were checking against had an
escaping error. `grep -q 1.9` instead of `grep -q 1\.9` which meant it
was matching 1[any character]2. The current golang master commit is

"go version devel +15bc0a129a Wed Jan 3 04:34:11 2018 +0000 linux/amd64"

Fixes by making the string A LOT more specific and escaping.
doroginin and others added 10 commits August 17, 2018 15:10
…pc-ecosystem#712)

Also:
* add flag `allow_repeated_fields_in_body` in `protoc-gen-grpc-gateway`
* add flag `json_names_for_fields` in `protoc-gen-swagger`
Related to grpc-ecosystem#322

Updated protoc-gen-swagger to output enum path parameters correctly

Updated protoc-gen-grpc-gateway to handle enum path parameters

Regenerated examples

Added pathenum proto for an externally imported enum example and verification

Added enum_helper.go to handle the lack of enum support in the swagger-codegen-cli 2.2.2 for Go, see swagger-api/swagger-codegen#5635

Fixed browser integration test cases

Updated bazel config

Fixed last, faulty bazel config

Updated integration test case to test both index == 0 and index > 0 for enums
This was failing in CI, hopefully this fixes it.
Added conversion functions for repeated path params
Updated bytes converter to support URL encoded base64 strings

Added support for repeated primitive path params in protoc-gen-grpc-gateway
Added support for repeated primitive path params in protoc-gen-swagger
Added --repeated_path_param_separator cmd line param to support setting separator to `csv`, `ssv`, `pipes` and `tsv`

Re-generated examples
Added ABitOfEverythingRepeated to validate repeated path parameter functionality
Added GetRepeatedQuery rpc endpoint
Updated browser tests to test GetRepeatedQuery rpc endpoint
Updated integration tests to test GetRepeatedQuery rpc endpoint
Added GetRepeatedQuery to ABitOfEverythingServer implementation

Added missing reflect.DeepEqual test

Change separator type from string to rune
Fixed slice duplication in string slice conversion method
Reverted --allowRepeatedFieldsInBody in swagger generator
Changed TODO of bytes slice proto2 function

Corrected if-statement releated to repeated fields in resolveFieldPath function

Rebase
Point users to the proto definition instead of Service Management API documentation. Latter is generated from former, and is more likely to be out of date.

Rephrase "custom options" to "google.api.http" annotation to be more straight forward.
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

@johanbrandhorst
Copy link
Collaborator

Hi @Tommy-42. It looks like something terrible has happened here. Are all these conflicts and changes really right?

@Tommy-42
Copy link
Author

hi @johanbrandhorst , I may have done something wrong :/

I've forked the grpc-gateway, checkout the branch feature/oneof-opt-body.

the next thing i've done is : git rebase origin/master to be able to get the last commit from the master branch

I've resolved some conflict and pushd. Am i missing something here ? ( I am usually doing this to update an old branch )

@johanbrandhorst
Copy link
Collaborator

Yeah I don't know how you ended up in this state but that sounds about right.. maybe try a poor mans rebase and just copy the changes you think it needs from the branch into a fresh branch? Don't worry about the generated changes since we can just regenerate the files.

@Tommy-42
Copy link
Author

oh my ... I found out why ... I don't why I used feature/oneof-opt-body instead of feature/oneof ... I am going fix that. thanks

@Tommy-42
Copy link
Author

I am going to close this one and reopen a new one when I will resolve the conflict

@Tommy-42 Tommy-42 closed this Sep 27, 2018
@Tommy-42 Tommy-42 deleted the feature/oneof-opt-body branch September 27, 2018 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.