Closed ttc0419 closed 2 months ago
You can provide the schema yourself by providing proto source files are a compiled file descriptor set (using the -o
argument of protoc
or using buf build
). But the issue here is that the reflection endpoint in the server is unable to provide the entire schema. As it states, it cannot provide a file descriptor for the import openapi/v3/annotations.proto
.
This is an issue with how the Gnostic stuff is being used. For reflection to correctly work, the path you use in an import statement must match the path used when that file was compiled to generated Go code. This comment suggests you should be arranging your file system structure to so that the import statement is "openapiv3/annotations.proto" (no slash between "openapi" and "v3").
I can also look at updating my grpcreflect package to try to be lenient about this sort of thing. Generally, all of a file's imports must be present in order to properly construct a schema model for elements in that file. However, imports that only supply custom options could actually be omitted and the schema could still be constructed. The result is that any custom options would be uninterpreted, which would work for grpcurl and grpcui since they don't care about custom options (though it does mean that custom options would be absent when you try to describe
an element with grpcurl).
When I list services, it works as intended:
But when I was trying to list the methods:
And it cannot invoke GRPCs as well: