{"id":20108027,"url":"https://github.com/harshvishu/mocker","last_synced_at":"2025-03-02T18:18:45.635Z","repository":{"id":193197983,"uuid":"686412838","full_name":"harshvishu/mocker","owner":"harshvishu","description":"mock REST client for everyone","archived":false,"fork":false,"pushed_at":"2023-10-05T09:26:04.000Z","size":1144,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T07:03:56.064Z","etag":null,"topics":["cli-app","cli-tools","http","json","mock","mock-server","rest","rust","rust-lang","yaml"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/moker","language":"Rust","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/harshvishu.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":"2023-09-02T17:51:39.000Z","updated_at":"2023-10-04T15:46:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"f2381774-6533-4772-a6df-bf255e71a74c","html_url":"https://github.com/harshvishu/mocker","commit_stats":null,"previous_names":["harshvishu/mocker"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshvishu%2Fmocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshvishu%2Fmocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshvishu%2Fmocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshvishu%2Fmocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harshvishu","download_url":"https://codeload.github.com/harshvishu/mocker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241549116,"owners_count":19980476,"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","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":["cli-app","cli-tools","http","json","mock","mock-server","rest","rust","rust-lang","yaml"],"created_at":"2024-11-13T17:59:22.657Z","updated_at":"2025-03-02T18:18:45.594Z","avatar_url":"https://github.com/harshvishu.png","language":"Rust","readme":"# moker\nA Simple Mock REST Client for Everyone\n\n## Main Objective \nMoker allows you to easily run a mock server using JSON or YAML files.\n\n## Features\n- [x] Supports .json files \n- [x] Supports headers (guard)\n- [x] Supports all HTTP methods\n- [x] Supports URL query parameters\n- [ ] Supports body parameters (guard)\n- [x] LRU Cache\n- [x] Configurable through the command line\n- [x] Network logger\n- [x] File watcher\n- [ ] Supports Swagger \u0026 Postman collection\n- [ ] Supports socket\n- [x] Supports .yaml files \n- [ ] Distribution via binary \n- [ ] Distribution via Homebrew\n\n## Usage\n1. Clone the repository \n2. Use the `cargo run` command\n\nTo run the sample JSON files, use:\n\n```bash\ncargo run -- -s ./example/json -p 8000\n```\n\n### Flags \n- `-s`: Path to look for config files. Default is the root of the project (\".\")\n- `-p`: Port to run the mock server on. Default is 8080\n\n### JSON Configuration for Route\n- `\"name\"`: An optional name for this configuration, used for logging purposes.\n- `\"method\"`: Defines the allowed HTTP method/s for this URL. If set, only requests with specified methods will be processed; others will receive a \"method not implemented\" response. Can be a list of methods (e.g., `[\"get\", \"post\"]`). Ignore if you want to allow any HTTP method.\n- `\"headers\"`: Define a dictionary/map of headers. The response will be sent only if the request contains these headers.\n\n### Response Configuration\nWithin the JSON body, use the `\"response\"` parameter to specify the following values:\n- `\"headers\"`: Define a dictionary/map of headers to be included in the HTTP response.\n- `\"status_code\"`: Set the HTTP response code.\n- `\"body\"`: Provide the JSON or raw string you want to be returned in the HTTP response.\n- `\"delay_ms\"`: Add a delay to the response in milliseconds.\n\n### Workflow\n![Workflow](moker_workflow.png)\n\n### Build Status \n[![Continuous integration](https://github.com/harshvishu/mocker/actions/workflows/build-and-release-linux.yml/badge.svg)](https://github.com/harshvishu/mocker/actions/workflows/build-and-release-linux.yml)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshvishu%2Fmocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharshvishu%2Fmocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshvishu%2Fmocker/lists"}