Skip to content

Commit

Permalink
add camelCase field example
Browse files Browse the repository at this point in the history
  • Loading branch information
t-yuki committed Feb 25, 2016
1 parent e40ac31 commit 0e80e32
Show file tree
Hide file tree
Showing 6 changed files with 138 additions and 109 deletions.
122 changes: 62 additions & 60 deletions examples/examplepb/a_bit_of_everything.pb.go

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

15 changes: 13 additions & 2 deletions examples/examplepb/a_bit_of_everything.pb.gw.go

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

3 changes: 2 additions & 1 deletion examples/examplepb/a_bit_of_everything.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ message ABitOfEverything {
sint32 sint32_value = 17;
sint64 sint64_value = 18;
repeated string repeated_string_value = 19;
string camelCase_value = 20;
}

message EmptyMessage {
Expand All @@ -53,7 +54,7 @@ service ABitOfEverythingService {
rpc Create(ABitOfEverything) returns (ABitOfEverything) {
// TODO add enum_value
option (google.api.http) = {
post: "/v1/example/a_bit_of_everything/{float_value}/{double_value}/{int64_value}/separator/{uint64_value}/{int32_value}/{fixed64_value}/{fixed32_value}/{bool_value}/{string_value=strprefix/*}/{uint32_value}/{sfixed32_value}/{sfixed64_value}/{sint32_value}/{sint64_value}"
post: "/v1/example/a_bit_of_everything/{float_value}/{double_value}/{int64_value}/separator/{uint64_value}/{int32_value}/{fixed64_value}/{fixed32_value}/{bool_value}/{string_value=strprefix/*}/{uint32_value}/{sfixed32_value}/{sfixed64_value}/{sint32_value}/{sint64_value}/{camelCase_value}"
};
}
rpc CreateBody(ABitOfEverything) returns (ABitOfEverything) {
Expand Down
3 changes: 2 additions & 1 deletion examples/examplepb/streamless_everything.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ message ABitOfEverything {
sint32 sint32_value = 17;
sint64 sint64_value = 18;
repeated string repeated_string_value = 19;
string camelCase_value = 20;
}

message EmptyMessage {
Expand All @@ -53,7 +54,7 @@ service ABitOfEverythingService {
rpc Create(ABitOfEverything) returns (ABitOfEverything) {
// TODO add enum_value
option (google.api.http) = {
post: "/v1/example/a_bit_of_everything/{float_value}/{double_value}/{int64_value}/separator/{uint64_value}/{int32_value}/{fixed64_value}/{fixed32_value}/{bool_value}/{string_value=strprefix/*}/{uint32_value}/{sfixed32_value}/{sfixed64_value}/{sint32_value}/{sint64_value}"
post: "/v1/example/a_bit_of_everything/{float_value}/{double_value}/{int64_value}/separator/{uint64_value}/{int32_value}/{fixed64_value}/{fixed32_value}/{bool_value}/{string_value=strprefix/*}/{uint32_value}/{sfixed32_value}/{sfixed64_value}/{sint32_value}/{sint64_value}/{camelCase_value}"
};
}
rpc CreateBody(ABitOfEverything) returns (ABitOfEverything) {
Expand Down
13 changes: 12 additions & 1 deletion examples/examplepb/streamless_everything.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
]
}
},
"/v1/example/a_bit_of_everything/{float_value}/{double_value}/{int64_value}/separator/{uint64_value}/{int32_value}/{fixed64_value}/{fixed32_value}/{bool_value}/{string_value}/{uint32_value}/{sfixed32_value}/{sfixed64_value}/{sint32_value}/{sint64_value}": {
"/v1/example/a_bit_of_everything/{float_value}/{double_value}/{int64_value}/separator/{uint64_value}/{int32_value}/{fixed64_value}/{fixed32_value}/{bool_value}/{string_value}/{uint32_value}/{sfixed32_value}/{sfixed64_value}/{sint32_value}/{sint64_value}/{camel}": {
"post": {
"summary": "ABitOfEverythingService.Create",
"operationId": "Create",
Expand Down Expand Up @@ -247,6 +247,13 @@
"required": true,
"type": "integer",
"format": "int64"
},
{
"name": "camelCase_value",
"in": "path",
"required": true,
"type": "string",
"format": "string"
}
],
"tags": [
Expand Down Expand Up @@ -367,6 +374,10 @@
"type": "boolean",
"format": "boolean"
},
"camelCase_value": {
"type": "string",
"format": "string"
},
"double_value": {
"type": "number",
"format": "double"
Expand Down
Loading

0 comments on commit 0e80e32

Please sign in to comment.