{"id":13619687,"url":"https://github.com/muonsoft/openapi-mock","last_synced_at":"2025-04-05T00:06:40.453Z","repository":{"id":49237385,"uuid":"145602302","full_name":"muonsoft/openapi-mock","owner":"muonsoft","description":"OpenAPI mock server with random data generation","archived":false,"fork":false,"pushed_at":"2024-06-27T19:33:08.000Z","size":1021,"stargazers_count":502,"open_issues_count":21,"forks_count":56,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-28T23:08:30.443Z","etag":null,"topics":["mock","mock-server","openapi","openapi3","swagger"],"latest_commit_sha":null,"homepage":"","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/muonsoft.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":"2018-08-21T18:16:27.000Z","updated_at":"2025-03-17T16:45:25.000Z","dependencies_parsed_at":"2024-11-08T05:33:40.084Z","dependency_job_id":"2a133771-867a-44b7-9e95-b4b75f1c7dc0","html_url":"https://github.com/muonsoft/openapi-mock","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muonsoft%2Fopenapi-mock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muonsoft%2Fopenapi-mock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muonsoft%2Fopenapi-mock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muonsoft%2Fopenapi-mock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muonsoft","download_url":"https://codeload.github.com/muonsoft/openapi-mock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266563,"owners_count":20910836,"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":["mock","mock-server","openapi","openapi3","swagger"],"created_at":"2024-08-01T21:00:46.971Z","updated_at":"2025-04-05T00:06:40.428Z","avatar_url":"https://github.com/muonsoft.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# OpenAPI Mock Server\n\n![CI](https://github.com/muonsoft/openapi-mock/workflows/CI/badge.svg?branch=master)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/muonsoft/openapi-mock)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/muonsoft/openapi-mock/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/muonsoft/openapi-mock/?branch=master)\n[![Maintainability](https://api.codeclimate.com/v1/badges/158deb3434a84924dade/maintainability)](https://codeclimate.com/github/muonsoft/openapi-mock/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/158deb3434a84924dade/test_coverage)](https://codeclimate.com/github/muonsoft/openapi-mock/test_coverage)\n\nOpenAPI API mock server with random data generation by specified schemas.\n\n* OpenAPI 3.x support.\n* Load specification from a local file or URL.\n* JSON and YAML format supported.\n* Generates fake response data by provided schemas or by examples.\n* Content negotiation by Accept header.\n* Can be used as standalone application (Linux and Windows) or can be run via Docker container.\n\n## Supported features\n\n| Feature | Support status |\n| --- | --- |\n| generating xml response | basic support ([without xml tags](https://swagger.io/docs/specification/data-models/representing-xml/)) |\n| generating json response | supported |\n| generation of [basic types](https://swagger.io/docs/specification/data-models/data-types/) | supported |\n| generation of [enums](https://swagger.io/docs/specification/data-models/enums/) | supported |\n| generation of [associative arrays](https://swagger.io/docs/specification/data-models/dictionaries/) | supported |\n| generation of [combined types](https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/) | supported (without tag `not` and discriminator) |\n| local reference resolving | supported |\n| remote reference resolving | not supported |\n| URL reference resolving | not supported |\n| validating request data | not supported |\n| force using custom response schema | not supported (schema detected automatically) |\n\n## Quick start\n\nDownload latest binary and run a server.\n\n```bash\n# runs a local server on port 8080\n./openapi-mock serve --specification-url https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml\n\n# to test that the server successfully ran\ncurl 'http://localhost:8080/v1/pets'\n```\n\nAlternatively, you can use [Docker](https://www.docker.com/) image.\n\n```bash\n# downloads an image\ndocker pull muonsoft/openapi-mock\n\n# runs a docker container with exported port 8080\ndocker run -p 8080:8080 -e \"OPENAPI_MOCK_SPECIFICATION_URL=https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml\" --rm muonsoft/openapi-mock\n\n# to test that the server successfully ran\ncurl 'http://localhost:8080/v1/pets'\n```\n\nAlso, you can use [Docker Compose](https://docs.docker.com/compose/). Example of `docker-compose.yml`\n\n```yaml\nversion: '3.0'\n\nservices:\n  openapi_mock:\n    container_name: openapi_mock\n    image: muonsoft/openapi-mock\n    environment:\n      OPENAPI_MOCK_SPECIFICATION_URL: 'https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml'\n    ports:\n      - \"8080:8080\"\n```\n\nTo start up a container run command.\n\n```bash\ndocker-compose up -d\n```\n\nIf you want to reference a local file in docker compose:\n\n* you must first mount the host dir into container - `./openapi:/etc/openapi`\n* only then can you reference it\n\n```yaml\nversion: '3.0'\n\nservices:\n  openapi_mock:\n    container_name: openapi_mock\n    image: muonsoft/openapi-mock\n    volumes:\n    - ./openapi:/etc/openapi\n    environment:\n      OPENAPI_MOCK_SPECIFICATION_URL: '/etc/openapi/petstore.yaml'\n    ports:\n      - \"8080:8080\"\n```\n\n## Usage guide\n\n* [Console commands](docs/usage_guide.md#console-commands)\n* [Setting up a configuration](docs/usage_guide.md#setting-up-a-configuration)\n* [Configuration file example](docs/usage_guide.md#configuration-file-example)\n* [Configuration options](docs/usage_guide.md#configuration-options)\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuonsoft%2Fopenapi-mock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuonsoft%2Fopenapi-mock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuonsoft%2Fopenapi-mock/lists"}