{"id":30614598,"url":"https://github.com/jackd248/ddev-openapi-mock","last_synced_at":"2025-08-30T07:15:55.578Z","repository":{"id":308178071,"uuid":"1031875939","full_name":"jackd248/ddev-openapi-mock","owner":"jackd248","description":"🔌 Provides a fake OpenAPI interface for local developing \u0026 testing. ","archived":false,"fork":false,"pushed_at":"2025-08-04T14:27:18.000Z","size":78,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-29T21:40:39.401Z","etag":null,"topics":["ddev","ddev-addon","ddev-get","openapi","openapi-mock"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jackd248.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,"zenodo":null}},"created_at":"2025-08-04T13:13:29.000Z","updated_at":"2025-08-12T04:59:34.000Z","dependencies_parsed_at":"2025-08-04T18:27:51.067Z","dependency_job_id":null,"html_url":"https://github.com/jackd248/ddev-openapi-mock","commit_stats":null,"previous_names":["jackd248/ddev-openapi-mock"],"tags_count":1,"template":false,"template_full_name":"ddev/ddev-addon-template","purl":"pkg:github/jackd248/ddev-openapi-mock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackd248%2Fddev-openapi-mock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackd248%2Fddev-openapi-mock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackd248%2Fddev-openapi-mock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackd248%2Fddev-openapi-mock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackd248","download_url":"https://codeload.github.com/jackd248/ddev-openapi-mock/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackd248%2Fddev-openapi-mock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272817707,"owners_count":24998038,"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-08-30T02:00:09.474Z","response_time":77,"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":["ddev","ddev-addon","ddev-get","openapi","openapi-mock"],"created_at":"2025-08-30T07:15:51.195Z","updated_at":"2025-08-30T07:15:55.557Z","avatar_url":"https://github.com/jackd248.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# DDEV OpenAPI Mock\n\n[![add-on registry](https://img.shields.io/badge/DDEV-Add--on_Registry-blue)](https://addons.ddev.com)\n[![tests](https://github.com/jackd248/ddev-openapi-mock/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/jackd248/ddev-openapi-mock/actions/workflows/tests.yml?query=branch%3Amain)\n[![last commit](https://img.shields.io/github/last-commit/jackd248/ddev-openapi-mock)](https://github.com/jackd248/ddev-openapi-mock/commits)\n[![release](https://img.shields.io/github/v/release/jackd248/ddev-openapi-mock)](https://github.com/jackd248/ddev-openapi-mock/releases/latest)\n\u003c/div\u003e\n\n## ✨ Overview\n\nThis add-on integrates [OpenAPI Mock](https://github.com/muonsoft/openapi-mock) into your [DDEV](https://ddev.com/) project to easily test and interact with a fake OpenAPI interface.\n\nFor an integrated OpenAPI documentation, the [Swagger UI](https://swagger.io/tools/swagger-ui/) is also available.\n\n## 🔥 Installation\n\n```bash\nddev add-on get jackd248/ddev-openapi-mock\nddev restart\n```\n\nAfter installation, make sure to commit the `.ddev` directory to version control.\n\n## 📂 Configuration\n\nBy default, the OpenAPI [petstore specification](https://github.com/readmeio/oas-examples/blob/main/3.0/json/petstore.json) is used for demo purpose.\n\n\u003e [!TIP]\n\u003e You can change the location of the OpenAPI specification by setting an DDEV environment variable. See the [Advanced Customization](#advanced-customization) section below for more details.\n\n## 📊 Usage\n\nRegarding your used OpenAPI specification, you can use the following commands to interact with the OpenAPI Mock service, e.g. list all pets:\n\n```bash\n# List all pets\nddev launch :8080/v1/pets\n\n# Open Swagger UI\nddev launch :8081\n```\n\n## 🗂️ Advanced Customization\n\n### OpenAPI Mock Docker Image\n\nTo change the Docker image:\n\n```bash\nddev dotenv set .ddev/.env.openapi-mock --openapi-mock-specification=\"file:/data/openapi.json\"\nddev restart\n```\n\nMake sure to commit the `.ddev/.env.openapi-mock` file to version control.\n\nAll customization options (use with caution):\n\n| Variable | Flag | Default                                                                                            |\n| -------- | ---- |----------------------------------------------------------------------------------------------------|\n| `OPENAPI_MOCK_DOCKER_IMAGE` | `--openapi-mock-docker-image` | `muonsoft/openapi-mock:latest`                                                                     |\n| `OPENAPI_MOCK_PORT` | `--openapi-mock-port` | `8080`                                                                                             |\n| `OPENAPI_MOCK_SPECIFICATION` | `--openapi-mock-specification` | `https://raw.githubusercontent.com/muonsoft/openapi-mock/refs/heads/master/examples/petstore.yaml` |\n| `OPENAPI_MOCK_USE_EXAMPLES` | `--openapi-mock-use-examples` | `if_present`                                                                                       |\n| `OPENAPI_MOCK_CORS_ENABLED` | `--openapi-mock-cors-enabled` | `true`                                                                                             |\n\n\n\u003e [!NOTE]\n\u003e If you're using a local OpenAPI specification file, make sure to adjust the `OPENAPI_MOCK_SPECIFICATION` variable accordingly, e.g. `file:/data/openapi.json`.\n\u003e Don't forget to update the `OPENAPI_SWAGGER_SPECIFICATION` variable to a similar value, otherwise the Swagger UI will not work properly.\n\n### Swagger UI Docker Image\n\nTo change the Swagger UI Docker image:\n\n```bash\nddev dotenv set .ddev/.env.swagger-ui --openapi-swagger-specification=\"/data/openapi.json\"\nddev restart\n```\n\nMake sure to commit the `.ddev/.env.swagger-ui` file to version control.\n\nAll customization options (use with caution):\n\n| Variable | Flag                                 | Default                                                                                            |\n| -------- |--------------------------------------|----------------------------------------------------------------------------------------------------|\n| `OPENAPI_SWAGGER_SPECIFICATION` | `--openapi-swagger-specification` | `https://raw.githubusercontent.com/muonsoft/openapi-mock/refs/heads/master/examples/petstore.yaml` |\n\n\n\u003e [!NOTE]\n\u003e If you're using a local OpenAPI specification file, make sure to adjust the `OPENAPI_SWAGGER_SPECIFICATION` variable accordingly, e.g. `/data/openapi.json`.\n\n## 💎 Credits\n\n**Contributed and maintained by [@jackd248](https://github.com/jackd248)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackd248%2Fddev-openapi-mock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackd248%2Fddev-openapi-mock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackd248%2Fddev-openapi-mock/lists"}