Created
April 18, 2017 08:37
-
-
Save eduard-sukharev/5b4bdba102d3701fbc68d9fd4ef0ff31 to your computer and use it in GitHub Desktop.
Easily mock api with wiremock docker container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"request": { | |
"method": "GET", | |
"urlPathPattern": "/api/blog/?" | |
}, | |
"response": { | |
"status": 200, | |
"body": "[{\"id\":2,\"name\":\"Phasellus nec consectetur tellus.\",\"image\":\"http://blog.example.com/image1.jpg\",\"url\":\"//blog.example.com/post.php?id=19699828\"},{\"id\":1,\"name\":\"Duis facilisis eu metus ut placerat.\",\"image\":\"http://blog.example.com/image2.jpg\",\"url\":\"//blog.example.com/post.php?id=19644237\"}]" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d --rm -p 8080:8080 --network docker_network_name -v $PWD/api_mocks:/home/wiremock/mappings --name wiremock_api_mock rodolpheche/wiremock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment