{"id":13732258,"url":"https://github.com/up9inc/mockintosh","last_synced_at":"2025-04-06T12:07:53.687Z","repository":{"id":39595552,"uuid":"318165108","full_name":"up9inc/mockintosh","owner":"up9inc","description":"Mocks for microservice environments","archived":false,"fork":false,"pushed_at":"2022-09-20T17:16:51.000Z","size":860,"stargazers_count":176,"open_issues_count":22,"forks_count":19,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-03-30T11:06:43.497Z","etag":null,"topics":["api","http","mock","mock-server"],"latest_commit_sha":null,"homepage":"https://mockintosh.io","language":"Python","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/up9inc.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}},"created_at":"2020-12-03T11:03:52.000Z","updated_at":"2025-03-27T12:51:01.000Z","dependencies_parsed_at":"2022-09-26T17:21:15.890Z","dependency_job_id":null,"html_url":"https://github.com/up9inc/mockintosh","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9inc%2Fmockintosh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9inc%2Fmockintosh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9inc%2Fmockintosh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9inc%2Fmockintosh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/up9inc","download_url":"https://codeload.github.com/up9inc/mockintosh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478320,"owners_count":20945266,"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":["api","http","mock","mock-server"],"created_at":"2024-08-03T02:01:50.732Z","updated_at":"2025-04-06T12:07:53.655Z","avatar_url":"https://github.com/up9inc.png","language":"Python","funding_links":[],"categories":["Python","Mock and Stub"],"sub_categories":[],"readme":"# Mockintosh\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/up9inc/mockintosh/releases/latest\"\u003e\n        \u003cimg alt=\"GitHub Latest Release\" src=\"https://img.shields.io/github/v/release/up9inc/mockintosh?logo=GitHub\u0026style=flat-square\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/up9inc/mockintosh/blob/master/LICENSE\"\u003e\n        \u003cimg alt=\"GitHub License\" src=\"https://img.shields.io/github/license/up9inc/mockintosh?logo=GitHub\u0026style=flat-square\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://travis-ci.com/github/up9inc/mockintosh/builds/\"\u003e\n        \u003cimg alt=\"Travis\" src=\"https://img.shields.io/travis/up9inc/mockintosh?logo=Travis\u0026style=flat-square\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://hub.docker.com/r/up9inc/mockintosh\"\u003e\n        \u003cimg alt=\"Docker Build Status\" src=\"https://img.shields.io/docker/cloud/build/up9inc/mockintosh?logo=Docker\u0026style=flat-square\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/up9inc/mockintosh\"\u003e\n        \u003cimg alt=\"Code Coverage (Codecov)\" src=\"https://img.shields.io/codecov/c/github/up9inc/mockintosh?logo=Codecov\u0026style=flat-square\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## Quick Links\n\n[**Documentation Website**](https://mockintosh.io/)\n\n[**YouTube Video Series**](https://www.youtube.com/watch?v=Q8RPT6TPOIg\u0026list=PLJE3O0IuP-IZMWEOI8dU0U3rO_CPPhLv9)\n\n[**Bug Tracker**](https://github.com/up9inc/mockintosh/issues)\n\n[**Slack**](https://up9.slack.com/)\n\n[**Stack Overflow**](https://stackoverflow.com/questions/tagged/mockintosh)\n\n[**Faker API Reference**](https://faker.readthedocs.io/en/master/providers.html)\n\n## About\n\nYou've just found a new way of mocking microservices!\n\n![Control Plane](https://i.ibb.co/3kG9xMr/Screenshot-from-2021-07-07-12-53-40.png)\n\nAn example config that demonstrates the common features of Mockintosh:\n\n```yaml\nservices:\n  - name: Mock for Service1\n    hostname: localhost\n    port: 8000\n    managementRoot: __admin  # open http://localhost:8001/__admin it in browser to see the UI  \n    endpoints:\n\n      - path: \"/\"  # simplest mock\n\n      - path: \"/api/users/{{param}}\"  # parameterized URLs\n        response: \"simple string response with {{param}} included\"\n\n      - path: /comprehensive-matching-and-response\n        method: POST\n        queryString:\n          qName1: qValue  # will only match if query string parameter exists\n          qName2: \"{{regEx '\\\\d+'}}\"  # will require numeric value\n        headers:\n          x-required-header: someval  # will cause only requests with specific header to work\n        body:\n          text: \"{{regEx '.+'}}\"  # will require non-empty POST body\n        response: # the mocked response specification goes below\n          status: 202\n          body: \"It worked\"\n          headers:\n            x-response-header: \"{{random.uuid4}}\"  # a selection of random/dynamic functions is available\n            x-query-string-value: \"{{request.queryString.qName2}}\"  # request parts can be referenced in response\n\n```\n\nMockintosh is a service virtualization tool that's capable to generate mocks for **RESTful APIs** and communicate\nwith **message queues**\nto either mimic **asynchronous** tasks or to simulate **microservice architectures** in a blink of an eye.\n\nThe state-of-the-art mocking capabilities of Mockintosh enables software development teams to work\n**independently** while building and maintaining a **complicated** microservice architecture.\n\nKey features:\n\n- Multiple services mocked by a single instance of Mockintosh\n- Lenient [configuration syntax](https://mockintosh.io/Configuring.html)\n- Remote [management UI+API](https://mockintosh.io/Management.html)\n- Request scenarios support with [multi-response endpoints](https://mockintosh.io/Configuring.html#multiple-responses)\n  and [tags](https://mockintosh.io/Configuring.html#tagged-responses)\n- [Mock Actor](https://mockintosh.io/Async.html) pattern for Kafka, RabbitMQ, Redis and some other message bus protocols\n- GraphQL queries recognizing\n\n_[In this article](https://up9.com/open-source-microservice-mocking-introducing-mockintosh) we explain how and why\nMockintosh was born as a new way of mocking microservices._\n\n## Quick Start\n\n### Install on MacOS\n\nInstall Mockintosh app on Mac using [Homebrew](https://brew.sh/) package manager:\n\n```shell\n$ brew install up9inc/repo/mockintosh\n```\n### Install on Windows\n\nDownload an installer from [releases](https://github.com/up9inc/mockintosh/releases) section and launch it. Follow the steps in wizard to install Mockintosh.\n\n### Install on Linux\n\nInstall Mockintosh Python package using [`pip`](https://pypi.org/project/pip/) (or `pip3` on some machines):\n\n```shell\n$ pip install -U mockintosh\n```\n\n### Use Demo Sample Config\n\nRun following command to generate `example.yaml` file in the current directory:\n\n```shell\n$ mockintosh --sample-config example.yaml\n```\n\nthen, run that config with Mockintosh:\n\n```shell\n$ mockintosh example.yaml\n```\n\nAnd open http://localhost:9999 in your web browser.\n\nYou can also issue some CURL requests against it:\n\n```shell\ncurl -v http://localhost:8888/\n\ncurl -v http://localhost:8888/api/myURLParamValue123/action\n\ncurl -v \"http://localhost:8888/someMoreFields?qName1=qValue\u0026qName2=12345\" -X POST -H\"X-Required-Header: someval\" --data \"payload\"\n```\n\n## Command-line Arguments\n\nThe list of command-line arguments can be seen by running `mockintosh --help`.\n\nIf you don't want to listen all of the services in a configuration file then you can specify a list of service\nnames (`name` is a string attribute you can set per service):\n\n```shell\n$ mockintosh example.yaml 'Mock for Service1' 'Mock for Service2'\n```\n\nUsing `--quiet` and `--verbose` options the logging level can be changed.\n\nUsing `--bind` option the bind address for the mock server can be specified, e.g. `mockintosh --bind 0.0.0.0`\n\nUsing `--enable-tags` option the tags in the configuration file can be enabled in startup time,\ne.g. `mockintosh --enable-tags first,second`\n\n## OpenAPI Specification to Mockintosh Config Conversion (_experimental_)\n\n_Note: This feature is experimental. One-to-one transpilation of OAS documents is not guaranteed._\n\nIt could be a good kickstart if you have already an OpenAPI Specification for your API. Mockintosh is able to transpile\nan OpenAPI Specification to its own config format in two different ways:\n\n### CLI Option `--convert`\n\nUsing the `--convert` one can convert an OpenAPI Specification to Mockintosh config.\n\nJSON output example:\n\n```shell\n$ wget https://petstore.swagger.io/v2/swagger.json\n$ mockintosh swagger.json -c new_config.json json\n```\n\nYAML example:\n\n```shell\n$ mockintosh swagger.json -c new_config.yaml yaml\n```\n\n### Automatic Conversion\n\nIf you start Mockintosh with a valid OpenAPI Specification file then it automatically detects that the input is an\nOpenAPI Specification file:\n\n```shell\n$ mockintosh swagger.json\n```\n\nand automatically starts itself from that file. Without producing any new files. So you can start to edit this file\nthrough the management UI without even restarting Mockintosh.\n\n## Build the Docs\n\nSingle-command from `/docs` to review docs locally:\n```shell\ndocker run -p 8080:4000 -v $(pwd):/site bretfisher/jekyll-serve\n```\n\nOr manual:\n\nInstall [Jekyll](https://jekyllrb.com/) and [Bundler](https://bundler.io/):\n\n```shell\n$ gem install jekyll bundler\n```\n\nInstall the gems:\n\n```shell\n$ cd docs/\n$ bundle config set --local path 'vendor/bundle'\n$ bundle install\n```\n\nRun the server:\n\n```shell\n$ bundle exec jekyll serve\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fup9inc%2Fmockintosh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fup9inc%2Fmockintosh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fup9inc%2Fmockintosh/lists"}