Skip to content

manerajona/wiremock-stubs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wiremock Stub Server

This project includes the files for mocking requests using wiremock.

How do I get set up?

This component is into a docker container. You need to generate a docker image using the command below.

docker image build --tag <my-docker-user>/usersapi-mocks .

Run the generated image with:

docker container run -it --rm -p 8088:8080 --name usersapi-mock <my-docker-user>/usersapi-mocks

Push the generated image to DockerHub:

docker image push <my-docker-user>/usersapi-mocks

User Api Request examples

Create User

curl -v -X POST -H "Content-type: application/json" -d '{
"email": "john.foo@example.com",
"first_name": "John",
"last_name": "Foo",
"birthday": "1889–04–04"
}' 'localhost:8088/api/users'

Delete User

curl -v -X DELETE 'localhost:8088/api/users/1'

Find User by Id

curl -v 'localhost:8088/api/users/1'

Find Users

curl -v 'localhost:8088/api/users?page=1'

Modify User

curl -v -X PUT -H "Content-type: application/json" -d '{
"first_name": "John",
"last_name": "Foo",
"birthday": "1889–04–04"
}' 'localhost:8088/api/users/1'

About

Stub Server with WireMock and Docker

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published