https://github.com/touchdown/gyremock
grpc wrapper for wiremock
https://github.com/touchdown/gyremock
akka-grpc-e2e akka-grpc-wiremock grpc grpc-e2e-test grpc-mock grpc-mocking grpc-wiremock
Last synced: 3 months ago
JSON representation
grpc wrapper for wiremock
- Host: GitHub
- URL: https://github.com/touchdown/gyremock
- Owner: touchdown
- License: apache-2.0
- Created: 2021-01-10T03:02:42.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-09-09T17:11:33.000Z (7 months ago)
- Last Synced: 2025-09-09T19:50:04.125Z (7 months ago)
- Topics: akka-grpc-e2e, akka-grpc-wiremock, grpc, grpc-e2e-test, grpc-mock, grpc-mocking, grpc-wiremock
- Language: Scala
- Homepage:
- Size: 73.2 KB
- Stars: 2
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gyremock
grpc wrapper for wiremock
## Intro
This project aims to introduce a translation layer between grpc and json (wiremock).
To do so, it relies on the `codegen` logic in the plugin to
1. have access to proto files
2. generate said translation layer for grpc <-> json
3. generate an aggregate of all the services generated above
Then, the `runtime` library provides the support needed to run the code generated above.
Lastly, the end project still need to write a few lines of code to actually run the service to make it useful and provide all the needed wiremock files.
## Getting Started
in your project's `plugins.sbt`
```sbt
addSbtPlugin("io.github.touchdown" % "sbt-gyremock" % "")
```
then add these lines in your `build.sbt`
```sbt
import gyremock.gen.scaladsl._
Compile / akkaGrpcExtraGenerators := Seq(TranslatorCodeGen, ServicesBuilderCodeGen)
```
along with your usual protoc settings
finally, add a file like this to bootstrap the actual service
```scala
package xyz
import akka.actor.ActorSystem
import io.github.touchdown.gyremock._
object GyreMockApp {
def main(args: Array[String]): Unit = {
implicit val system: ActorSystem = ActorSystem("GyreMockApp")
val settings = GyremockSettings(system.settings.config.getConfig("gyremock"))
new GyremockServer(settings, ServicesBuilder.build).run()
}
}
```