-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix protoc-gen-go schema variable case handling (#808)
<!-- Before submitting your PR, please read through the contribution guide! https://github.com/connectrpc/connect-go/blob/main/.github/CONTRIBUTING.md --> This fixes the handling of various casing when generating the service methods variable. Fixes #807 Signed-off-by: Edward McFarlane <[email protected]>
- Loading branch information
1 parent
867dac8
commit 044befe
Showing
6 changed files
with
359 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
cmd/protoc-gen-connect-go/testdata/v1beta1service/buf.gen.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: v2 | ||
managed: | ||
enabled: true | ||
override: | ||
- file_option: go_package_prefix | ||
value: connectrpc.com/connect/cmd/protoc-gen-connect-go/testdata/v1beta1service | ||
plugins: | ||
- local: protoc-gen-go | ||
out: . | ||
opt: paths=source_relative | ||
- local: protoc-gen-connect-go | ||
out: . | ||
opt: | ||
- paths=source_relative | ||
- package_suffix |
123 changes: 123 additions & 0 deletions
123
cmd/protoc-gen-connect-go/testdata/v1beta1service/v1beta1service.connect.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
188 changes: 188 additions & 0 deletions
188
cmd/protoc-gen-connect-go/testdata/v1beta1service/v1beta1service.pb.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
cmd/protoc-gen-connect-go/testdata/v1beta1service/v1beta1service.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright 2021-2024 The Connect Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// This file tests varying casing of the service name and method name. | ||
syntax = "proto3"; | ||
|
||
package example; | ||
|
||
message GetExample_Request {} | ||
|
||
message Get1example_response {} | ||
|
||
service ExampleV1beta { | ||
rpc Method(GetExample_Request) returns (Get1example_response) {} | ||
} |