Migrating from GripMock to Mockarty
If you maintain GripMock gRPC stubs, you can import them into Mockarty as native
gRPC mocks — no rewrite. Mockarty converts each GripMock stub into a Mockarty mock
with the matching service/method and request conditions, so the same requests
resolve the same way.
What gets mapped
A GripMock stub looks like this (a single object, or an array of stubs):
{
"service": "user.UserService",
"method": "GetUser",
"input": { "equals": { "id": "42" } },
"output": { "data": { "name": "Ada" } }
}
Mockarty maps it field by field:
| GripMock | Mockarty |
|---|---|
service / method |
gRPC config service / method |
input.equals[field] |
condition $.field with assert action equals |
input.contains[field] |
condition $.field with assert action contains |
input.matches[field] |
condition $.field with assert action matches (regex) |
no input |
a single any condition (matches every request) |
output.data |
response.payload (the reply message) |
output.code |
response.statusCode (gRPC status; 0 = OK) |
output.error |
response.error |
Nested input objects are preserved — equals does deep equality, so a nested
matcher converts faithfully. Several stubs for the same service/method with
different inputs become several conditional mocks; Mockarty picks the matching one
exactly as GripMock selected a stub.
Convert a folder of stubs
Use the offline converter — it needs no running server and also handles WireMock
and Mockoon collections in the same pass:
# Convert every .json under ./gripmock-stubs into native Mockarty mock files
mockarty-cli mock convert ./gripmock-stubs --out ./mockarty-mocks
# Force the source format, or preview without writing
mockarty-cli mock convert stub.json --from gripmock --out ./out
mockarty-cli mock convert ./mixed --dry-run
The converter auto-detects the format per file (--from auto), reports any parts
it could not map as gaps, and writes one Mockarty mock JSON per stub.
Load the converted mocks
Import the generated files into a running Mockarty:
mockarty-cli mock import -f ./mockarty-mocks/
Or serve a GripMock stub directly with the universal mocker:
mockarty-cli mock serve --data-dir ./gripmock-stubs --format gripmock
Once imported, the mocks behave like any other Mockarty gRPC mock — you can edit
them in the UI, add conditions, use
dynamic templates ($.fake.*, $.req.*) in the payload,
and group them with the rest of your mocks.
See also: WireMock Migration ·
API Reference — gRPC mocks.