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

Regenerate examples #264

Merged
merged 2 commits into from
Nov 19, 2016
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
147 changes: 147 additions & 0 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.

7 changes: 7 additions & 0 deletions examples/examplepb/echo_service.pb.go

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

42 changes: 42 additions & 0 deletions examples/examplepb/flow_combination.pb.go

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

7 changes: 7 additions & 0 deletions examples/sub2/message.pb.go

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

12 changes: 6 additions & 6 deletions protoc-gen-swagger/genswagger/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ func renderServices(services []*descriptor.Service, paths swaggerPathsObject, re
},
}
} else {
lastField := b.Body.FieldPath[len(b.Body.FieldPath) - 1]
lastField := b.Body.FieldPath[len(b.Body.FieldPath)-1]
schema = schemaOfField(lastField.Target, reg)
}

Expand All @@ -399,7 +399,7 @@ func renderServices(services []*descriptor.Service, paths swaggerPathsObject, re
Description: desc,
In: "body",
Required: true,
Schema: &schema,
Schema: &schema,
})
}

Expand Down Expand Up @@ -565,7 +565,7 @@ func updateSwaggerDataFromComments(swaggerObject interface{}, comment string) er
return nil
}

return fmt.Errorf("No description nor summary property.")
return fmt.Errorf("no description nor summary property")
}

func protoComments(reg *descriptor.Registry, file *descriptor.File, outers []string, typeName string, typeIndex int32, fieldPaths ...int32) string {
Expand Down Expand Up @@ -693,15 +693,15 @@ func isProtoPathMatches(paths []int32, outerPaths []int32, typeName string, type
func protoPathIndex(descriptorType reflect.Type, what string) int32 {
field, ok := descriptorType.Elem().FieldByName(what)
if !ok {
panic(fmt.Errorf("Could not find protobuf descriptor type id for %s.", what))
panic(fmt.Errorf("could not find protobuf descriptor type id for %s", what))
}
pbtag := field.Tag.Get("protobuf")
if pbtag == "" {
panic(fmt.Errorf("No Go tag 'protobuf' on protobuf descriptor for %s.", what))
panic(fmt.Errorf("no Go tag 'protobuf' on protobuf descriptor for %s", what))
}
path, err := strconv.Atoi(strings.Split(pbtag, ",")[1])
if err != nil {
panic(fmt.Errorf("Protobuf descriptor id for %s cannot be converted to a number: %s", what, err.Error()))
panic(fmt.Errorf("protobuf descriptor id for %s cannot be converted to a number: %s", what, err.Error()))
}

return int32(path)
Expand Down
28 changes: 28 additions & 0 deletions runtime/internal/stream_chunk.pb.go

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

1 change: 1 addition & 0 deletions third_party/googleapis/google/api/annotations.pb.go

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

21 changes: 21 additions & 0 deletions third_party/googleapis/google/api/http.pb.go

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