{"id":21045160,"url":"https://github.com/fullpipe/jmock","last_synced_at":"2026-04-22T08:30:58.302Z","repository":{"id":46951864,"uuid":"163823164","full_name":"fullpipe/jmock","owner":"fullpipe","description":"Simple and easy to use json/post API mock server","archived":false,"fork":false,"pushed_at":"2024-01-19T20:46:21.000Z","size":270,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-29T02:14:11.145Z","etag":null,"topics":["json-server","mock-server"],"latest_commit_sha":null,"homepage":null,"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/fullpipe.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":"2019-01-02T09:51:20.000Z","updated_at":"2022-10-07T09:09:56.000Z","dependencies_parsed_at":"2024-01-19T22:06:32.080Z","dependency_job_id":null,"html_url":"https://github.com/fullpipe/jmock","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/fullpipe/jmock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullpipe%2Fjmock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullpipe%2Fjmock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullpipe%2Fjmock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullpipe%2Fjmock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fullpipe","download_url":"https://codeload.github.com/fullpipe/jmock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullpipe%2Fjmock/sbom","scorecard":{"id":413555,"data":{"date":"2025-08-11","repo":{"name":"github.com/fullpipe/jmock","commit":"b983927bfb2d4edd283393c6758e9d61ca141300"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/14 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/fullpipe/jmock/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/fullpipe/jmock/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/fullpipe/jmock/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/fullpipe/jmock/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/fullpipe/jmock/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/fullpipe/jmock/go.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:2","Warn: downloadThenRun not pinned by hash: .github/workflows/go.yml:29","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   1 out of   1 goCommand dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 22 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T23:15:58.954Z","repository_id":46951864,"created_at":"2025-08-18T23:15:58.954Z","updated_at":"2025-08-18T23:15:58.954Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32127757,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T07:37:52.372Z","status":"ssl_error","status_checked_at":"2026-04-22T07:37:51.635Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["json-server","mock-server"],"created_at":"2024-11-19T14:20:19.300Z","updated_at":"2026-04-22T08:30:58.280Z","avatar_url":"https://github.com/fullpipe.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jmock\n\n[![Tests Status](https://github.com/fullpipe/jmock/workflows/Tests/badge.svg)](https://github.com/fullpipe/jmock)\n[![Docker Image](https://img.shields.io/docker/image-size/fullpipe/jmock/latest)](https://cloud.docker.com/repository/docker/fullpipe/jmock)\n\nSimple and easy to use json/post API mock server\n\n## Install\n\nInstall binary\n\n```sh\ngo install github.com/fullpipe/jmock@latest\n```\n\n## Usage\n\nFirst create mocks collection file some where in your project. Use [standard\nwildcards](http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm) for\nrequest matching. For example `./mocks/users.json`:\n\n```json\n[\n  {\n    \"name\": \"Allow CORS\",\n    \"request\": {\n      \"method\": \"OPTIONS\",\n      \"priority\": 100\n    },\n    \"response\": {\n      \"code\": 204,\n      \"headers\": {\n        \"Access-Control-Allow-Origin\": \"*\",\n        \"Access-Control-Allow-Headers\": \"*\"\n      }\n    }\n  },\n  {\n    \"request\": {\n      \"method\": \"POST\",\n      \"headers\": {\n        \"Authorization\": \"Bearer *\"\n      },\n      \"url\": \"/api/users\",\n      \"json\": {\n        \"name\": \"*\"\n      }\n    },\n    \"response\": {\n      \"code\": 200\n    }\n  },\n  {\n    \"request\": {\n      \"method\": \"GET\",\n      \"url\": \"/api/users/*\"\n    },\n    \"response\": {\n      \"code\": 200,\n      \"json\": {\n        \"name\": \"John Doe\"\n      }\n    }\n  },\n  {\n    \"request\": {\n      \"method\": \"GET\",\n      \"url\": \"/api/users/7\",\n      \"priority\": 42\n    },\n    \"response\": {\n      \"code\": 200,\n      \"file\": \"data/user-7.json\"\n    }\n  },\n  {\n    \"name\": \"Get posts list\",\n    \"request\": {\n      \"method\": \"GET\",\n      \"url\": \"/api/posts\"\n    },\n    \"proxy\": \"http://realapi.loc\"\n  }\n]\n```\n\nStart jmock server\n\n```sh\njmock \"./mocks/*.json\" --port 9090 --watch\n```\n\nThats it your fake api is ready. Check the request\n\n```sh\ncurl localhost:9090/api/users/1\n```\n\nOutput\n```json\n{\n  \"name\": \"John Doe\"\n}\n```\n\n### Usage with docker\n\nRun mock server\n\n```sh\ndocker run -p 9090:9090 -v ${PWD}/mocks:/mocks fullpipe/jmock\n```\n\nOr if you need to watch files\n\n```sh\ndocker run -p 9090:9090 -v ${PWD}/mocks:/mocks fullpipe/jmock /mocks/*.json --port 9090 --watch\n```\n\nOr with docker-compose\n\n```yaml\nservices:\n    api:\n        image: fullpipe/jmock\n        command: \"/mocks/*.json --port 9090 --watch\"\n        ports:\n            - \"9090:9090\"\n        volumes:\n            - ./mocks:/mocks\n```\n\n## Mocks\n\nMock consists of 3 blocks `request`, `response`, `proxy`.  \nAlso you could use `name` to name it.\n\n### Request\n\nYou could match request by:\n\n```jsonc\n    \"request\": {\n      \"method\": \"POST\", // http method\n      \"url\": \"/api/users/*\", // query path\n      \"headers\": {\n        \"Authorization\": \"Bearer *\"\n      },\n      \"query\" { // get params\n          \"country\": \"R*\"\n      },\n      \"post\": { // post variables\n          \"first_name\": \"Jo*\",\n          \"last_name\": \"?oe\"\n      },\n      \"json\": { // JSON request body\n        \"name\": \"*\",\n        \"gender\": \"?\"\n      },\n      \"priority\": 42 // high number for more \"sticky\" requests\n    }\n```\n\n### Response\n\nFor matched request server returns response:\n\n```jsonc\n    \"response\": {\n      \"code\": 200, // status code\n\n      \"body\": \"plain text or html\", // response body\n      \"json\": { // OR response body with json\n        \"name\": \"John Doe\"\n      },\n      \"file\": \"data/user-7.json\", // OR path to a file with data for response body\n\n      \"headers\": { // add response headers if required\n        \"Access-Control-Allow-Origin\": \"*\"\n      }\n    }\n ```\n\n### Proxy (optional)\n\nIf you get one mock working. You could use `proxy` to\nbypass matched request to real API.\n\n```json\n    \"proxy\": \"http://realapihost.loc\"\n```\n\n## Examples\n\n### JSON RPC 2.0\n```json\n[\n  {\n    \"name\": \"User registration mock\",\n    \"request\": {\n      \"mehtod\": \"POST\",\n      \"url\": \"/rpc\",\n      \"json\": {\n        \"jsonrpc\": \"2.0\",\n        \"method\": \"registerUser\",\n        \"id\": 1,\n        \"params\": {\n          \"email\": \"*\"\n        }\n      }\n    },\n    \"response\": {\n      \"code\": 200,\n      \"json\": {\n        \"jsonrpc\": \"2.0\",\n        \"result\": {\n          \"user_id\": \"15\"\n        },\n        \"id\": 1\n      }\n    }\n  }\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffullpipe%2Fjmock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffullpipe%2Fjmock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffullpipe%2Fjmock/lists"}