{"id":15089548,"url":"https://github.com/prongbang/wiremock","last_synced_at":"2025-10-12T17:07:05.646Z","repository":{"id":42625820,"uuid":"252644479","full_name":"prongbang/wiremock","owner":"prongbang","description":"Minimal Mock your APIs","archived":false,"fork":false,"pushed_at":"2023-10-11T16:16:18.000Z","size":54,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-04T18:48:49.106Z","etag":null,"topics":["docker","golang","json","mock-api","mock-apis","mock-server","wiremock","yml"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/prongbang/wiremock","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prongbang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-03T05:54:49.000Z","updated_at":"2025-07-27T17:10:16.000Z","dependencies_parsed_at":"2023-10-11T21:34:03.749Z","dependency_job_id":"4771d77e-dcc9-4e18-afb9-f669a9858be3","html_url":"https://github.com/prongbang/wiremock","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/prongbang/wiremock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prongbang%2Fwiremock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prongbang%2Fwiremock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prongbang%2Fwiremock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prongbang%2Fwiremock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prongbang","download_url":"https://codeload.github.com/prongbang/wiremock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prongbang%2Fwiremock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279012176,"owners_count":26085077,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","golang","json","mock-api","mock-apis","mock-server","wiremock","yml"],"created_at":"2024-09-25T09:00:47.555Z","updated_at":"2025-10-12T17:07:05.605Z","avatar_url":"https://github.com/prongbang.png","language":"Go","funding_links":["https://www.buymeacoffee.com/prongbang"],"categories":[],"sub_categories":[],"readme":"# Wiremock [![Docker Pulls](https://img.shields.io/docker/pulls/prongbang/wiremock.svg)](https://hub.docker.com/r/prongbang/wiremock/) [![Image Size](https://img.shields.io/docker/image-size/prongbang/wiremock.svg)](https://hub.docker.com/r/prongbang/wiremock/)\n\n\u003e [Wiremock](https://hub.docker.com/r/prongbang/wiremock) Minimal Mock your APIs \n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/prongbang)\n\n```shell script\n  _      ___                        __  \n | | /| / (_)______ __ _  ___  ____/ /__\n | |/ |/ / / __/ -_)  ' \\/ _ \\/ __/  '_/\n |__/|__/_/_/  \\__/_/_/_/\\___/\\__/_/\\_\\\n\n -\u003e wiremock server started on :8000\n```\n\n### Run with Docker\n\n```shell\ndocker pull prongbang/wiremock:latest\n```\n\n### Run with Docker Compose\n\n```yaml\nversion: '3.7'\nservices:\n  app_wiremock:\n    image: prongbang/wiremock:latest\n    ports:\n      - \"8000:8000\"\n    volumes:\n      - \"./mock:/mock\"\n    environment:\n      - ORIGIN_ALLOWED=http://localhost:9000\n```\n\n```\n$ docker-compose up -d\n```\n\n### Run with Golang\n\n```shell script\n$ go install github.com/prongbang/wiremock/v2@latest\n```\n\n#### Default port `8000`\n\n```bash\n$ wiremock\n```\n\n#### Custom port `9000`\n\n```bash\n$ wiremock -port=9000\n```\n\n### Example Project\n\n[https://github.com/prongbang/wiremock-example](https://github.com/prongbang/wiremock-example)\n\n## Matching Routes using gorilla/mux\n\nRead doc [gorilla/mux](https://github.com/gorilla/mux#matching-routes)\n\n## Setup project\n\n```shell script\nproject\n├── docker-compose.yml\n└── mock\n    ├── login\n    │   └── route.yml\n    └── user\n        ├── response\n        │   └── user.json\n        └── route.yml\n```\n\n#### Login\n\n```shell script\nPOST http://localhost:8000/api/v1/login\nQuery\n  lang: \"th\"\nHeader\n  Api-Key: \"ed2b7d14-3999-408e-9bb8-4ea739f2bcb5\"\nBody\n{\n  \"username\": \"admin\"\n  \"password\": \"pass\"\n}\n```\n\n- route.yml\n\n```yaml\nroutes:\n  login:\n    request:\n      method: \"POST\"\n      url: \"/api/v1/login\"\n      query:\n        lang: \"th\" \n      header:\n        Api-Key: \"ed2b7d14-3999-408e-9bb8-4ea739f2bcb5\"\n      body:\n        username: \"admin\"\n        password: \"pass\"\n    response:\n      status: 200\n      body: \u003e\n        {\"message\": \"success\"}\n```\n\n#### User\n\n```shell script\nGET   http://localhost:8000/api/v1/user/1\nPOST  http://localhost:8000/api/v1/user\n```\n\n- route.yml\n\n```yaml\nroutes:\n  get_user:\n    request:\n      method: \"GET\"\n      url: \"/api/v1/user/{id:[0-9]+}\"\n    response:\n      status: 200\n      body_file: user.json\n\n  create_user:\n    request:\n      method: \"POST\"\n      url: \"/api/v1/user\"\n    response:\n      status: 201\n      body: \u003e\n        {\"message\": \"success\"}\n```\n\n### User with multiple case\n\n```*``` - field required.\n\n```yaml\nroutes:\n  users:\n    request:\n      method: \"POST\"\n      url: \"/api/v1/user\"\n      query:\n        lang: \"XYZ\"\n      header:\n        Api-Key: \"ABC\"\n      cases:\n        user_accept_consent:\n          body:\n            action: \"consent\"\n            accept: \"Y\"\n          response:\n            status: 200\n            body_file: user-accept-consent.json\n        get_profile:\n          body:\n            username: \"*\"\n            userId: \"*\"\n          response:\n            status: 200\n            body_file: profile-self.json\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprongbang%2Fwiremock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprongbang%2Fwiremock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprongbang%2Fwiremock/lists"}