{"id":20288919,"url":"https://github.com/adam-it/msgraph-developer-proxy-plugin-conditional-mocks","last_synced_at":"2025-10-25T00:05:33.660Z","repository":{"id":103728581,"uuid":"606900486","full_name":"Adam-it/msgraph-developer-proxy-plugin-conditional-mocks","owner":"Adam-it","description":"custom plugin for Microsoft Graph developer proxy that supports adding conditions to mocks","archived":false,"fork":false,"pushed_at":"2023-03-08T00:29:09.000Z","size":236,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-04T04:28:15.446Z","etag":null,"topics":["developer-tools","microsoft-graph","proxy"],"latest_commit_sha":null,"homepage":"","language":"C#","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/Adam-it.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-02-26T21:56:12.000Z","updated_at":"2023-03-08T00:10:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"a56f5e90-e2e0-458a-a6dd-a52b763b22ea","html_url":"https://github.com/Adam-it/msgraph-developer-proxy-plugin-conditional-mocks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Adam-it/msgraph-developer-proxy-plugin-conditional-mocks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adam-it%2Fmsgraph-developer-proxy-plugin-conditional-mocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adam-it%2Fmsgraph-developer-proxy-plugin-conditional-mocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adam-it%2Fmsgraph-developer-proxy-plugin-conditional-mocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adam-it%2Fmsgraph-developer-proxy-plugin-conditional-mocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Adam-it","download_url":"https://codeload.github.com/Adam-it/msgraph-developer-proxy-plugin-conditional-mocks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adam-it%2Fmsgraph-developer-proxy-plugin-conditional-mocks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279034502,"owners_count":26089508,"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-10-15T02:00:07.814Z","response_time":56,"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":["developer-tools","microsoft-graph","proxy"],"created_at":"2024-11-14T14:49:32.414Z","updated_at":"2025-10-15T02:15:41.995Z","avatar_url":"https://github.com/Adam-it.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Microsoft Graph Developer Proxy Plugin - Conditional mocks\n\n### 📝 Description\n\nThis repo contains additional plugin that might be used in [Microsoft Graph Developer Proxy Plugin](https://github.com/microsoftgraph/msgraph-developer-proxy) instead of the default mocks plugin.\nThe conditional mock plugin allows to define multiple responses for the same request. The response which condition is met is returned.\n\n### 🚀 How to install\n\n\u003e The current installtion process is still to be clarified. Especially the part how to use the msgraph-developer-proxy-abstractions in a custom proxy plugin\n\n1. pull the [Microsoft Graph Developer Proxy Plugin](https://github.com/microsoftgraph/msgraph-developer-proxy) repo and build it\n2. pull this repo locally and build the project (in order to build you will need to restore NuGets and correct the reference to msgraph-developer-proxy-abstractions.dll file)\n3. copy the full output of the build to the location to GraphProxyPlugins catalog\n4. modify the `appsettings.json` file replacing the default `MockResponsePlugin` plugin with the following:\n\n```json\n    {\n      \"name\": \"ConditionalMockResponsePlugin\",\n      \"disabled\": false,\n      \"pluginPath\": \"GraphProxyPlugins\\\\msgraph-developer-proxy-plugin-conditional-mocks.dll\",\n      \"configSection\": \"mocksPlugin\"\n    }\n```\n\n5. start the Microsoft Graph Developer Proxy with `--mocks-file` option passing the path to mock.json file with conditional responses. Please check the sample [response.sample.json](/responses.sample.json) file. \n\n### 👉 Example\n\n![Example of success response based on met condition](/assets/example1.png)\n\n![Example of failure response based on met condition](/assets/example2.png)\n\n### 🛣️ Roadmap\n\nThe current solution is still in preview/prototype stage. Before the release the following milestones must be fulfilled:\n\n- [ ] Add possibility to define condition based on request headers\n- [ ] Clarify the plugin install process\n- [ ] Wait for the Microsoft Graph Developer Proxy release (align with it if needed)\n\n### ⚠ Disclaimer\n\nThis code is provided as is without warranty of any kind, either express or implied, including any implied warranties of fitness for a particular purpose, merchantability, or non-infringement.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadam-it%2Fmsgraph-developer-proxy-plugin-conditional-mocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadam-it%2Fmsgraph-developer-proxy-plugin-conditional-mocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadam-it%2Fmsgraph-developer-proxy-plugin-conditional-mocks/lists"}