Skip to content

Commit

Permalink
Merge pull request #264 from tmc/regenerate_examples
Browse files Browse the repository at this point in the history
Regenerate examples
  • Loading branch information
tmc authored Nov 19, 2016
2 parents ecf1225 + c56093e commit 9108558
Show file tree
Hide file tree
Showing 8 changed files with 259 additions and 6 deletions.
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.

0 comments on commit 9108558

Please sign in to comment.