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

Revert "Support HttpRule with field response" #730

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ required = [
revision = "6724a57986aff9bff1a1770e9347036def7c89f6"
name = "github.com/rogpeppe/fastuuid"

[[constraint]]
# Also defined in WORKSPACE
revision = "383e8b2c3b9e36c4076b235b32537292176bae20"
name = "google.golang.org/genproto"

[[override]]
# Also defined in WORKSPACE
revision = "eb3733d160e74a9c7e442f435eb3bea458e1d19f"
Expand All @@ -53,6 +48,12 @@ required = [
version = "1.10.3"
name = "google.golang.org/grpc"

[[constraint]]
# Also defined in bazelbuild/rules_go
# https://github.com/bazelbuild/rules_go/blob/436452edc29a2f1e0edc22d180fbb57c27e6d0af/go/private/repositories.bzl#L131
revision = "86e600f69ee4704c6efbf6a2a40a5c10700e76c2"
name = "google.golang.org/genproto"

[[constraint]]
# Also defined in bazelbuild/rules_go
# https://github.com/bazelbuild/rules_go/blob/436452edc29a2f1e0edc22d180fbb57c27e6d0af/go/private/repositories.bzl#L138
Expand Down
23 changes: 3 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,13 @@ endif
SWAGGER_EXAMPLES=examples/proto/examplepb/echo_service.proto \
examples/proto/examplepb/a_bit_of_everything.proto \
examples/proto/examplepb/wrappers.proto \
examples/proto/examplepb/unannotated_echo_service.proto \
examples/proto/examplepb/response_body_service.proto

examples/proto/examplepb/unannotated_echo_service.proto
EXAMPLES=examples/proto/examplepb/echo_service.proto \
examples/proto/examplepb/a_bit_of_everything.proto \
examples/proto/examplepb/stream.proto \
examples/proto/examplepb/flow_combination.proto \
examples/proto/examplepb/wrappers.proto \
examples/proto/examplepb/unannotated_echo_service.proto \
examples/proto/examplepb/response_body_service.proto

examples/proto/examplepb/unannotated_echo_service.proto
EXAMPLE_SVCSRCS=$(EXAMPLES:.proto=.pb.go)
EXAMPLE_GWSRCS=$(EXAMPLES:.proto=.pb.gw.go)
EXAMPLE_SWAGGERSRCS=$(SWAGGER_EXAMPLES:.proto=.swagger.json)
Expand Down Expand Up @@ -109,14 +105,7 @@ UNANNOTATED_ECHO_EXAMPLE_SRCS=$(EXAMPLE_CLIENT_DIR)/unannotatedecho/api_client.g
$(EXAMPLE_CLIENT_DIR)/unannotatedecho/configuration.go \
$(EXAMPLE_CLIENT_DIR)/unannotatedecho/examplepb_unannotated_simple_message.go \
$(EXAMPLE_CLIENT_DIR)/unannotatedecho/unannotated_echo_service_api.go
RESPONSE_BODY_EXAMPLE_SPEC=examples/proto/examplepb/response_body_service.swagger.json
RESPONSE_BODY_EXAMPLE_SRCS=$(EXAMPLE_CLIENT_DIR)/responsebody/api_client.go \
$(EXAMPLE_CLIENT_DIR)/responsebody/api_response.go \
$(EXAMPLE_CLIENT_DIR)/responsebody/configuration.go \
$(EXAMPLE_CLIENT_DIR)/responsebody/examplepb_response_body.go \
$(EXAMPLE_CLIENT_DIR)/responsebody/response_body_service_api.go

EXAMPLE_CLIENT_SRCS=$(ECHO_EXAMPLE_SRCS) $(ABE_EXAMPLE_SRCS) $(UNANNOTATED_ECHO_EXAMPLE_SRCS) $(RESPONSE_BODY_EXAMPLE_SRCS)
EXAMPLE_CLIENT_SRCS=$(ECHO_EXAMPLE_SRCS) $(ABE_EXAMPLE_SRCS) $(UNANNOTATED_ECHO_EXAMPLE_SRCS)
SWAGGER_CODEGEN=swagger-codegen

PROTOC_INC_PATH=$(dir $(shell which protoc))/../include
Expand Down Expand Up @@ -175,12 +164,6 @@ $(UNANNOTATED_ECHO_EXAMPLE_SRCS): $(UNANNOTATED_ECHO_EXAMPLE_SPEC)
@rm -f $(EXAMPLE_CLIENT_DIR)/unannotatedecho/README.md \
$(EXAMPLE_CLIENT_DIR)/unannotatedecho/git_push.sh \
$(EXAMPLE_CLIENT_DIR)/unannotatedecho/.travis.yml
$(RESPONSE_BODY_EXAMPLE_SRCS): $(RESPONSE_BODY_EXAMPLE_SPEC)
$(SWAGGER_CODEGEN) generate -i $(RESPONSE_BODY_EXAMPLE_SPEC) \
-l go -o examples/clients/responsebody --additional-properties packageName=responsebody
@rm -f $(EXAMPLE_CLIENT_DIR)/responsebody/README.md \
$(EXAMPLE_CLIENT_DIR)/responsebody/git_push.sh \
$(EXAMPLE_CLIENT_DIR)/responsebody/.travis.yml

examples: $(EXAMPLE_SVCSRCS) $(EXAMPLE_GWSRCS) $(EXAMPLE_DEPSRCS) $(EXAMPLE_SWAGGERSRCS) $(EXAMPLE_CLIENT_SRCS)
test: examples
Expand Down
31 changes: 11 additions & 20 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,42 @@ http_archive(
sha256 = "d03625db67e9fb0905bbd206fa97e32ae9da894fe234a493e7517fd25faec914",
)

load("@io_bazel_rules_go//go:def.bzl", "go_repository")
load("//:repositories.bzl", "repositories")
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")

# Also define in Gopkg.toml
go_repository(
name = "org_golang_google_genproto",
commit = "383e8b2c3b9e36c4076b235b32537292176bae20",
importpath = "google.golang.org/genproto",
)
go_rules_dependencies()

go_register_toolchains()

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")

gazelle_dependencies()

load("@io_bazel_rules_go//go:def.bzl", "go_repository")

# Also define in Gopkg.toml
go_repository(
name = "com_github_rogpeppe_fastuuid",
commit = "6724a57986aff9bff1a1770e9347036def7c89f6",
importpath = "github.com/rogpeppe/fastuuid",
)

# Also define in Gopkg.toml
go_repository(
name = "com_github_go_resty_resty",
commit = "f8815663de1e64d57cdd4ee9e2b2fa96977a030e",
importpath = "github.com/go-resty/resty",
)

# Also define in Gopkg.toml
go_repository(
name = "com_github_ghodss_yaml",
commit = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7",
importpath = "github.com/ghodss/yaml",
)

# Also define in Gopkg.toml
go_repository(
name = "in_gopkg_yaml_v2",
commit = "eb3733d160e74a9c7e442f435eb3bea458e1d19f",
importpath = "gopkg.in/yaml.v2",
)

repositories()

go_rules_dependencies()

go_register_toolchains()

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
load("//:repositories.bzl", "repositories")

gazelle_dependencies()
repositories()
24 changes: 0 additions & 24 deletions examples/clients/responsebody/.gitignore

This file was deleted.

23 changes: 0 additions & 23 deletions examples/clients/responsebody/.swagger-codegen-ignore

This file was deleted.

164 changes: 0 additions & 164 deletions examples/clients/responsebody/api_client.go

This file was deleted.

Loading