Package org.mockserver.grpc
Class GrpcProtoDescriptorStore
java.lang.Object
org.mockserver.grpc.GrpcProtoDescriptorStore
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.protobuf.Descriptors.MethodDescriptorcom.google.protobuf.Descriptors.ServiceDescriptorgetService(String fullName) booleanvoidloadDescriptorDirectory(Path directory) voidloadDescriptorSet(byte[] descriptorSetBytes) voidvoidremoveService(String fullName) voidreset()synthesizeResponseJson(String serviceName, String methodName) Synthesize a schema-valid protobuf-JSON example for the output (response) message of the supplied service/method, using the loaded descriptors.
-
Constructor Details
-
GrpcProtoDescriptorStore
-
-
Method Details
-
loadDescriptorSet
public void loadDescriptorSet(byte[] descriptorSetBytes) -
loadDescriptorSetFromPath
-
loadDescriptorDirectory
-
getService
-
getMethod
-
getAllServices
-
getConverter
-
getExampleSynthesizer
-
synthesizeResponseJson
Synthesize a schema-valid protobuf-JSON example for the output (response) message of the supplied service/method, using the loaded descriptors. Returnsnullwhen the method is unknown, so the caller can fall back to existing behaviour.This backs the "no hand-authored body" path: a matched gRPC expectation whose response has no explicit body can return this synthesized message instead of an empty response.
-
hasServices
public boolean hasServices() -
removeService
-
reset
public void reset()
-