Start an instance of wiremock using docker compose.
Via docker-compose
docker-compose up
or the new compose command
docker compose up
Add your mappings json files under wiremock/mappings
and any response payload under wiremock/__files
.
If mappings or payload are changed, the container will need to be restarted.
docker compose restart
For example mappings, see hello.json and general.json.
And their referenced response payload hello.json response and not-found.
For more information about the mappings, see the Wiremock documentation.
To create new request mapping, the main function in App.kt in mock-api can be used.