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

nitpick a_bit_of_everything.proto #1030

Merged
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
23 changes: 11 additions & 12 deletions examples/proto/examplepb/a_bit_of_everything.pb.go

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

17 changes: 8 additions & 9 deletions examples/proto/examplepb/a_bit_of_everything.proto
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
};


// Intentionaly complicated message type to cover many features of Protobuf.
// NEXT ID: 30
johanbrandhorst marked this conversation as resolved.
Show resolved Hide resolved
// Intentionally complicated message type to cover many features of Protobuf.
message ABitOfEverything {
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_schema) = {
json_schema: {
Expand Down Expand Up @@ -205,7 +204,7 @@ message ABitOfEverything {
// repeated enum value. it is comma-separated in query
repeated NumericEnum repeated_enum_value = 28;

// repeated numeric enum comment (This comment is overridden by the field annotation)
// repeated numeric enum comment (This comment is overridden by the field annotation)
repeated NumericEnum repeated_enum_annotation = 32 [(grpc.gateway.protoc_gen_swagger.options.openapiv2_field) = {title: "Repeated numeric enum title", description: "Repeated numeric enum description."}];

// numeric enum comment (This comment is overridden by the field annotation)
Expand Down Expand Up @@ -440,17 +439,17 @@ service ABitOfEverythingService {
body: "*"
};
}
rpc CheckGetQueryParams(ABitOfEverything) returns (ABitOfEverything) {
option (google.api.http) = {
rpc CheckGetQueryParams(ABitOfEverything) returns (ABitOfEverything) {
option (google.api.http) = {
get: "/v1/example/a_bit_of_everything/params/get/{single_nested.name}"
};
}
rpc CheckPostQueryParams(ABitOfEverything) returns (ABitOfEverything) {
option (google.api.http) = {
}
rpc CheckPostQueryParams(ABitOfEverything) returns (ABitOfEverything) {
option (google.api.http) = {
post: "/v1/example/a_bit_of_everything/params/post/{string_value}"
body: "single_nested"
};
}
}
}

// camelCase and lowercase service names are valid but not recommended (use TitleCase instead)
Expand Down