WireMock provides the wiremock-grpc-extension which is a good candidate for further support.
Tasks
[x] Inspection:
Requests should always be matched with a POST method and a URL path of /[fully-qualified service name]/[method name].
[x] Inspection: if the value of a non-urlPath but url* property is in the /[fully-qualified service name]/[method name] format, it is most probably a grpc service and should be used with urlPath.
[x] Line marker/reference: in the JSON DSL on the urlPath property where the GRPC service can be resolved from the url path value. Upon clicking on the line marker, it could show options to:
[x] open the service definition in the corresponding .proto file (this option will probably depend on the Protocol Buffers plugin)
[x] open the generated service implementation class
[x] Code completion: if the service FQN can be resolved in the urlPath property, the rpc names could be completed when invoked at /[fully-qualified service name]/<caret>
[x] Handlebars: language injection into org.wiremock.grpc.dsl.WireMockGrpc.jsonTemplate() in the Java DSL.
[x] JSON language injection: into org.wiremock.grpc.dsl.WireMockGrpc.json() in the Java DSL.
[x] Code completion: org.wiremock.grpc.dsl.WireMockGrpc.Status enum constants in the response.headers.grpc-status-name property value in the JSON DSL.
[x] Inspection: if the response.headers.grpc-status-name property value is not a valid org.wiremock.grpc.dsl.WireMockGrpc.Status enum constants.
[x] Don't execute the suspicious regex usage inspection in urlPath property when the grpc extension is enabled. For example dot symbols are required for the service FQNs.
Notes
These features must be invoked only when the wiremock-grpc-extension is configured in the project.
Summary
WireMock provides the wiremock-grpc-extension which is a good candidate for further support.
Tasks
urlPath
buturl*
property is in the/[fully-qualified service name]/[method name]
format, it is most probably a grpc service and should be used withurlPath
.urlPath
property where the GRPC service can be resolved from the url path value. Upon clicking on the line marker, it could show options to:.proto
file (this option will probably depend on the Protocol Buffers plugin)urlPath
property, the rpc names could be completed when invoked at/[fully-qualified service name]/<caret>
org.wiremock.grpc.dsl.WireMockGrpc.jsonTemplate()
in the Java DSL.org.wiremock.grpc.dsl.WireMockGrpc.json()
in the Java DSL.org.wiremock.grpc.dsl.WireMockGrpc.Status
enum constants in theresponse.headers.grpc-status-name
property value in the JSON DSL.response.headers.grpc-status-name
property value is not a validorg.wiremock.grpc.dsl.WireMockGrpc.Status
enum constants.Notes
Resources