diff --git a/examples/fileupload/http.go b/examples/fileupload/http.go index 5900a43..e495c7f 100644 --- a/examples/fileupload/http.go +++ b/examples/fileupload/http.go @@ -41,10 +41,6 @@ func NewHTTPRouter(svc Service, codecs httpcodec.Codecs, opts ...httpoption.Opti return r } -func NewHTTPRouterWithOAS(svc Service, codecs httpcodec.Codecs, schema oas2.Schema) chi.Router { - return NewHTTPRouter(svc, codecs, httpoption.ResponseSchema(schema)) -} - func decodeUploadRequest(codec httpcodec.Codec, validator httpoption.Validator) kithttp.DecodeRequestFunc { return func(_ context.Context, r *http.Request) (interface{}, error) { var _req UploadRequest diff --git a/examples/helloworld/http.go b/examples/helloworld/http.go index 385b86c..a52295c 100644 --- a/examples/helloworld/http.go +++ b/examples/helloworld/http.go @@ -41,10 +41,6 @@ func NewHTTPRouter(svc Service, codecs httpcodec.Codecs, opts ...httpoption.Opti return r } -func NewHTTPRouterWithOAS(svc Service, codecs httpcodec.Codecs, schema oas2.Schema) chi.Router { - return NewHTTPRouter(svc, codecs, httpoption.ResponseSchema(schema)) -} - func decodeSayHelloRequest(codec httpcodec.Codec, validator httpoption.Validator) kithttp.DecodeRequestFunc { return func(_ context.Context, r *http.Request) (interface{}, error) { var _req SayHelloRequest diff --git a/examples/helloworldgrpc/pb/helloworldgrpc.pb.go b/examples/helloworldgrpc/pb/helloworldgrpc.pb.go index fdd1717..deb9b07 100644 --- a/examples/helloworldgrpc/pb/helloworldgrpc.pb.go +++ b/examples/helloworldgrpc/pb/helloworldgrpc.pb.go @@ -135,7 +135,7 @@ var file_pb_helloworldgrpc_proto_rawDesc = []byte{ 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x75, 0x73, 0x73, 0x65, 0x6c, 0x6c, 0x4c, 0x75, 0x6f, 0x2f, - 0x6b, 0x6f, 0x6b, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x68, 0x65, 0x6c, + 0x6b, 0x75, 0x6e, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/examples/messaging/http.go b/examples/messaging/http.go index 79fa8ed..9496cc2 100644 --- a/examples/messaging/http.go +++ b/examples/messaging/http.go @@ -55,10 +55,6 @@ func NewHTTPRouter(svc Service, codecs httpcodec.Codecs, opts ...httpoption.Opti return r } -func NewHTTPRouterWithOAS(svc Service, codecs httpcodec.Codecs, schema oas2.Schema) chi.Router { - return NewHTTPRouter(svc, codecs, httpoption.ResponseSchema(schema)) -} - func decodeGetMessageRequest(codec httpcodec.Codec, validator httpoption.Validator) kithttp.DecodeRequestFunc { return func(_ context.Context, r *http.Request) (interface{}, error) { var _req GetMessageRequest diff --git a/examples/profilesvc/http.go b/examples/profilesvc/http.go index 3c276e6..0490f57 100644 --- a/examples/profilesvc/http.go +++ b/examples/profilesvc/http.go @@ -153,10 +153,6 @@ func NewHTTPRouter(svc Service, codecs httpcodec.Codecs, opts ...httpoption.Opti return r } -func NewHTTPRouterWithOAS(svc Service, codecs httpcodec.Codecs, schema oas2.Schema) chi.Router { - return NewHTTPRouter(svc, codecs, httpoption.ResponseSchema(schema)) -} - func decodeDeleteAddressRequest(codec httpcodec.Codec, validator httpoption.Validator) kithttp.DecodeRequestFunc { return func(_ context.Context, r *http.Request) (interface{}, error) { var _req DeleteAddressRequest diff --git a/examples/profilesvcgrpc/pb/profilesvcgrpc.pb.go b/examples/profilesvcgrpc/pb/profilesvcgrpc.pb.go index 528ef4a..97106eb 100644 --- a/examples/profilesvcgrpc/pb/profilesvcgrpc.pb.go +++ b/examples/profilesvcgrpc/pb/profilesvcgrpc.pb.go @@ -1099,7 +1099,7 @@ var file_pb_profilesvcgrpc_proto_rawDesc = []byte{ 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x75, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x52, 0x75, 0x73, 0x73, 0x65, 0x6c, 0x6c, 0x4c, 0x75, 0x6f, 0x2f, 0x6b, 0x6f, 0x6b, + 0x6d, 0x2f, 0x52, 0x75, 0x73, 0x73, 0x65, 0x6c, 0x6c, 0x4c, 0x75, 0x6f, 0x2f, 0x6b, 0x75, 0x6e, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x76, 0x63, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/examples/usersvc/http.go b/examples/usersvc/http.go index 97f9263..5f555ac 100644 --- a/examples/usersvc/http.go +++ b/examples/usersvc/http.go @@ -41,10 +41,6 @@ func NewHTTPRouter(svc Service, codecs httpcodec.Codecs, opts ...httpoption.Opti return r } -func NewHTTPRouterWithOAS(svc Service, codecs httpcodec.Codecs, schema oas2.Schema) chi.Router { - return NewHTTPRouter(svc, codecs, httpoption.ResponseSchema(schema)) -} - func decodeCreateUserRequest(codec httpcodec.Codec, validator httpoption.Validator) kithttp.DecodeRequestFunc { return func(_ context.Context, r *http.Request) (interface{}, error) { var _req CreateUserRequest diff --git a/gen/http/chi/generator.go b/gen/http/chi/generator.go index 6059c9f..1a62424 100644 --- a/gen/http/chi/generator.go +++ b/gen/http/chi/generator.go @@ -80,10 +80,6 @@ func NewHTTPRouter(svc {{$.Data.SrcPkgQualifier}}{{$.Data.InterfaceName}}, codec return r } -func NewHTTPRouterWithOAS(svc {{$.Data.SrcPkgQualifier}}{{$.Data.InterfaceName}}, codecs httpcodec.Codecs, schema oas2.Schema) chi.Router { - return NewHTTPRouter(svc, codecs, httpoption.ResponseSchema(schema)) -} - {{- range .Spec.Operations}} {{- $nonCtxParams := nonCtxParams .Request.Params}}