├── .editorconfig ├── .gitattributes ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug.yml │ └── docs.yml ├── dependabot.yml ├── fabricbot.json ├── policies │ └── dev-proxy-branch-protection.yml └── workflows │ ├── codeql-analysis.yml │ ├── codeql-required-workaround.yml │ ├── create-release.yml │ ├── dotnet-required-workaround.yml │ └── dotnet.yml ├── .gitignore ├── .vscode ├── .gitignore ├── launch.json └── tasks.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── DevProxy.Abstractions ├── DevProxy.Abstractions.csproj ├── Extensions │ ├── CommandLineExtensions.cs │ ├── FuncExtensions.cs │ ├── ILoggerExtensions.cs │ └── JsonExtensions.cs ├── LanguageModel │ ├── CompletionOptions.cs │ ├── ILanguageModelChatCompletionMessage.cs │ ├── ILanguageModelClient.cs │ ├── ILanguageModelCompletionResponse.cs │ ├── LanguageModelClientFactory.cs │ ├── LanguageModelConfiguration.cs │ ├── OllamaLanguageModelClient.cs │ ├── OllamaModels.cs │ ├── OpenAIContentPartJsonConverter.cs │ ├── OpenAILanguageModelClient.cs │ ├── OpenAIModels.cs │ └── PricesData.cs ├── Models │ ├── GraphBatchRequestPayload.cs │ ├── GraphBatchResponsePayload.cs │ ├── MockRequest.cs │ └── MockResponse.cs ├── OpenTelemetry │ └── SemanticConvention.cs ├── Plugins │ ├── BaseLoader.cs │ ├── BasePlugin.cs │ ├── BaseReportingPlugin.cs │ ├── IPlugin.cs │ ├── IReport.cs │ └── PluginEvents.cs ├── Proxy │ ├── IProxyConfiguration.cs │ ├── IProxyLogger.cs │ ├── ProxyEvents.cs │ ├── ResponseState.cs │ └── UrlToWatch.cs ├── Utils │ ├── MSGraphDbUtils.cs │ ├── ProxyUtils.cs │ └── UrlRegexComparer.cs └── packages.lock.json ├── DevProxy.Plugins ├── ApiCenter │ └── ApiCenterClient.cs ├── Behavior │ ├── GenericErrorResponsesLoader.cs │ ├── GenericRandomErrorPlugin.cs │ ├── GraphRandomErrorPlugin.cs │ ├── LatencyPlugin.cs │ ├── RateLimitingCustomResponseLoader.cs │ ├── RateLimitingPlugin.cs │ └── RetryAfterPlugin.cs ├── DevProxy.Plugins.csproj ├── Extensions │ ├── ApiCenterExtensions.cs │ ├── OpenApiDocumentExtensions.cs │ ├── StringExtensions.cs │ └── TypeSpecExtensions.cs ├── Generation │ ├── ApiCenterOnboardingPlugin.cs │ ├── ApiCenterOnboardingPluginReport.cs │ ├── HttpFileGeneratorPlugin.cs │ ├── HttpFileGeneratorPluginReport.cs │ ├── MockGeneratorPlugin.cs │ ├── OpenApiSpecGeneratorPlugin.cs │ ├── OpenApiSpecGeneratorPluginReport.cs │ └── TypeSpecGeneratorPlugin.cs ├── Guidance │ ├── CachingGuidancePlugin.cs │ ├── GraphBetaSupportGuidancePlugin.cs │ ├── GraphClientRequestIdGuidancePlugin.cs │ ├── GraphConnectorGuidancePlugin.cs │ ├── GraphSdkGuidancePlugin.cs │ ├── GraphSelectGuidancePlugin.cs │ ├── ODSPSearchGuidancePlugin.cs │ └── ODataPagingGuidancePlugin.cs ├── Handlers │ ├── AuthenticationDelegatingHandler.cs │ └── TracingDelegatingHandler.cs ├── Inspection │ ├── CDPModel.cs │ ├── DevToolsPlugin.cs │ ├── LanguageModelPricingLoader.cs │ ├── OpenAITelemetryPlugin.cs │ └── WebSocketServer.cs ├── Manipulation │ ├── RewritePlugin.cs │ └── RewritesLoader.cs ├── Mocking │ ├── AuthPlugin.cs │ ├── CrudApiDefinitionLoader.cs │ ├── CrudApiPlugin.cs │ ├── EntraMockResponsePlugin.cs │ ├── GraphMockResponsePlugin.cs │ ├── MockRequestLoader.cs │ ├── MockRequestPlugin.cs │ ├── MockResponsePlugin.cs │ ├── MockResponsesLoader.cs │ └── OpenAIMockResponsePlugin.cs ├── Models │ ├── ApiCenterModels.cs │ ├── ApiOperation.cs │ ├── ApiPermissionError.cs │ ├── ApiPermissionsInfo.cs │ ├── CsomTypesDefinition.cs │ ├── GenericErrorResponse.cs │ ├── GraphErrorObjects.cs │ ├── GraphPermissionError.cs │ ├── GraphPermissionInfo.cs │ ├── GraphPermissionsType.cs │ ├── GraphRequestInfo.cs │ ├── GraphResultsAndErrors.cs │ ├── Http.cs │ └── TypeSpec │ │ ├── Auth.cs │ │ └── Http.cs ├── Reporters │ ├── BaseReporter.cs │ ├── JsonReporter.cs │ ├── MarkdownReporter.cs │ └── PlainTextReporter.cs ├── Reporting │ ├── ApiCenterMinimalPermissionsPlugin.cs │ ├── ApiCenterMinimalPermissionsPluginReport.cs │ ├── ApiCenterProductionVersionPlugin.cs │ ├── ApiCenterProductionVersionPluginReport.cs │ ├── CsomTypesDefinitionLoader.cs │ ├── ExecutionSummaryPlugin.cs │ ├── ExecutionSummaryPluginReportBase.cs │ ├── GraphMinimalPermissionsGuidancePlugin.cs │ ├── GraphMinimalPermissionsGuidancePluginReport.cs │ ├── GraphMinimalPermissionsPlugin.cs │ ├── GraphMinimalPermissionsPluginReport.cs │ ├── MinimalCsomPermissionsPlugin.cs │ ├── MinimalCsomPermissionsPluginReport.cs │ ├── MinimalPermissionsGuidancePlugin.cs │ ├── MinimalPermissionsPlugin.cs │ ├── MinimalPermissionsPluginReport.cs │ ├── UrlDiscoveryPlugin.cs │ └── UrlDiscoveryPluginReport.cs ├── SharePoint │ └── CsomParser.cs ├── Utils │ ├── GraphUtils.cs │ ├── MessageUtils.cs │ ├── MethodAndUrlComparer.cs │ └── MinimalPermissionsUtils.cs └── packages.lock.json ├── DevProxy.sln ├── DevProxy ├── Announcement.cs ├── ApiControllers │ ├── JwtInfo.cs │ ├── ProxyController.cs │ └── ProxyInfo.cs ├── Commands │ ├── CertCommand.cs │ ├── ConfigCommand.cs │ ├── DevProxyCommand.cs │ ├── JwtBinder.cs │ ├── JwtCommand.cs │ ├── MsGraphDbCommand.cs │ └── OutdatedCommand.cs ├── DevProxy.csproj ├── Extensions │ ├── ConfigurationManagerExtensions.cs │ ├── ILoggingBuilderExtensions.cs │ └── IServiceCollectionExtensions.cs ├── Jwt │ ├── JwtCreatorOptions.cs │ ├── JwtIssuer.cs │ ├── JwtOptions.cs │ └── JwtTokenGenerator.cs ├── Logging │ ├── AnsiParser.cs │ ├── ILoggerExtensions.cs │ ├── LogEntry.cs │ ├── ProxyConsoleFormatter.cs │ ├── ProxyConsoleFormatterOptions.cs │ ├── RequestLogger.cs │ └── TextWriterExtensions.cs ├── Plugins │ ├── PluginLoadContext.cs │ ├── PluginReference.cs │ └── PluginServiceExtensions.cs ├── Program.cs ├── Properties │ └── launchSettings.json ├── Proxy │ ├── CertificateDiskCache.cs │ ├── IProxyState.cs │ ├── IProxyStateController.cs │ ├── InactivityTimer.cs │ ├── ProxyConfiguration.cs │ ├── ProxyEngine.cs │ ├── ProxyState.cs │ └── ProxyStateController.cs ├── UpdateNotification.cs ├── config │ ├── m365-mocks.json │ ├── m365.json │ ├── microsoft-graph-rate-limiting.json │ ├── microsoft-graph.json │ ├── picture.jpg │ └── spo-csom-types.json ├── devproxy-errors.json ├── devproxyrc.json ├── msgraph-openapi-v1.db ├── packages.lock.json ├── toggle-proxy.sh └── trust-cert.sh ├── Dockerfile ├── Dockerfile_beta ├── LICENSE ├── README.md ├── SECURITY.md ├── SUPPORT.md ├── THIRD PARTY NOTICES ├── install-beta.iss ├── install.iss ├── media ├── banner.png ├── icon-beta.ico ├── icon-beta.png ├── icon.ico ├── icon.png ├── icon.svg └── icon_bg.png ├── schemas ├── v0.14.1 │ ├── crudapiplugin.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── mockresponseplugin.schema.json │ ├── ratelimitingplugin.schema.json │ └── rc.schema.json ├── v0.15.0 │ ├── crudapiplugin.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── mockresponseplugin.schema.json │ ├── ratelimitingplugin.schema.json │ └── rc.schema.json ├── v0.16.0 │ ├── crudapiplugin.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── mockrequestplugin.schema.json │ ├── mockresponseplugin.schema.json │ ├── ratelimitingplugin.schema.json │ └── rc.schema.json ├── v0.16.1 │ ├── crudapiplugin.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── mockrequestplugin.schema.json │ ├── mockresponseplugin.schema.json │ ├── ratelimitingplugin.schema.json │ └── rc.schema.json ├── v0.16.2 │ ├── crudapiplugin.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── mockrequestplugin.schema.json │ ├── mockresponseplugin.schema.json │ ├── ratelimitingplugin.schema.json │ └── rc.schema.json ├── v0.17.0 │ ├── crudapiplugin.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── mockrequestplugin.schema.json │ ├── mockresponseplugin.schema.json │ ├── ratelimitingplugin.schema.json │ └── rc.schema.json ├── v0.17.1 │ ├── crudapiplugin.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── mockrequestplugin.schema.json │ ├── mockresponseplugin.schema.json │ ├── ratelimitingplugin.schema.json │ └── rc.schema.json ├── v0.18.0 │ ├── crudapiplugin.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── mockrequestplugin.schema.json │ ├── mockresponseplugin.schema.json │ ├── ratelimitingplugin.schema.json │ └── rc.schema.json ├── v0.19.0 │ ├── crudapiplugin.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── mockrequestplugin.schema.json │ ├── mockresponseplugin.schema.json │ ├── ratelimitingplugin.schema.json │ └── rc.schema.json ├── v0.19.1 │ ├── crudapiplugin.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── mockrequestplugin.schema.json │ ├── mockresponseplugin.schema.json │ ├── ratelimitingplugin.schema.json │ └── rc.schema.json ├── v0.20.0 │ ├── crudapiplugin.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── mockrequestplugin.schema.json │ ├── mockresponseplugin.schema.json │ ├── ratelimitingplugin.schema.json │ └── rc.schema.json ├── v0.20.1 │ ├── crudapiplugin.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── mockrequestplugin.schema.json │ ├── mockresponseplugin.schema.json │ ├── ratelimitingplugin.schema.json │ └── rc.schema.json ├── v0.21.0 │ ├── crudapiplugin.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── mockrequestplugin.schema.json │ ├── mockresponseplugin.schema.json │ ├── ratelimitingplugin.schema.json │ └── rc.schema.json ├── v0.22.0 │ ├── crudapiplugin.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── mockrequestplugin.schema.json │ ├── mockresponseplugin.schema.json │ ├── ratelimitingplugin.schema.json │ └── rc.schema.json ├── v0.23.0 │ ├── crudapiplugin.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── mockrequestplugin.schema.json │ ├── mockresponseplugin.schema.json │ ├── ratelimitingplugin.schema.json │ ├── rc.schema.json │ └── rewriteplugin.schema.json ├── v0.24.0 │ ├── crudapiplugin.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── mockrequestplugin.schema.json │ ├── mockresponseplugin.schema.json │ ├── ratelimitingplugin.schema.json │ ├── rc.schema.json │ └── rewriteplugin.schema.json ├── v0.25.0 │ ├── apicenterminimalpermissionsplugin.schema.json │ ├── apicenteronboardingplugin.schema.json │ ├── apicenterproductionversionplugin.schema.json │ ├── authplugin.schema.json │ ├── cachingguidanceplugin.schema.json │ ├── crudapiplugin.apifile.schema.json │ ├── crudapiplugin.schema.json │ ├── devtoolsplugin.schema.json │ ├── executionsummaryplugin.schema.json │ ├── genericrandomerrorplugin.errorsfile.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── graphconnectornotificationplugin.schema.json │ ├── graphminimalpermissionsguidanceplugin.schema.json │ ├── graphminimalpermissionsplugin.schema.json │ ├── graphrandomerrorplugin.schema.json │ ├── httpfilegeneratorplugin.schema.json │ ├── latencyplugin.schema.json │ ├── minimalpermissionsplugin.schema.json │ ├── mockrequestplugin.mockfile.schema.json │ ├── mockrequestplugin.schema.json │ ├── mockresponseplugin.mocksfile.schema.json │ ├── mockresponseplugin.schema.json │ ├── openapispecgeneratorplugin.schema.json │ ├── ratelimitingplugin.customresponsefile.schema.json │ ├── ratelimitingplugin.schema.json │ ├── rc.schema.json │ ├── rewriteplugin.rewritesfile.schema.json │ └── rewriteplugin.schema.json ├── v0.26.0 │ ├── apicenterminimalpermissionsplugin.schema.json │ ├── apicenteronboardingplugin.schema.json │ ├── apicenterproductionversionplugin.schema.json │ ├── authplugin.schema.json │ ├── cachingguidanceplugin.schema.json │ ├── crudapiplugin.apifile.schema.json │ ├── crudapiplugin.schema.json │ ├── devtoolsplugin.schema.json │ ├── executionsummaryplugin.schema.json │ ├── genericrandomerrorplugin.errorsfile.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── graphconnectornotificationplugin.schema.json │ ├── graphminimalpermissionsguidanceplugin.schema.json │ ├── graphminimalpermissionsplugin.schema.json │ ├── graphrandomerrorplugin.schema.json │ ├── httpfilegeneratorplugin.schema.json │ ├── latencyplugin.schema.json │ ├── minimalcsompermissions.types.schema.json │ ├── minimalcsompermissionsplugin.schema.json │ ├── minimalpermissionsguidanceplugin.schema.json │ ├── minimalpermissionsplugin.schema.json │ ├── mockrequestplugin.mockfile.schema.json │ ├── mockrequestplugin.schema.json │ ├── mockresponseplugin.mocksfile.schema.json │ ├── mockresponseplugin.schema.json │ ├── openapispecgeneratorplugin.schema.json │ ├── ratelimitingplugin.customresponsefile.schema.json │ ├── ratelimitingplugin.schema.json │ ├── rc.schema.json │ ├── rewriteplugin.rewritesfile.schema.json │ └── rewriteplugin.schema.json ├── v0.27.0 │ ├── apicenterminimalpermissionsplugin.schema.json │ ├── apicenteronboardingplugin.schema.json │ ├── apicenterproductionversionplugin.schema.json │ ├── authplugin.schema.json │ ├── cachingguidanceplugin.schema.json │ ├── crudapiplugin.apifile.schema.json │ ├── crudapiplugin.schema.json │ ├── devtoolsplugin.schema.json │ ├── executionsummaryplugin.schema.json │ ├── genericrandomerrorplugin.errorsfile.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── graphconnectornotificationplugin.schema.json │ ├── graphminimalpermissionsguidanceplugin.schema.json │ ├── graphminimalpermissionsplugin.schema.json │ ├── graphrandomerrorplugin.schema.json │ ├── httpfilegeneratorplugin.schema.json │ ├── latencyplugin.schema.json │ ├── minimalcsompermissions.types.schema.json │ ├── minimalcsompermissionsplugin.schema.json │ ├── minimalpermissionsguidanceplugin.schema.json │ ├── minimalpermissionsplugin.schema.json │ ├── mockrequestplugin.mockfile.schema.json │ ├── mockrequestplugin.schema.json │ ├── mockresponseplugin.mocksfile.schema.json │ ├── mockresponseplugin.schema.json │ ├── openapispecgeneratorplugin.schema.json │ ├── ratelimitingplugin.customresponsefile.schema.json │ ├── ratelimitingplugin.schema.json │ ├── rc.schema.json │ ├── rewriteplugin.rewritesfile.schema.json │ ├── rewriteplugin.schema.json │ └── typespecgeneratorplugin.schema.json └── v0.28.0 │ ├── apicenterminimalpermissionsplugin.schema.json │ ├── apicenteronboardingplugin.schema.json │ ├── apicenterproductionversionplugin.schema.json │ ├── authplugin.schema.json │ ├── cachingguidanceplugin.schema.json │ ├── crudapiplugin.apifile.schema.json │ ├── crudapiplugin.schema.json │ ├── devtoolsplugin.schema.json │ ├── executionsummaryplugin.schema.json │ ├── genericrandomerrorplugin.errorsfile.schema.json │ ├── genericrandomerrorplugin.schema.json │ ├── graphminimalpermissionsguidanceplugin.schema.json │ ├── graphminimalpermissionsplugin.schema.json │ ├── graphrandomerrorplugin.schema.json │ ├── httpfilegeneratorplugin.schema.json │ ├── latencyplugin.schema.json │ ├── minimalcsompermissions.types.schema.json │ ├── minimalcsompermissionsplugin.schema.json │ ├── minimalpermissionsguidanceplugin.schema.json │ ├── minimalpermissionsplugin.schema.json │ ├── mockrequestplugin.mockfile.schema.json │ ├── mockrequestplugin.schema.json │ ├── mockresponseplugin.mocksfile.schema.json │ ├── mockresponseplugin.schema.json │ ├── openaitelemetryplugin.pricesfile.schema.json │ ├── openaitelemetryplugin.schema.json │ ├── openapispecgeneratorplugin.schema.json │ ├── ratelimitingplugin.customresponsefile.schema.json │ ├── ratelimitingplugin.schema.json │ ├── rc.schema.json │ ├── rewriteplugin.rewritesfile.schema.json │ ├── rewriteplugin.schema.json │ └── typespecgeneratorplugin.schema.json ├── scripts ├── Dockerfile_local ├── local-build.ps1 ├── local-docker.ps1 ├── local-setup.ps1 ├── setup-beta.ps1 ├── setup-beta.sh ├── setup.ps1 ├── setup.sh └── version.ps1 └── tests └── devproxy-api.http /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.sh text eol=lf -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @dotnet/dev-proxy-maintainers -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: nuget 4 | directories: 5 | - "/dev-proxy" 6 | - "/dev-proxy-abstractions" 7 | - "/dev-proxy-plugins" 8 | schedule: 9 | interval: daily 10 | 11 | - package-ecosystem: "docker" 12 | directory: "/" 13 | schedule: 14 | interval: daily 15 | 16 | - package-ecosystem: "github-actions" 17 | directory: "/" 18 | schedule: 19 | interval: daily -------------------------------------------------------------------------------- /.github/workflows/codeql-required-workaround.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL" # name must match the original workflow 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: [ main ] 7 | paths: ['samples/**', '**.md', '.vscode/**', '**.svg'] # must be the exact opposite of the original workflow 8 | pull_request: 9 | paths: ['samples/**', '**.md', '.vscode/**', '**.svg'] 10 | 11 | # https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks 12 | 13 | permissions: 14 | contents: read 15 | 16 | jobs: 17 | analyze: #names must match the original workflow 18 | name: Analyze (csharp) 19 | runs-on: ubuntu-latest 20 | steps: 21 | - run: 'echo "No CodeQL Analysis required"' -------------------------------------------------------------------------------- /.github/workflows/dotnet-required-workaround.yml: -------------------------------------------------------------------------------- 1 | name: .NET # name must match the original workflow 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: [ main ] 7 | paths: ['samples/**', '**.md', '.vscode/**', '**.svg'] # must be the exact opposite of the original workflow 8 | pull_request: 9 | paths: ['samples/**', '**.md', '.vscode/**', '**.svg'] 10 | 11 | # https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks 12 | 13 | permissions: 14 | contents: read 15 | 16 | jobs: 17 | build: 18 | runs-on: ubuntu-latest 19 | steps: 20 | - run: 'echo "No build required"' -------------------------------------------------------------------------------- /.github/workflows/dotnet.yml: -------------------------------------------------------------------------------- 1 | name: .NET 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: [ main ] 7 | paths-ignore: ['samples/**', '**.md', '.vscode/**', '**.svg'] 8 | pull_request: 9 | # The branches below must be a subset of the branches above 10 | paths-ignore: ['samples/**', '**.md', '.vscode/**', '**.svg'] 11 | 12 | permissions: 13 | contents: read 14 | 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | 20 | steps: 21 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 22 | - name: Setup .NET 23 | uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1 24 | with: 25 | dotnet-version: 9.0.x 26 | - name: Restore workloads 27 | run: dotnet workload restore 28 | - name: Restore dependencies 29 | run: dotnet restore DevProxy.sln --locked-mode 30 | - name: Build 31 | run: dotnet build DevProxy.sln --no-restore 32 | # We really should have tests, putting these steps here for when we have a build process 33 | # - name: Test 34 | # run: dotnet test DevProxy.sln --no-build --verbosity normal --collect:"XPlat Code Coverage" 35 | # - name: Install report generator 36 | # run: dotnet tool install --global dotnet-reportgenerator-globaltool 37 | # - name: Generate coverage report 38 | # run: reportgenerator -reports:**/coverage.cobertura.xml -targetdir:./reports/coverage 39 | # - uses: actions/upload-artifact@v3 40 | # with: 41 | # name: coverage 42 | # path: reports/coverage 43 | -------------------------------------------------------------------------------- /.vscode/.gitignore: -------------------------------------------------------------------------------- 1 | settings.json -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | // Use IntelliSense to find out which attributes exist for C# debugging 6 | // Use hover for the description of the existing attributes 7 | // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md 8 | "name": ".NET Core Launch (console)", 9 | "type": "coreclr", 10 | "request": "launch", 11 | "preLaunchTask": "build", 12 | // If you have changed target frameworks, make sure to update the program path. 13 | "program": "${workspaceFolder}/DevProxy/bin/Debug/net9.0/devproxy.dll", 14 | "args": [], 15 | "cwd": "${workspaceFolder}/DevProxy/bin/Debug/net9.0", 16 | // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console 17 | "console": "integratedTerminal", 18 | "stopAtEntry": false, 19 | "launchSettingsProfile": "Default", 20 | "env": { 21 | "ASPNETCORE_ENVIRONMENT": "Development" 22 | } 23 | }, 24 | { 25 | "name": ".NET Core Attach", 26 | "type": "coreclr", 27 | "request": "attach" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "build", 6 | "command": "dotnet", 7 | "type": "process", 8 | "args": [ 9 | "build", 10 | "${workspaceFolder}/DevProxy.sln", 11 | "/property:GenerateFullPaths=true", 12 | "/consoleloggerparameters:NoSummary" 13 | ], 14 | "problemMatcher": "$msCompile", 15 | "group": { 16 | "kind": "build", 17 | "isDefault": true 18 | } 19 | }, 20 | { 21 | "label": "publish", 22 | "command": "dotnet", 23 | "type": "process", 24 | "args": [ 25 | "publish", 26 | "${workspaceFolder}/DevProxy.sln", 27 | "/property:GenerateFullPaths=true", 28 | "/consoleloggerparameters:NoSummary" 29 | ], 30 | "problemMatcher": "$msCompile" 31 | }, 32 | { 33 | "label": "watch", 34 | "command": "dotnet", 35 | "type": "process", 36 | "args": [ 37 | "watch", 38 | "run", 39 | "--project", 40 | "${workspaceFolder}/DevProxy.sln" 41 | ], 42 | "problemMatcher": "$msCompile" 43 | } 44 | ] 45 | } -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | This project has adopted the code of conduct defined by the Contributor Covenant 4 | to clarify expected behavior in our community. 5 | 6 | For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct). 7 | -------------------------------------------------------------------------------- /DevProxy.Abstractions/DevProxy.Abstractions.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | DevProxy.Abstractions 6 | enable 7 | enable 8 | 0.28.0 9 | false 10 | true 11 | true 12 | AllEnabledByDefault 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /DevProxy.Abstractions/Extensions/FuncExtensions.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | // from: https://github.com/justcoding121/titanium-web-proxy/blob/902504a324425e4e49fc5ba604c2b7fa172e68ce/src/Titanium.Web.Proxy/Extensions/FuncExtensions.cs 6 | 7 | #pragma warning disable IDE0130 8 | namespace Titanium.Web.Proxy.EventArguments; 9 | #pragma warning restore IDE0130 10 | 11 | public static class FuncExtensions 12 | { 13 | internal static async Task InvokeAsync(this AsyncEventHandler callback, object sender, T args, ExceptionHandler? exceptionFunc) 14 | { 15 | var invocationList = callback.GetInvocationList(); 16 | 17 | foreach (var @delegate in invocationList) 18 | { 19 | await InternalInvokeAsync((AsyncEventHandler)@delegate, sender, args, exceptionFunc); 20 | } 21 | } 22 | 23 | private static async Task InternalInvokeAsync(AsyncEventHandler callback, object sender, T e, ExceptionHandler? exceptionFunc) 24 | { 25 | try 26 | { 27 | await callback(sender, e); 28 | } 29 | catch (Exception ex) 30 | { 31 | exceptionFunc?.Invoke(new InvalidOperationException("Exception thrown in user event", ex)); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /DevProxy.Abstractions/Extensions/ILoggerExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json; 2 | using DevProxy.Abstractions.Proxy; 3 | 4 | #pragma warning disable IDE0130 5 | namespace Microsoft.Extensions.Logging; 6 | #pragma warning restore IDE0130 7 | 8 | public static class ILoggerExtensions 9 | { 10 | public static void LogRequest(this ILogger logger, string message, MessageType messageType, LoggingContext? context = null) 11 | { 12 | logger.Log(new RequestLog(message, messageType, context)); 13 | } 14 | 15 | public static void LogRequest(this ILogger logger, string message, MessageType messageType, string method, string url) 16 | { 17 | logger.Log(new RequestLog(message, messageType, method, url)); 18 | } 19 | 20 | public static void Log(this ILogger logger, RequestLog message) 21 | { 22 | ArgumentNullException.ThrowIfNull(logger); 23 | 24 | logger.Log(LogLevel.Information, 0, message, exception: null, (m, _) => JsonSerializer.Serialize(m)); 25 | } 26 | } -------------------------------------------------------------------------------- /DevProxy.Abstractions/Extensions/JsonExtensions.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | #pragma warning disable IDE0130 6 | namespace System.Text.Json; 7 | #pragma warning restore IDE0130 8 | 9 | // from https://stackoverflow.com/questions/61553962/getting-nested-properties-with-system-text-json 10 | public static partial class JsonExtensions 11 | { 12 | public static JsonElement? Get(this JsonElement element, string name) => 13 | element.ValueKind != JsonValueKind.Null && element.ValueKind != JsonValueKind.Undefined && element.TryGetProperty(name, out var value) 14 | ? value : null; 15 | 16 | public static JsonElement? Get(this JsonElement element, int index) 17 | { 18 | if (element.ValueKind is JsonValueKind.Null or JsonValueKind.Undefined) 19 | { 20 | return null; 21 | } 22 | // Throw if index < 0 23 | return index < element.GetArrayLength() ? element[index] : null; 24 | } 25 | } -------------------------------------------------------------------------------- /DevProxy.Abstractions/LanguageModel/CompletionOptions.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using System.Text.Json.Serialization; 6 | 7 | namespace DevProxy.Abstractions.LanguageModel; 8 | 9 | public class CompletionOptions 10 | { 11 | [JsonPropertyName("temperature")] 12 | public double? Temperature { get; set; } 13 | } -------------------------------------------------------------------------------- /DevProxy.Abstractions/LanguageModel/ILanguageModelChatCompletionMessage.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Abstractions.LanguageModel; 6 | 7 | public interface ILanguageModelChatCompletionMessage 8 | { 9 | object Content { get; set; } 10 | string Role { get; set; } 11 | } -------------------------------------------------------------------------------- /DevProxy.Abstractions/LanguageModel/ILanguageModelClient.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Abstractions.LanguageModel; 6 | 7 | public interface ILanguageModelClient 8 | { 9 | Task GenerateChatCompletionAsync(IEnumerable messages, CompletionOptions? options = null); 10 | Task GenerateCompletionAsync(string prompt, CompletionOptions? options = null); 11 | Task IsEnabledAsync(); 12 | } -------------------------------------------------------------------------------- /DevProxy.Abstractions/LanguageModel/ILanguageModelCompletionResponse.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Abstractions.LanguageModel; 6 | 7 | public interface ILanguageModelCompletionResponse 8 | { 9 | string? ErrorMessage { get; } 10 | string? Response { get; } 11 | // custom property added to log in the mock output 12 | string? RequestUrl { get; set; } 13 | 14 | OpenAIResponse ConvertToOpenAIResponse(); 15 | } -------------------------------------------------------------------------------- /DevProxy.Abstractions/LanguageModel/LanguageModelClientFactory.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using Microsoft.Extensions.Configuration; 6 | using Microsoft.Extensions.DependencyInjection; 7 | 8 | namespace DevProxy.Abstractions.LanguageModel; 9 | 10 | public static class LanguageModelClientFactory 11 | { 12 | public static ILanguageModelClient Create(IServiceProvider serviceProvider, IConfiguration configuration) 13 | { 14 | ArgumentNullException.ThrowIfNull(serviceProvider); 15 | ArgumentNullException.ThrowIfNull(configuration); 16 | 17 | var lmSection = configuration.GetSection("LanguageModelClient"); 18 | var config = lmSection?.Get(); 19 | 20 | return config?.Client switch 21 | { 22 | LanguageModelClient.Ollama => ActivatorUtilities.CreateInstance(serviceProvider), 23 | LanguageModelClient.OpenAI => ActivatorUtilities.CreateInstance(serviceProvider), 24 | _ => ActivatorUtilities.CreateInstance(serviceProvider) 25 | }; 26 | } 27 | } -------------------------------------------------------------------------------- /DevProxy.Abstractions/LanguageModel/LanguageModelConfiguration.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Abstractions.LanguageModel; 6 | 7 | public enum LanguageModelClient 8 | { 9 | Ollama, 10 | OpenAI 11 | } 12 | 13 | public class LanguageModelConfiguration 14 | { 15 | public bool CacheResponses { get; set; } = true; 16 | public LanguageModelClient Client { get; set; } = LanguageModelClient.OpenAI; 17 | public bool Enabled { get; set; } 18 | public string Model { get; set; } = "llama3.2"; 19 | // default Ollama URL 20 | public string? Url { get; set; } = "http://localhost:11434/v1/"; 21 | } -------------------------------------------------------------------------------- /DevProxy.Abstractions/Models/GraphBatchRequestPayload.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Abstractions.Models; 6 | 7 | public class GraphBatchRequestPayload 8 | { 9 | public IEnumerable Requests { get; set; } = []; 10 | } 11 | 12 | public class GraphBatchRequestPayloadRequest 13 | { 14 | public object? Body { get; set; } 15 | #pragma warning disable CA2227 16 | public Dictionary? Headers { get; set; } = []; 17 | #pragma warning restore CA2227 18 | public string Id { get; set; } = string.Empty; 19 | public string Method { get; set; } = string.Empty; 20 | public string Url { get; set; } = string.Empty; 21 | } -------------------------------------------------------------------------------- /DevProxy.Abstractions/Models/GraphBatchResponsePayload.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Abstractions.Models; 6 | 7 | public class GraphBatchResponsePayload 8 | { 9 | public IEnumerable Responses { get; set; } = []; 10 | } 11 | 12 | public class GraphBatchResponsePayloadResponse 13 | { 14 | public dynamic? Body { get; set; } 15 | #pragma warning disable CA2227 16 | public Dictionary? Headers { get; set; } 17 | #pragma warning restore CA2227 18 | public string Id { get; set; } = string.Empty; 19 | public int Status { get; set; } = 200; 20 | } 21 | 22 | public class GraphBatchResponsePayloadResponseBody 23 | { 24 | public GraphBatchResponsePayloadResponseBodyError? Error { get; set; } 25 | } 26 | 27 | public class GraphBatchResponsePayloadResponseBodyError 28 | { 29 | public string Code { get; set; } = string.Empty; 30 | public string Message { get; set; } = string.Empty; 31 | } -------------------------------------------------------------------------------- /DevProxy.Abstractions/Models/MockRequest.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Abstractions.Models; 6 | 7 | public class MockRequest 8 | { 9 | public dynamic? Body { get; set; } 10 | public IEnumerable? Headers { get; set; } 11 | public string Method { get; set; } = "POST"; 12 | public string Url { get; set; } = string.Empty; 13 | } 14 | 15 | public class MockRequestHeader 16 | { 17 | public string Name { get; set; } = string.Empty; 18 | public string Value { get; set; } = string.Empty; 19 | 20 | public MockRequestHeader() 21 | { 22 | } 23 | 24 | public MockRequestHeader(string name, string value) 25 | { 26 | Name = name; 27 | Value = value; 28 | } 29 | } -------------------------------------------------------------------------------- /DevProxy.Abstractions/Models/MockResponse.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using System.Text.Json; 6 | 7 | namespace DevProxy.Abstractions.Models; 8 | 9 | public class MockResponse : ICloneable 10 | { 11 | public MockResponseRequest? Request { get; set; } 12 | public MockResponseResponse? Response { get; set; } 13 | 14 | public object Clone() 15 | { 16 | var json = JsonSerializer.Serialize(this); 17 | return JsonSerializer.Deserialize(json) ?? new MockResponse(); 18 | } 19 | } 20 | 21 | public class MockResponseRequest 22 | { 23 | public string? BodyFragment { get; set; } 24 | public string Method { get; set; } = "GET"; 25 | public int? Nth { get; set; } 26 | public string Url { get; set; } = string.Empty; 27 | } 28 | 29 | public class MockResponseResponse 30 | { 31 | public dynamic? Body { get; set; } 32 | public IEnumerable? Headers { get; set; } 33 | public int? StatusCode { get; set; } = 200; 34 | } 35 | 36 | public class MockResponseHeader 37 | { 38 | public string Name { get; set; } = string.Empty; 39 | public string Value { get; set; } = string.Empty; 40 | 41 | public MockResponseHeader() 42 | { 43 | } 44 | 45 | public MockResponseHeader(string name, string value) 46 | { 47 | Name = name; 48 | Value = value; 49 | } 50 | } -------------------------------------------------------------------------------- /DevProxy.Abstractions/Plugins/IPlugin.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using DevProxy.Abstractions.Proxy; 6 | using Microsoft.Extensions.Configuration; 7 | using Microsoft.Extensions.DependencyInjection; 8 | using System.CommandLine; 9 | 10 | namespace DevProxy.Abstractions.Plugins; 11 | 12 | public interface IPlugin 13 | { 14 | string Name { get; } 15 | bool Enabled { get; } 16 | Option[] GetOptions(); 17 | Command[] GetCommands(); 18 | 19 | Task InitializeAsync(InitArgs e); 20 | void OptionsLoaded(OptionsLoadedArgs e); 21 | Task BeforeRequestAsync(ProxyRequestArgs e); 22 | Task BeforeResponseAsync(ProxyResponseArgs e); 23 | Task AfterResponseAsync(ProxyResponseArgs e); 24 | Task AfterRequestLogAsync(RequestLogArgs e); 25 | Task AfterRecordingStopAsync(RecordingArgs e); 26 | Task MockRequestAsync(EventArgs e); 27 | } 28 | 29 | public interface IPlugin : IPlugin 30 | { 31 | TConfiguration Configuration { get; } 32 | IConfigurationSection ConfigurationSection { get; } 33 | 34 | void Register(IServiceCollection services, TConfiguration configuration); 35 | } -------------------------------------------------------------------------------- /DevProxy.Abstractions/Plugins/IReport.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Abstractions.Plugins; 6 | 7 | public interface IJsonReport 8 | { 9 | string FileExtension { get; } 10 | 11 | object ToJson(); 12 | } 13 | 14 | public interface IMarkdownReport 15 | { 16 | string? ToMarkdown(); 17 | } 18 | 19 | public interface IPlainTextReport 20 | { 21 | string? ToPlainText(); 22 | } 23 | -------------------------------------------------------------------------------- /DevProxy.Abstractions/Proxy/IProxyConfiguration.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using DevProxy.Abstractions.Models; 6 | using Microsoft.Extensions.Logging; 7 | using System.Runtime.Serialization; 8 | 9 | namespace DevProxy.Abstractions.Proxy; 10 | 11 | public enum ReleaseType 12 | { 13 | [EnumMember(Value = "none")] 14 | None, 15 | [EnumMember(Value = "stable")] 16 | Stable, 17 | [EnumMember(Value = "beta")] 18 | Beta 19 | } 20 | 21 | public interface IProxyConfiguration 22 | { 23 | int ApiPort { get; } 24 | bool AsSystemProxy { get; set; } 25 | string ConfigFile { get; } 26 | #pragma warning disable CA2227 27 | Dictionary Env { get; set; } 28 | #pragma warning restore CA2227 29 | IEnumerable? FilterByHeaders { get; } 30 | bool InstallCert { get; set; } 31 | string? IPAddress { get; set; } 32 | LogLevel LogLevel { get; } 33 | ReleaseType NewVersionNotification { get; } 34 | bool NoFirstRun { get; set; } 35 | int Port { get; set; } 36 | bool Record { get; set; } 37 | bool ShowTimestamps { get; } 38 | long? TimeoutSeconds { get; set; } 39 | bool ValidateSchemas { get; } 40 | IEnumerable WatchPids { get; set; } 41 | IEnumerable WatchProcessNames { get; set; } 42 | } -------------------------------------------------------------------------------- /DevProxy.Abstractions/Proxy/IProxyLogger.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using Titanium.Web.Proxy.EventArguments; 6 | 7 | namespace DevProxy.Abstractions.Proxy; 8 | 9 | public enum MessageType 10 | { 11 | Normal, 12 | InterceptedRequest, 13 | PassedThrough, 14 | Warning, 15 | Tip, 16 | Failed, 17 | Chaos, 18 | Mocked, 19 | InterceptedResponse, 20 | FinishedProcessingRequest, 21 | Skipped, 22 | Processed, 23 | Timestamp 24 | } 25 | 26 | public class LoggingContext(SessionEventArgs session) 27 | { 28 | public SessionEventArgs Session { get; } = session; 29 | } -------------------------------------------------------------------------------- /DevProxy.Abstractions/Proxy/ResponseState.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Abstractions.Proxy; 6 | 7 | public class ResponseState 8 | { 9 | /// 10 | /// Should be set to true when and event handler for a BeforeResponse event modifies a response. 11 | /// If true caution should be used when making further modifications to the response as unintended consequences may arise 12 | /// 13 | public bool HasBeenModified { get; set; } 14 | /// 15 | /// Should be set to true when an event handler for a BeforeRequest event sets a response. 16 | /// If true no other plugin handling the BeforeRequest event should set a response. 17 | /// 18 | public bool HasBeenSet { get; set; } 19 | } 20 | -------------------------------------------------------------------------------- /DevProxy.Abstractions/Proxy/UrlToWatch.cs: -------------------------------------------------------------------------------- 1 | using System.Text.RegularExpressions; 2 | 3 | namespace DevProxy.Abstractions.Proxy; 4 | 5 | public class UrlToWatch(Regex url, bool exclude = false) 6 | { 7 | public bool Exclude { get; } = exclude; 8 | public Regex Url { get; } = url; 9 | } -------------------------------------------------------------------------------- /DevProxy.Plugins/Behavior/RateLimitingCustomResponseLoader.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using DevProxy.Abstractions.Utils; 6 | using DevProxy.Abstractions.Proxy; 7 | using DevProxy.Abstractions.Plugins; 8 | using Microsoft.Extensions.Logging; 9 | using System.Text.Json; 10 | using DevProxy.Abstractions.Models; 11 | 12 | namespace DevProxy.Plugins.Behavior; 13 | 14 | internal sealed class RateLimitingCustomResponseLoader( 15 | ILogger logger, 16 | RateLimitConfiguration configuration, 17 | IProxyConfiguration proxyConfiguration) : 18 | BaseLoader(logger, proxyConfiguration) 19 | { 20 | private readonly ILogger _logger = logger; 21 | private readonly RateLimitConfiguration _configuration = configuration; 22 | 23 | protected override string FilePath => _configuration.CustomResponseFile; 24 | 25 | protected override void LoadData(string fileContents) 26 | { 27 | try 28 | { 29 | var response = JsonSerializer.Deserialize(fileContents, ProxyUtils.JsonSerializerOptions); 30 | if (response is not null) 31 | { 32 | _configuration.CustomResponse = response; 33 | } 34 | } 35 | catch (Exception ex) 36 | { 37 | _logger.LogError(ex, "An error has occurred while reading {ConfigurationFile}:", _configuration.CustomResponseFile); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /DevProxy.Plugins/Generation/HttpFileGeneratorPluginReport.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using DevProxy.Abstractions.Plugins; 6 | using System.Text; 7 | 8 | namespace DevProxy.Plugins.Generation; 9 | 10 | public sealed class HttpFileGeneratorPluginReport : 11 | List, IMarkdownReport, IPlainTextReport 12 | { 13 | public HttpFileGeneratorPluginReport() : base() { } 14 | 15 | public HttpFileGeneratorPluginReport(IEnumerable collection) : base(collection) { } 16 | 17 | public string? ToMarkdown() 18 | { 19 | var sb = new StringBuilder(); 20 | 21 | _ = sb.AppendLine("# Generated HTTP files") 22 | .AppendLine() 23 | .AppendJoin(Environment.NewLine, $"- {this}") 24 | .AppendLine() 25 | .AppendLine(); 26 | 27 | return sb.ToString(); 28 | } 29 | 30 | public string? ToPlainText() 31 | { 32 | var sb = new StringBuilder(); 33 | 34 | _ = sb.AppendLine("Generated HTTP files:") 35 | .AppendLine() 36 | .AppendJoin(Environment.NewLine, this); 37 | 38 | return sb.ToString(); 39 | } 40 | } -------------------------------------------------------------------------------- /DevProxy.Plugins/Generation/OpenApiSpecGeneratorPluginReport.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using DevProxy.Abstractions.Plugins; 6 | using System.Text; 7 | 8 | namespace DevProxy.Plugins.Generation; 9 | 10 | public sealed class OpenApiSpecGeneratorPluginReportItem 11 | { 12 | public required string FileName { get; init; } 13 | public required string ServerUrl { get; init; } 14 | } 15 | 16 | public sealed class OpenApiSpecGeneratorPluginReport : 17 | List, IMarkdownReport, IPlainTextReport 18 | { 19 | public OpenApiSpecGeneratorPluginReport() : base() { } 20 | 21 | public OpenApiSpecGeneratorPluginReport(IEnumerable collection) : base(collection) { } 22 | 23 | public string? ToMarkdown() 24 | { 25 | var sb = new StringBuilder(); 26 | 27 | _ = sb.AppendLine("# Generated OpenAPI specs") 28 | .AppendLine() 29 | .AppendLine("Server URL|File name") 30 | .AppendLine("---|---------") 31 | .AppendJoin(Environment.NewLine, this.Select(r => $"{r.ServerUrl}|{r.FileName}")) 32 | .AppendLine() 33 | .AppendLine(); 34 | 35 | return sb.ToString(); 36 | } 37 | 38 | public string? ToPlainText() 39 | { 40 | var sb = new StringBuilder(); 41 | 42 | _ = sb.AppendLine("Generated OpenAPI specs:") 43 | .AppendLine() 44 | .AppendJoin(Environment.NewLine, this.Select(i => $"- {i.FileName} ({i.ServerUrl})")); 45 | 46 | return sb.ToString(); 47 | } 48 | } -------------------------------------------------------------------------------- /DevProxy.Plugins/Handlers/AuthenticationDelegatingHandler.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using Azure.Core; 6 | 7 | namespace DevProxy.Plugins.Handlers; 8 | 9 | internal sealed class AuthenticationDelegatingHandler(TokenCredential credential, string[] scopes) : DelegatingHandler 10 | { 11 | private string? _accessToken; 12 | private readonly TokenCredential _credential = credential; 13 | private DateTimeOffset? _expiresOn; 14 | private readonly string[] _scopes = scopes; 15 | 16 | public async Task GetAccessTokenAsync(CancellationToken cancellationToken) 17 | { 18 | if (_expiresOn is null || _expiresOn < DateTimeOffset.UtcNow) 19 | { 20 | var accessToken = await _credential.GetTokenAsync(new(_scopes), cancellationToken); 21 | _expiresOn = accessToken.ExpiresOn; 22 | _accessToken = accessToken.Token; 23 | } 24 | 25 | return _accessToken; 26 | } 27 | 28 | protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 29 | { 30 | var accessToken = await GetAccessTokenAsync(cancellationToken); 31 | 32 | request.Headers.Authorization = new("Bearer", accessToken); 33 | 34 | return await base.SendAsync(request, cancellationToken); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /DevProxy.Plugins/Models/ApiOperation.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Plugins.Models; 6 | 7 | public class ApiOperation 8 | { 9 | public required string Method { get; init; } 10 | public required string OriginalUrl { get; init; } 11 | public required string TokenizedUrl { get; init; } 12 | } -------------------------------------------------------------------------------- /DevProxy.Plugins/Models/ApiPermissionError.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Plugins.Models; 6 | 7 | public class ApiPermissionError 8 | { 9 | public required string Error { get; init; } 10 | public required string Request { get; init; } 11 | } 12 | -------------------------------------------------------------------------------- /DevProxy.Plugins/Models/ApiPermissionsInfo.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Plugins.Models; 6 | 7 | public class ApiPermissionsInfo 8 | { 9 | public required IEnumerable Errors { get; init; } 10 | public required IEnumerable MinimalScopes { get; init; } 11 | public required IEnumerable OperationsFromRequests { get; init; } 12 | public required IEnumerable TokenPermissions { get; init; } 13 | public required IEnumerable UnmatchedOperations { get; init; } 14 | } -------------------------------------------------------------------------------- /DevProxy.Plugins/Models/CsomTypesDefinition.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using System.Text.Json.Serialization; 6 | 7 | namespace DevProxy.Plugins.Models; 8 | 9 | #pragma warning disable CA2227 10 | public class CsomTypesDefinition 11 | { 12 | 13 | [JsonPropertyName("actions")] 14 | public Dictionary? Actions { get; set; } 15 | [JsonPropertyName("returnTypes")] 16 | public Dictionary? ReturnTypes { get; set; } 17 | [JsonPropertyName("$schema")] 18 | public string? Schema { get; set; } 19 | 20 | [JsonPropertyName("types")] 21 | public Dictionary? Types { get; set; } 22 | } 23 | #pragma warning restore CA2227 24 | 25 | public class CsomActionPermissions 26 | { 27 | [JsonPropertyName("application")] 28 | public IEnumerable? Application { get; set; } 29 | [JsonPropertyName("delegated")] 30 | public IEnumerable? Delegated { get; set; } 31 | 32 | } -------------------------------------------------------------------------------- /DevProxy.Plugins/Models/GenericErrorResponse.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Plugins.Models; 6 | 7 | public class GenericErrorResponse 8 | { 9 | public GenericErrorResponseRequest? Request { get; set; } 10 | public IEnumerable? Responses { get; set; } 11 | } 12 | 13 | public class GenericErrorResponseRequest 14 | { 15 | public string? BodyFragment { get; set; } 16 | public string Method { get; set; } = "GET"; 17 | public string Url { get; set; } = string.Empty; 18 | } 19 | 20 | public class GenericErrorResponseResponse 21 | { 22 | public dynamic? Body { get; set; } 23 | public IEnumerable? Headers { get; set; } 24 | public int? StatusCode { get; set; } = 400; 25 | } 26 | 27 | public class GenericErrorResponseHeader 28 | { 29 | public string Name { get; set; } = string.Empty; 30 | public string Value { get; set; } = string.Empty; 31 | 32 | public GenericErrorResponseHeader() 33 | { 34 | } 35 | 36 | public GenericErrorResponseHeader(string name, string value) 37 | { 38 | Name = name; 39 | Value = value; 40 | } 41 | } -------------------------------------------------------------------------------- /DevProxy.Plugins/Models/GraphErrorObjects.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using System.Text.Json.Serialization; 6 | 7 | namespace DevProxy.Plugins.Models; 8 | 9 | public class GraphErrorResponseBody(GraphErrorResponseError error) 10 | { 11 | public GraphErrorResponseError Error { get; set; } = error; 12 | } 13 | 14 | public class GraphErrorResponseError 15 | { 16 | public string Code { get; set; } = string.Empty; 17 | public GraphErrorResponseInnerError? InnerError { get; set; } 18 | public string Message { get; set; } = string.Empty; 19 | } 20 | 21 | public class GraphErrorResponseInnerError 22 | { 23 | public string Date { get; set; } = string.Empty; 24 | [JsonPropertyName("request-id")] 25 | public string RequestId { get; set; } = string.Empty; 26 | } 27 | -------------------------------------------------------------------------------- /DevProxy.Plugins/Models/GraphPermissionError.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using System.Text.Json.Serialization; 6 | 7 | namespace DevProxy.Plugins.Models; 8 | 9 | internal sealed class GraphPermissionError 10 | { 11 | public string Message { get; set; } = string.Empty; 12 | [JsonPropertyName("requestUrl")] 13 | public string Url { get; set; } = string.Empty; 14 | } -------------------------------------------------------------------------------- /DevProxy.Plugins/Models/GraphPermissionInfo.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Plugins.Models; 6 | 7 | internal sealed class GraphPermissionInfo 8 | { 9 | public string ConsentDescription { get; set; } = string.Empty; 10 | public string ConsentDisplayName { get; set; } = string.Empty; 11 | public bool IsAdmin { get; set; } 12 | public bool IsHidden { get; set; } 13 | public bool IsLeastPrivilege { get; set; } 14 | public string ScopeType { get; set; } = string.Empty; 15 | public string Value { get; set; } = string.Empty; 16 | } -------------------------------------------------------------------------------- /DevProxy.Plugins/Models/GraphPermissionsType.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Plugins.Models; 6 | 7 | public enum GraphPermissionsType 8 | { 9 | Application, 10 | Delegated 11 | } -------------------------------------------------------------------------------- /DevProxy.Plugins/Models/GraphRequestInfo.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using System.Text.Json.Serialization; 6 | 7 | namespace DevProxy.Plugins.Models; 8 | 9 | public class GraphRequestInfo 10 | { 11 | public string Method { get; set; } = string.Empty; 12 | [JsonPropertyName("requestUrl")] 13 | public string Url { get; set; } = string.Empty; 14 | } -------------------------------------------------------------------------------- /DevProxy.Plugins/Models/GraphResultsAndErrors.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Plugins.Models; 6 | 7 | internal sealed class GraphResultsAndErrors 8 | { 9 | public GraphPermissionError[]? Errors { get; set; } 10 | public GraphPermissionInfo[]? Results { get; set; } 11 | } -------------------------------------------------------------------------------- /DevProxy.Plugins/Reporters/MarkdownReporter.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using DevProxy.Abstractions.Plugins; 6 | using DevProxy.Abstractions.Proxy; 7 | using Microsoft.Extensions.Logging; 8 | 9 | namespace DevProxy.Plugins.Reporters; 10 | 11 | public class MarkdownReporter( 12 | ILogger logger, 13 | ISet urlsToWatch) : BaseReporter(logger, urlsToWatch) 14 | { 15 | public override string Name => nameof(MarkdownReporter); 16 | public override string FileExtension => ".md"; 17 | 18 | protected override string? GetReport(KeyValuePair report) 19 | { 20 | Logger.LogDebug("Transforming {Report}...", report.Key); 21 | 22 | var reportData = report.Value; 23 | if (reportData is IMarkdownReport markdownReport) 24 | { 25 | return markdownReport.ToMarkdown(); 26 | } 27 | else 28 | { 29 | Logger.LogDebug("No transformer found for {ReportType}", reportData.GetType().Name); 30 | return null; 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /DevProxy.Plugins/Reporters/PlainTextReporter.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using DevProxy.Abstractions.Plugins; 6 | using DevProxy.Abstractions.Proxy; 7 | using Microsoft.Extensions.Logging; 8 | 9 | namespace DevProxy.Plugins.Reporters; 10 | 11 | public class PlainTextReporter( 12 | ILogger logger, 13 | ISet urlsToWatch) : BaseReporter(logger, urlsToWatch) 14 | { 15 | public override string Name => nameof(PlainTextReporter); 16 | public override string FileExtension => ".txt"; 17 | 18 | protected override string? GetReport(KeyValuePair report) 19 | { 20 | Logger.LogDebug("Transforming {Report}...", report.Key); 21 | 22 | var reportData = report.Value; 23 | if (reportData is IPlainTextReport markdownReport) 24 | { 25 | return markdownReport.ToPlainText(); 26 | } 27 | else 28 | { 29 | Logger.LogDebug("No transformer found for {ReportType}", reportData.GetType().Name); 30 | return null; 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /DevProxy.Plugins/Utils/MessageUtils.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Plugins.Utils; 6 | 7 | internal sealed class MessageUtils 8 | { 9 | public static string BuildUseSdkForErrorsMessage() => 10 | $"To handle API errors more easily, use the Microsoft Graph SDK. More info at {GetMoveToSdkUrl()}"; 11 | 12 | public static string BuildUseSdkMessage() => 13 | $"To more easily follow best practices for working with Microsoft Graph, use the Microsoft Graph SDK. More info at {GetMoveToSdkUrl()}"; 14 | 15 | public static string GetMoveToSdkUrl() 16 | { 17 | // TODO: return language-specific guidance links based on the language detected from the User-Agent 18 | return "https://aka.ms/devproxy/guidance/move-to-js-sdk"; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /DevProxy.Plugins/Utils/MethodAndUrlComparer.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Plugins.Utils; 6 | 7 | internal sealed class MethodAndUrlComparer : IEqualityComparer<(string method, string url)> 8 | { 9 | public bool Equals((string method, string url) x, (string method, string url) y) => 10 | x.method == y.method && x.url == y.url; 11 | 12 | public int GetHashCode((string method, string url) obj) 13 | { 14 | var methodHashCode = obj.method.GetHashCode(StringComparison.OrdinalIgnoreCase); 15 | var urlHashCode = obj.url.GetHashCode(StringComparison.OrdinalIgnoreCase); 16 | 17 | return methodHashCode ^ urlHashCode; 18 | } 19 | } -------------------------------------------------------------------------------- /DevProxy/Announcement.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using System.Text.RegularExpressions; 6 | 7 | namespace DevProxy; 8 | 9 | static class Announcement 10 | { 11 | private static readonly Uri announcementUrl = new("https://aka.ms/devproxy/announcement"); 12 | 13 | public static async Task ShowAsync() 14 | { 15 | var announcement = await GetAsync(); 16 | if (!string.IsNullOrEmpty(announcement)) 17 | { 18 | // Unescape the announcement to remove any escape characters 19 | // in case we're using ANSI escape codes for color formatting 20 | announcement = Regex.Unescape(announcement); 21 | await Console.Error.WriteLineAsync(announcement); 22 | } 23 | } 24 | 25 | public static async Task GetAsync() 26 | { 27 | try 28 | { 29 | using var client = new HttpClient(); 30 | return await client.GetStringAsync(announcementUrl); 31 | } 32 | catch 33 | { 34 | return null; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /DevProxy/ApiControllers/JwtInfo.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.ApiControllers; 6 | 7 | sealed class JwtInfo 8 | { 9 | public required string Token { get; set; } 10 | } -------------------------------------------------------------------------------- /DevProxy/ApiControllers/ProxyInfo.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using DevProxy.Abstractions.Proxy; 6 | using DevProxy.Proxy; 7 | 8 | namespace DevProxy.ApiControllers; 9 | 10 | sealed class ProxyInfo 11 | { 12 | public bool? Recording { get; set; } 13 | public string? ConfigFile { get; init; } 14 | 15 | public static ProxyInfo From(IProxyState proxyState, IProxyConfiguration proxyConfiguration) 16 | { 17 | return new ProxyInfo 18 | { 19 | ConfigFile = proxyConfiguration.ConfigFile, 20 | Recording = proxyState.IsRecording 21 | }; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /DevProxy/Commands/CertCommand.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using DevProxy.Proxy; 6 | using System.CommandLine; 7 | using System.CommandLine.Parsing; 8 | 9 | namespace DevProxy.Commands; 10 | 11 | sealed class CertCommand : Command 12 | { 13 | private readonly ILogger _logger; 14 | 15 | public CertCommand(ILogger logger) : 16 | base("cert", "Manage the Dev Proxy certificate") 17 | { 18 | _logger = logger; 19 | 20 | ConfigureCommand(); 21 | } 22 | 23 | private void ConfigureCommand() 24 | { 25 | var certEnsureCommand = new Command("ensure", "Ensure certificates are setup (creates root if required). Also makes root certificate trusted."); 26 | certEnsureCommand.SetHandler(EnsureCertAsync); 27 | 28 | this.AddCommands(new List 29 | { 30 | certEnsureCommand 31 | }.OrderByName()); 32 | } 33 | 34 | private async Task EnsureCertAsync() 35 | { 36 | _logger.LogTrace("EnsureCertAsync() called"); 37 | 38 | try 39 | { 40 | _logger.LogInformation("Ensuring certificate exists and is trusted..."); 41 | await ProxyEngine.ProxyServer.CertificateManager.EnsureRootCertificateAsync(); 42 | _logger.LogInformation("DONE"); 43 | } 44 | catch (Exception ex) 45 | { 46 | _logger.LogError(ex, "Error ensuring certificate"); 47 | } 48 | 49 | _logger.LogTrace("EnsureCertAsync() finished"); 50 | } 51 | } -------------------------------------------------------------------------------- /DevProxy/Commands/MsGraphDbCommand.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using DevProxy.Abstractions.Utils; 6 | using System.CommandLine; 7 | using System.CommandLine.Invocation; 8 | 9 | namespace DevProxy.Commands; 10 | 11 | sealed class MsGraphDbCommand : Command 12 | { 13 | private readonly ILogger _logger; 14 | 15 | public MsGraphDbCommand(ILogger logger) : 16 | base("msgraphdb", "Generate a local SQLite database with Microsoft Graph API metadata") 17 | { 18 | _logger = logger; 19 | ConfigureCommand(); 20 | } 21 | 22 | private void ConfigureCommand() 23 | { 24 | this.SetHandler(GenerateMsGraphDbAsync); 25 | } 26 | 27 | private async Task GenerateMsGraphDbAsync(InvocationContext context) 28 | { 29 | _ = await MSGraphDbUtils.GenerateMSGraphDbAsync(_logger); 30 | } 31 | } -------------------------------------------------------------------------------- /DevProxy/Jwt/JwtCreatorOptions.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using System.Security.Cryptography; 6 | 7 | namespace DevProxy.Jwt; 8 | 9 | internal sealed record JwtCreatorOptions 10 | { 11 | public required IEnumerable Audiences { get; init; } 12 | public required Dictionary Claims { get; init; } 13 | public required string Issuer { get; init; } 14 | public required string Name { get; init; } 15 | public required IEnumerable Roles { get; init; } 16 | public required string Scheme { get; init; } 17 | public required IEnumerable Scopes { get; init; } 18 | public required string SigningKey { get; init; } 19 | public DateTime NotBefore { get; init; } 20 | public DateTime ExpiresOn { get; init; } 21 | 22 | public static JwtCreatorOptions Create(JwtOptions options) 23 | { 24 | return new JwtCreatorOptions 25 | { 26 | Scheme = "Bearer", 27 | Name = options.Name ?? "Dev Proxy", 28 | Audiences = options.Audiences ?? ["https://myserver.com"], 29 | Issuer = options.Issuer ?? "dev-proxy", 30 | Roles = options.Roles ?? [], 31 | Scopes = options.Scopes ?? [], 32 | Claims = options.Claims ?? [], 33 | NotBefore = DateTime.UtcNow, 34 | ExpiresOn = DateTime.UtcNow.AddMinutes(options.ValidFor ?? 60), 35 | SigningKey = string.IsNullOrEmpty(options.SigningKey) ? RandomNumberGenerator.GetHexString(32) : options.SigningKey 36 | }; 37 | } 38 | } -------------------------------------------------------------------------------- /DevProxy/Jwt/JwtOptions.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Jwt; 6 | 7 | sealed class JwtOptions 8 | { 9 | public IEnumerable? Audiences { get; set; } 10 | public Dictionary? Claims { get; set; } 11 | public string? Issuer { get; set; } 12 | public string? Name { get; set; } 13 | public IEnumerable? Roles { get; set; } 14 | public IEnumerable? Scopes { get; set; } 15 | public string? SigningKey { get; set; } 16 | public double? ValidFor { get; set; } 17 | } 18 | -------------------------------------------------------------------------------- /DevProxy/Jwt/JwtTokenGenerator.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using System.IdentityModel.Tokens.Jwt; 6 | using System.Text; 7 | 8 | namespace DevProxy.Jwt; 9 | 10 | internal static class JwtTokenGenerator 11 | { 12 | internal static string CreateToken(JwtOptions jwtOptions) 13 | { 14 | var options = JwtCreatorOptions.Create(jwtOptions); 15 | 16 | var jwtIssuer = new JwtIssuer( 17 | options.Issuer, 18 | Encoding.UTF8.GetBytes(options.SigningKey) 19 | ); 20 | 21 | var jwtToken = jwtIssuer.CreateSecurityToken(options); 22 | return new JwtSecurityTokenHandler().WriteToken(jwtToken); 23 | } 24 | } -------------------------------------------------------------------------------- /DevProxy/Logging/ILoggerExtensions.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | #pragma warning disable IDE0130 6 | namespace Microsoft.Extensions.Logging; 7 | #pragma warning restore IDE0130 8 | 9 | static class ILoggerExtensions 10 | { 11 | public static IDisposable? BeginScope(this ILogger logger, string method, string url, int requestId) => 12 | logger.BeginScope(new Dictionary 13 | { 14 | { nameof(method), method }, 15 | { nameof(url), url }, 16 | { nameof(requestId), requestId } 17 | }); 18 | } -------------------------------------------------------------------------------- /DevProxy/Logging/LogEntry.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using Microsoft.Extensions.Logging.Abstractions; 6 | 7 | namespace DevProxy.Logging; 8 | 9 | readonly struct LogEntry 10 | { 11 | public LogLevel LogLevel { get; init; } 12 | public string Category { get; init; } 13 | public EventId EventId { get; init; } 14 | public string? Message { get; init; } 15 | public Exception? Exception { get; init; } 16 | 17 | public static LogEntry FromLogEntry(LogEntry logEntry) 18 | { 19 | return new() 20 | { 21 | LogLevel = logEntry.LogLevel, 22 | Category = logEntry.Category, 23 | EventId = logEntry.EventId, 24 | Message = logEntry.Formatter(logEntry.State, logEntry.Exception), 25 | Exception = logEntry.Exception 26 | }; 27 | } 28 | } -------------------------------------------------------------------------------- /DevProxy/Logging/ProxyConsoleFormatterOptions.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using Microsoft.Extensions.Logging.Console; 6 | 7 | namespace DevProxy.Logging; 8 | 9 | sealed class ProxyConsoleFormatterOptions : ConsoleFormatterOptions 10 | { 11 | public bool ShowSkipMessages { get; set; } = true; 12 | 13 | public bool ShowTimestamps { get; set; } = true; 14 | } -------------------------------------------------------------------------------- /DevProxy/Logging/RequestLogger.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using DevProxy.Abstractions.Plugins; 6 | using DevProxy.Abstractions.Proxy; 7 | using DevProxy.Proxy; 8 | using Microsoft.VisualStudio.Threading; 9 | 10 | namespace DevProxy.Logging; 11 | 12 | sealed class RequestLogger(IEnumerable plugins, IProxyState proxyState) : ILogger 13 | { 14 | private readonly IEnumerable _plugins = plugins; 15 | private readonly IProxyState _proxyState = proxyState; 16 | 17 | public bool IsEnabled(LogLevel logLevel) => true; 18 | 19 | public IDisposable? BeginScope(TState state) where TState : notnull => default; 20 | 21 | public void Log(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func formatter) 22 | { 23 | if (state is RequestLog requestLog) 24 | { 25 | if (_proxyState.IsRecording) 26 | { 27 | _proxyState.RequestLogs.Add(requestLog); 28 | } 29 | 30 | var requestLogArgs = new RequestLogArgs(requestLog); 31 | 32 | using var joinableTaskContext = new JoinableTaskContext(); 33 | var joinableTaskFactory = new JoinableTaskFactory(joinableTaskContext); 34 | 35 | foreach (var plugin in _plugins.Where(p => p.Enabled)) 36 | { 37 | joinableTaskFactory.Run(async () => await plugin.AfterRequestLogAsync(requestLogArgs)); 38 | } 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /DevProxy/Plugins/PluginLoadContext.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using System.Reflection; 6 | using System.Runtime.Loader; 7 | 8 | namespace DevProxy.Plugins; 9 | 10 | sealed class PluginLoadContext(string pluginPath) : AssemblyLoadContext 11 | { 12 | private readonly AssemblyDependencyResolver _resolver = new(pluginPath); 13 | 14 | protected override Assembly? Load(AssemblyName assemblyName) 15 | { 16 | var assemblyPath = _resolver.ResolveAssemblyToPath(assemblyName); 17 | return assemblyPath is not null ? LoadFromAssemblyPath(assemblyPath) : null; 18 | } 19 | 20 | protected override IntPtr LoadUnmanagedDll(string unmanagedDllName) 21 | { 22 | var libraryPath = _resolver.ResolveUnmanagedDllToPath(unmanagedDllName); 23 | return libraryPath is not null ? LoadUnmanagedDllFromPath(libraryPath) : IntPtr.Zero; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /DevProxy/Plugins/PluginReference.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Plugins; 6 | 7 | internal sealed class PluginReference 8 | { 9 | public bool Enabled { get; set; } = true; 10 | public string? ConfigSection { get; set; } 11 | public string Name { get; set; } = string.Empty; 12 | public string PluginPath { get; set; } = string.Empty; 13 | public List? UrlsToWatch { get; set; } 14 | } -------------------------------------------------------------------------------- /DevProxy/Program.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using DevProxy; 6 | using DevProxy.Commands; 7 | using System.Net; 8 | 9 | static WebApplication BuildApplication(string[] args) 10 | { 11 | var builder = WebApplication.CreateBuilder(args); 12 | 13 | _ = builder.Configuration.ConfigureDevProxyConfig(); 14 | _ = builder.Logging.ConfigureDevProxyLogging(builder.Configuration); 15 | _ = builder.Services.ConfigureDevProxyServices(builder.Configuration, args); 16 | 17 | var defaultIpAddress = "127.0.0.1"; 18 | var ipAddress = DevProxyCommand.IPAddress ?? 19 | builder.Configuration.GetValue("ipAddress", defaultIpAddress) ?? 20 | defaultIpAddress; 21 | _ = builder.WebHost.ConfigureKestrel(options => 22 | { 23 | var apiPort = builder.Configuration.GetValue("apiPort", 8897); 24 | options.Listen(IPAddress.Parse(ipAddress), apiPort); 25 | }); 26 | 27 | var app = builder.Build(); 28 | 29 | _ = app.UseSwagger(); 30 | _ = app.UseSwaggerUI(); 31 | _ = app.MapControllers(); 32 | 33 | return app; 34 | } 35 | _ = Announcement.ShowAsync(); 36 | 37 | var app = BuildApplication(args); 38 | 39 | var rootCommand = app.Services.GetRequiredService(); 40 | var loggerFactory = app.Services.GetRequiredService(); 41 | 42 | var exitCode = await rootCommand.InvokeAsync(args, app); 43 | loggerFactory.Dispose(); 44 | Environment.Exit(exitCode); 45 | -------------------------------------------------------------------------------- /DevProxy/Proxy/IProxyState.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using DevProxy.Abstractions.Proxy; 6 | 7 | namespace DevProxy.Proxy; 8 | 9 | interface IProxyState 10 | { 11 | Dictionary GlobalData { get; set; } 12 | bool IsRecording { get; set; } 13 | List RequestLogs { get; set; } 14 | } -------------------------------------------------------------------------------- /DevProxy/Proxy/IProxyStateController.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Proxy; 6 | 7 | interface IProxyStateController 8 | { 9 | IProxyState ProxyState { get; } 10 | void StartRecording(); 11 | Task StopRecordingAsync(); 12 | Task MockRequestAsync(); 13 | void StopProxy(); 14 | } -------------------------------------------------------------------------------- /DevProxy/Proxy/InactivityTimer.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace DevProxy.Proxy; 6 | 7 | internal sealed class InactivityTimer(long timeoutSeconds, Action timeoutAction) : IDisposable 8 | { 9 | private readonly TimeSpan _timeout = TimeSpan.FromSeconds(timeoutSeconds); 10 | private readonly Timer _timer = new(_ => timeoutAction.Invoke(), null, TimeSpan.FromSeconds(timeoutSeconds), Timeout.InfiniteTimeSpan); 11 | 12 | public void Dispose() => _timer.Dispose(); 13 | public void Reset() => _timer.Change(_timeout, Timeout.InfiniteTimeSpan); 14 | public void Stop() => _timer.Dispose(); 15 | } -------------------------------------------------------------------------------- /DevProxy/Proxy/ProxyState.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using DevProxy.Abstractions.Proxy; 6 | using DevProxy.Abstractions.Utils; 7 | 8 | namespace DevProxy.Proxy; 9 | 10 | sealed class ProxyState : IProxyState 11 | { 12 | public bool IsRecording { get; set; } 13 | public List RequestLogs { get; set; } = []; 14 | public Dictionary GlobalData { get; set; } = new() { 15 | { ProxyUtils.ReportsKey, new Dictionary() } 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /DevProxy/config/microsoft-graph-rate-limiting.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.28.0/rc.schema.json", 3 | "plugins": [ 4 | { 5 | "name": "RateLimitingPlugin", 6 | "enabled": true, 7 | "pluginPath": "~appFolder/plugins/dev-proxy-plugins.dll" 8 | } 9 | ], 10 | "urlsToWatch": [ 11 | "https://graph.microsoft.com/*/drive*", 12 | "https://graph.microsoft.com/*/shares/*", 13 | "https://graph.microsoft.com/*/sites/*", 14 | "https://graph.microsoft.us/*/drive*", 15 | "https://graph.microsoft.us/*/shares/*", 16 | "https://graph.microsoft.us/*/sites/*", 17 | "https://dod-graph.microsoft.us/*/drive*", 18 | "https://dod-graph.microsoft.us/*/shares/*", 19 | "https://dod-graph.microsoft.us/*/sites/*", 20 | "https://microsoftgraph.chinacloudapi.cn/*/drive*", 21 | "https://microsoftgraph.chinacloudapi.cn/*/shares/*", 22 | "https://microsoftgraph.chinacloudapi.cn/*/sites/*" 23 | ], 24 | "labelMode": "text", 25 | "logLevel": "information" 26 | } 27 | -------------------------------------------------------------------------------- /DevProxy/config/picture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/dev-proxy/e71a9e278e17c21d69b91cbb5a316922ddbe1762/DevProxy/config/picture.jpg -------------------------------------------------------------------------------- /DevProxy/devproxyrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.28.0/rc.schema.json", 3 | "plugins": [ 4 | { 5 | "name": "RetryAfterPlugin", 6 | "enabled": true, 7 | "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll" 8 | }, 9 | { 10 | "name": "GenericRandomErrorPlugin", 11 | "enabled": true, 12 | "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll", 13 | "configSection": "genericRandomErrorPlugin" 14 | } 15 | ], 16 | "urlsToWatch": [ 17 | "https://jsonplaceholder.typicode.com/*" 18 | ], 19 | "genericRandomErrorPlugin": { 20 | "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.28.0/genericrandomerrorplugin.schema.json", 21 | "errorsFile": "devproxy-errors.json", 22 | "rate": 50 23 | }, 24 | "logLevel": "information", 25 | "newVersionNotification": "stable", 26 | "showSkipMessages": true, 27 | "showTimestamps": true, 28 | "validateSchemas": true 29 | } -------------------------------------------------------------------------------- /DevProxy/msgraph-openapi-v1.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/dev-proxy/e71a9e278e17c21d69b91cbb5a316922ddbe1762/DevProxy/msgraph-openapi-v1.db -------------------------------------------------------------------------------- /DevProxy/toggle-proxy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | toggle=$1 4 | ip=$2 5 | port=$3 6 | 7 | network_services=$(networksetup -listallnetworkservices | tail -n +2) 8 | 9 | if [[ "$toggle" == "on" ]]; then 10 | while IFS= read -r service; do 11 | networksetup -setsecurewebproxy "$service" $ip $port 12 | networksetup -setwebproxy "$service" $ip $port 13 | done <<<"$network_services" 14 | elif [[ "$toggle" == "off" ]]; then 15 | while IFS= read -r service; do 16 | networksetup -setsecurewebproxystate "$service" off 17 | networksetup -setwebproxystate "$service" off 18 | done <<<"$network_services" 19 | else 20 | echo "Set the first argument to on or off." 21 | fi -------------------------------------------------------------------------------- /DevProxy/trust-cert.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | echo -e "\nDev Proxy uses a self-signed certificate to intercept and inspect HTTPS traffic." 5 | read -r -p "Update the certificate in your Keychain so that it's trusted by your browser? (Y/n): " answer 6 | 7 | if [ "$answer" = "n" ] || [ "$answer" = "N" ]; then 8 | echo -e "\n\033[1;33mTrust the certificate in your Keychain manually to avoid errors.\033[0m\n" 9 | exit 1 10 | fi 11 | 12 | echo -e "\n" 13 | 14 | cert_name="Dev Proxy CA" 15 | # export cert from keychain to PEM 16 | echo "Exporting Dev Proxy certificate..." 17 | security find-certificate -c "$cert_name" -a -p > dev-proxy-ca.pem 18 | # add trusted cert to keychain 19 | echo "Updating Dev Proxy trust settings..." 20 | security add-trusted-cert -r trustRoot -k ~/Library/Keychains/login.keychain-db dev-proxy-ca.pem 21 | # remove exported cert 22 | echo "Cleaning up..." 23 | rm dev-proxy-ca.pem 24 | echo -e "\033[0;32mDONE\033[0m\n" -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) .NET Foundation and Contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Support 2 | 3 | ## How to file issues and get help 4 | 5 | This project uses GitHub Issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new Issue. 6 | 7 | ## Microsoft Support Policy 8 | 9 | Support for this **PROJECT** is limited to the resources listed above. 10 | -------------------------------------------------------------------------------- /media/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/dev-proxy/e71a9e278e17c21d69b91cbb5a316922ddbe1762/media/banner.png -------------------------------------------------------------------------------- /media/icon-beta.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/dev-proxy/e71a9e278e17c21d69b91cbb5a316922ddbe1762/media/icon-beta.ico -------------------------------------------------------------------------------- /media/icon-beta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/dev-proxy/e71a9e278e17c21d69b91cbb5a316922ddbe1762/media/icon-beta.png -------------------------------------------------------------------------------- /media/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/dev-proxy/e71a9e278e17c21d69b91cbb5a316922ddbe1762/media/icon.ico -------------------------------------------------------------------------------- /media/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/dev-proxy/e71a9e278e17c21d69b91cbb5a316922ddbe1762/media/icon.png -------------------------------------------------------------------------------- /media/icon.svg: -------------------------------------------------------------------------------- 1 | ​ 2 | -------------------------------------------------------------------------------- /media/icon_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotnet/dev-proxy/e71a9e278e17c21d69b91cbb5a316922ddbe1762/media/icon_bg.png -------------------------------------------------------------------------------- /schemas/v0.14.1/crudapiplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "CRUD API plugin API definition", 4 | "description": "API definition for use with the CRUD API Dev Proxy plugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "baseUrl": { 11 | "type": "string" 12 | }, 13 | "dataFile": { 14 | "type": "string" 15 | }, 16 | "actions": { 17 | "type": "array", 18 | "items": { 19 | "type": "object", 20 | "properties": { 21 | "action": { 22 | "type": "string", 23 | "enum": [ 24 | "create", 25 | "getAll", 26 | "getOne", 27 | "getMany", 28 | "merge", 29 | "update", 30 | "delete" 31 | ] 32 | }, 33 | "url": { 34 | "type": "string" 35 | }, 36 | "query": { 37 | "type": "string" 38 | }, 39 | "method": { 40 | "type": "string", 41 | "enum": [ 42 | "GET", 43 | "POST", 44 | "PUT", 45 | "PATCH", 46 | "DELETE" 47 | ] 48 | } 49 | }, 50 | "required": [ 51 | "action" 52 | ], 53 | "additionalProperties": false 54 | } 55 | } 56 | }, 57 | "required": [ 58 | "baseUrl", 59 | "dataFile", 60 | "actions" 61 | ], 62 | "additionalProperties": false 63 | } -------------------------------------------------------------------------------- /schemas/v0.14.1/genericrandomerrorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GenericRandomErrorPlugin responses", 4 | "description": "Mocks for the Dev Proxy GenericRandomErrorPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "responses": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "body": { 16 | "type": [ 17 | "object", 18 | "array", 19 | "string" 20 | ] 21 | }, 22 | "statusCode": { 23 | "type": "integer" 24 | }, 25 | "headers": { 26 | "type": "array", 27 | "items": { 28 | "type": "object", 29 | "properties": { 30 | "name": { 31 | "type": "string" 32 | }, 33 | "value": { 34 | "type": "string" 35 | } 36 | }, 37 | "required": [ 38 | "name", 39 | "value" 40 | ] 41 | } 42 | } 43 | } 44 | } 45 | } 46 | }, 47 | "required": [ 48 | "responses" 49 | ], 50 | "additionalProperties": false 51 | } -------------------------------------------------------------------------------- /schemas/v0.14.1/ratelimitingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "body": { 11 | "type": [ 12 | "object", 13 | "array", 14 | "string" 15 | ] 16 | }, 17 | "statusCode": { 18 | "type": "integer" 19 | }, 20 | "headers": { 21 | "type": "array", 22 | "items": { 23 | "type": "object", 24 | "properties": { 25 | "name": { 26 | "type": "string" 27 | }, 28 | "value": { 29 | "type": "string" 30 | } 31 | }, 32 | "required": [ 33 | "name", 34 | "value" 35 | ] 36 | } 37 | } 38 | }, 39 | "additionalProperties": false 40 | } -------------------------------------------------------------------------------- /schemas/v0.15.0/genericrandomerrorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GenericRandomErrorPlugin responses", 4 | "description": "Mocks for the Dev Proxy GenericRandomErrorPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "responses": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "body": { 16 | "type": [ 17 | "object", 18 | "array", 19 | "string" 20 | ] 21 | }, 22 | "statusCode": { 23 | "type": "integer" 24 | }, 25 | "headers": { 26 | "type": "array", 27 | "items": { 28 | "type": "object", 29 | "properties": { 30 | "name": { 31 | "type": "string" 32 | }, 33 | "value": { 34 | "type": "string" 35 | } 36 | }, 37 | "required": [ 38 | "name", 39 | "value" 40 | ] 41 | } 42 | } 43 | } 44 | } 45 | } 46 | }, 47 | "required": [ 48 | "responses" 49 | ], 50 | "additionalProperties": false 51 | } -------------------------------------------------------------------------------- /schemas/v0.15.0/ratelimitingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "body": { 11 | "type": [ 12 | "object", 13 | "array", 14 | "string" 15 | ] 16 | }, 17 | "statusCode": { 18 | "type": "integer" 19 | }, 20 | "headers": { 21 | "type": "array", 22 | "items": { 23 | "type": "object", 24 | "properties": { 25 | "name": { 26 | "type": "string" 27 | }, 28 | "value": { 29 | "type": "string" 30 | } 31 | }, 32 | "required": [ 33 | "name", 34 | "value" 35 | ] 36 | } 37 | } 38 | }, 39 | "additionalProperties": false 40 | } -------------------------------------------------------------------------------- /schemas/v0.16.0/genericrandomerrorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GenericRandomErrorPlugin responses", 4 | "description": "Mocks for the Dev Proxy GenericRandomErrorPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "responses": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "body": { 16 | "type": [ 17 | "object", 18 | "array", 19 | "string" 20 | ] 21 | }, 22 | "statusCode": { 23 | "type": "integer" 24 | }, 25 | "headers": { 26 | "type": "array", 27 | "items": { 28 | "type": "object", 29 | "properties": { 30 | "name": { 31 | "type": "string" 32 | }, 33 | "value": { 34 | "type": "string" 35 | } 36 | }, 37 | "required": [ 38 | "name", 39 | "value" 40 | ] 41 | } 42 | } 43 | } 44 | } 45 | } 46 | }, 47 | "required": [ 48 | "responses" 49 | ], 50 | "additionalProperties": false 51 | } -------------------------------------------------------------------------------- /schemas/v0.16.0/mockrequestplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin mocks", 4 | "description": "Mock request for the Dev Proxy MockRequestPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "request": { 11 | "type": "object", 12 | "properties": { 13 | "url": { 14 | "type": "string", 15 | "format": "uri" 16 | }, 17 | "method": { 18 | "type": "string", 19 | "enum": [ 20 | "GET", 21 | "POST", 22 | "PUT", 23 | "PATCH", 24 | "DELETE", 25 | "HEAD", 26 | "OPTIONS", 27 | "CONNECT", 28 | "TRACE" 29 | ] 30 | }, 31 | "body": { 32 | "type": "object" 33 | }, 34 | "headers": { 35 | "type": "array", 36 | "items": { 37 | "type": "object", 38 | "properties": { 39 | "name": { 40 | "type": "string" 41 | }, 42 | "value": { 43 | "type": "string" 44 | } 45 | }, 46 | "required": [ 47 | "name", 48 | "value" 49 | ] 50 | } 51 | } 52 | }, 53 | "required": [ 54 | "url" 55 | ] 56 | } 57 | }, 58 | "required": [ 59 | "request" 60 | ], 61 | "additionalProperties": false 62 | } -------------------------------------------------------------------------------- /schemas/v0.16.0/ratelimitingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "body": { 11 | "type": [ 12 | "object", 13 | "array", 14 | "string" 15 | ] 16 | }, 17 | "statusCode": { 18 | "type": "integer" 19 | }, 20 | "headers": { 21 | "type": "array", 22 | "items": { 23 | "type": "object", 24 | "properties": { 25 | "name": { 26 | "type": "string" 27 | }, 28 | "value": { 29 | "type": "string" 30 | } 31 | }, 32 | "required": [ 33 | "name", 34 | "value" 35 | ] 36 | } 37 | } 38 | }, 39 | "additionalProperties": false 40 | } -------------------------------------------------------------------------------- /schemas/v0.16.1/genericrandomerrorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GenericRandomErrorPlugin responses", 4 | "description": "Mocks for the Dev Proxy GenericRandomErrorPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "responses": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "body": { 16 | "type": [ 17 | "object", 18 | "array", 19 | "string" 20 | ] 21 | }, 22 | "statusCode": { 23 | "type": "integer" 24 | }, 25 | "headers": { 26 | "type": "array", 27 | "items": { 28 | "type": "object", 29 | "properties": { 30 | "name": { 31 | "type": "string" 32 | }, 33 | "value": { 34 | "type": "string" 35 | } 36 | }, 37 | "required": [ 38 | "name", 39 | "value" 40 | ] 41 | } 42 | } 43 | } 44 | } 45 | } 46 | }, 47 | "required": [ 48 | "responses" 49 | ], 50 | "additionalProperties": false 51 | } -------------------------------------------------------------------------------- /schemas/v0.16.1/mockrequestplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin mocks", 4 | "description": "Mock request for the Dev Proxy MockRequestPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "request": { 11 | "type": "object", 12 | "properties": { 13 | "url": { 14 | "type": "string", 15 | "format": "uri" 16 | }, 17 | "method": { 18 | "type": "string", 19 | "enum": [ 20 | "GET", 21 | "POST", 22 | "PUT", 23 | "PATCH", 24 | "DELETE", 25 | "HEAD", 26 | "OPTIONS", 27 | "CONNECT", 28 | "TRACE" 29 | ] 30 | }, 31 | "body": { 32 | "type": "object" 33 | }, 34 | "headers": { 35 | "type": "array", 36 | "items": { 37 | "type": "object", 38 | "properties": { 39 | "name": { 40 | "type": "string" 41 | }, 42 | "value": { 43 | "type": "string" 44 | } 45 | }, 46 | "required": [ 47 | "name", 48 | "value" 49 | ] 50 | } 51 | } 52 | }, 53 | "required": [ 54 | "url" 55 | ] 56 | } 57 | }, 58 | "required": [ 59 | "request" 60 | ], 61 | "additionalProperties": false 62 | } -------------------------------------------------------------------------------- /schemas/v0.16.1/ratelimitingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "body": { 11 | "type": [ 12 | "object", 13 | "array", 14 | "string" 15 | ] 16 | }, 17 | "statusCode": { 18 | "type": "integer" 19 | }, 20 | "headers": { 21 | "type": "array", 22 | "items": { 23 | "type": "object", 24 | "properties": { 25 | "name": { 26 | "type": "string" 27 | }, 28 | "value": { 29 | "type": "string" 30 | } 31 | }, 32 | "required": [ 33 | "name", 34 | "value" 35 | ] 36 | } 37 | } 38 | }, 39 | "additionalProperties": false 40 | } -------------------------------------------------------------------------------- /schemas/v0.16.2/genericrandomerrorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GenericRandomErrorPlugin responses", 4 | "description": "Mocks for the Dev Proxy GenericRandomErrorPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "responses": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "body": { 16 | "type": [ 17 | "object", 18 | "array", 19 | "string" 20 | ] 21 | }, 22 | "statusCode": { 23 | "type": "integer" 24 | }, 25 | "headers": { 26 | "type": "array", 27 | "items": { 28 | "type": "object", 29 | "properties": { 30 | "name": { 31 | "type": "string" 32 | }, 33 | "value": { 34 | "type": "string" 35 | } 36 | }, 37 | "required": [ 38 | "name", 39 | "value" 40 | ] 41 | } 42 | } 43 | } 44 | } 45 | } 46 | }, 47 | "required": [ 48 | "responses" 49 | ], 50 | "additionalProperties": false 51 | } -------------------------------------------------------------------------------- /schemas/v0.16.2/mockrequestplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin mocks", 4 | "description": "Mock request for the Dev Proxy MockRequestPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "request": { 11 | "type": "object", 12 | "properties": { 13 | "url": { 14 | "type": "string", 15 | "format": "uri" 16 | }, 17 | "method": { 18 | "type": "string", 19 | "enum": [ 20 | "GET", 21 | "POST", 22 | "PUT", 23 | "PATCH", 24 | "DELETE", 25 | "HEAD", 26 | "OPTIONS", 27 | "CONNECT", 28 | "TRACE" 29 | ] 30 | }, 31 | "body": { 32 | "type": "object" 33 | }, 34 | "headers": { 35 | "type": "array", 36 | "items": { 37 | "type": "object", 38 | "properties": { 39 | "name": { 40 | "type": "string" 41 | }, 42 | "value": { 43 | "type": "string" 44 | } 45 | }, 46 | "required": [ 47 | "name", 48 | "value" 49 | ] 50 | } 51 | } 52 | }, 53 | "required": [ 54 | "url" 55 | ] 56 | } 57 | }, 58 | "required": [ 59 | "request" 60 | ], 61 | "additionalProperties": false 62 | } -------------------------------------------------------------------------------- /schemas/v0.16.2/ratelimitingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "body": { 11 | "type": [ 12 | "object", 13 | "array", 14 | "string" 15 | ] 16 | }, 17 | "statusCode": { 18 | "type": "integer" 19 | }, 20 | "headers": { 21 | "type": "array", 22 | "items": { 23 | "type": "object", 24 | "properties": { 25 | "name": { 26 | "type": "string" 27 | }, 28 | "value": { 29 | "type": "string" 30 | } 31 | }, 32 | "required": [ 33 | "name", 34 | "value" 35 | ] 36 | } 37 | } 38 | }, 39 | "additionalProperties": false 40 | } -------------------------------------------------------------------------------- /schemas/v0.17.0/genericrandomerrorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GenericRandomErrorPlugin responses", 4 | "description": "Mocks for the Dev Proxy GenericRandomErrorPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "responses": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "body": { 16 | "type": [ 17 | "object", 18 | "array", 19 | "string" 20 | ] 21 | }, 22 | "statusCode": { 23 | "type": "integer" 24 | }, 25 | "headers": { 26 | "type": "array", 27 | "items": { 28 | "type": "object", 29 | "properties": { 30 | "name": { 31 | "type": "string" 32 | }, 33 | "value": { 34 | "type": "string" 35 | } 36 | }, 37 | "required": [ 38 | "name", 39 | "value" 40 | ] 41 | } 42 | } 43 | } 44 | } 45 | } 46 | }, 47 | "required": [ 48 | "responses" 49 | ], 50 | "additionalProperties": false 51 | } -------------------------------------------------------------------------------- /schemas/v0.17.0/mockrequestplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin mocks", 4 | "description": "Mock request for the Dev Proxy MockRequestPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "request": { 11 | "type": "object", 12 | "properties": { 13 | "url": { 14 | "type": "string", 15 | "format": "uri" 16 | }, 17 | "method": { 18 | "type": "string", 19 | "enum": [ 20 | "GET", 21 | "POST", 22 | "PUT", 23 | "PATCH", 24 | "DELETE", 25 | "HEAD", 26 | "OPTIONS", 27 | "CONNECT", 28 | "TRACE" 29 | ] 30 | }, 31 | "body": { 32 | "type": "object" 33 | }, 34 | "headers": { 35 | "type": "array", 36 | "items": { 37 | "type": "object", 38 | "properties": { 39 | "name": { 40 | "type": "string" 41 | }, 42 | "value": { 43 | "type": "string" 44 | } 45 | }, 46 | "required": [ 47 | "name", 48 | "value" 49 | ] 50 | } 51 | } 52 | }, 53 | "required": [ 54 | "url" 55 | ] 56 | } 57 | }, 58 | "required": [ 59 | "request" 60 | ], 61 | "additionalProperties": false 62 | } -------------------------------------------------------------------------------- /schemas/v0.17.0/ratelimitingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "body": { 11 | "type": [ 12 | "object", 13 | "array", 14 | "string" 15 | ] 16 | }, 17 | "statusCode": { 18 | "type": "integer" 19 | }, 20 | "headers": { 21 | "type": "array", 22 | "items": { 23 | "type": "object", 24 | "properties": { 25 | "name": { 26 | "type": "string" 27 | }, 28 | "value": { 29 | "type": "string" 30 | } 31 | }, 32 | "required": [ 33 | "name", 34 | "value" 35 | ] 36 | } 37 | } 38 | }, 39 | "additionalProperties": false 40 | } -------------------------------------------------------------------------------- /schemas/v0.17.1/genericrandomerrorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GenericRandomErrorPlugin responses", 4 | "description": "Mocks for the Dev Proxy GenericRandomErrorPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "responses": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "body": { 16 | "type": [ 17 | "object", 18 | "array", 19 | "string" 20 | ] 21 | }, 22 | "statusCode": { 23 | "type": "integer" 24 | }, 25 | "headers": { 26 | "type": "array", 27 | "items": { 28 | "type": "object", 29 | "properties": { 30 | "name": { 31 | "type": "string" 32 | }, 33 | "value": { 34 | "type": "string" 35 | } 36 | }, 37 | "required": [ 38 | "name", 39 | "value" 40 | ] 41 | } 42 | } 43 | } 44 | } 45 | } 46 | }, 47 | "required": [ 48 | "responses" 49 | ], 50 | "additionalProperties": false 51 | } -------------------------------------------------------------------------------- /schemas/v0.17.1/mockrequestplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin mocks", 4 | "description": "Mock request for the Dev Proxy MockRequestPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "request": { 11 | "type": "object", 12 | "properties": { 13 | "url": { 14 | "type": "string", 15 | "format": "uri" 16 | }, 17 | "method": { 18 | "type": "string", 19 | "enum": [ 20 | "GET", 21 | "POST", 22 | "PUT", 23 | "PATCH", 24 | "DELETE", 25 | "HEAD", 26 | "OPTIONS", 27 | "CONNECT", 28 | "TRACE" 29 | ] 30 | }, 31 | "body": { 32 | "type": "object" 33 | }, 34 | "headers": { 35 | "type": "array", 36 | "items": { 37 | "type": "object", 38 | "properties": { 39 | "name": { 40 | "type": "string" 41 | }, 42 | "value": { 43 | "type": "string" 44 | } 45 | }, 46 | "required": [ 47 | "name", 48 | "value" 49 | ] 50 | } 51 | } 52 | }, 53 | "required": [ 54 | "url" 55 | ] 56 | } 57 | }, 58 | "required": [ 59 | "request" 60 | ], 61 | "additionalProperties": false 62 | } -------------------------------------------------------------------------------- /schemas/v0.17.1/ratelimitingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "body": { 11 | "type": [ 12 | "object", 13 | "array", 14 | "string" 15 | ] 16 | }, 17 | "statusCode": { 18 | "type": "integer" 19 | }, 20 | "headers": { 21 | "type": "array", 22 | "items": { 23 | "type": "object", 24 | "properties": { 25 | "name": { 26 | "type": "string" 27 | }, 28 | "value": { 29 | "type": "string" 30 | } 31 | }, 32 | "required": [ 33 | "name", 34 | "value" 35 | ] 36 | } 37 | } 38 | }, 39 | "additionalProperties": false 40 | } -------------------------------------------------------------------------------- /schemas/v0.18.0/genericrandomerrorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GenericRandomErrorPlugin responses", 4 | "description": "Mocks for the Dev Proxy GenericRandomErrorPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "responses": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "body": { 16 | "type": [ 17 | "object", 18 | "array", 19 | "string" 20 | ] 21 | }, 22 | "statusCode": { 23 | "type": "integer" 24 | }, 25 | "headers": { 26 | "type": "array", 27 | "items": { 28 | "type": "object", 29 | "properties": { 30 | "name": { 31 | "type": "string" 32 | }, 33 | "value": { 34 | "type": "string" 35 | } 36 | }, 37 | "required": [ 38 | "name", 39 | "value" 40 | ] 41 | } 42 | } 43 | } 44 | } 45 | } 46 | }, 47 | "required": [ 48 | "responses" 49 | ], 50 | "additionalProperties": false 51 | } -------------------------------------------------------------------------------- /schemas/v0.18.0/mockrequestplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin mocks", 4 | "description": "Mock request for the Dev Proxy MockRequestPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "request": { 11 | "type": "object", 12 | "properties": { 13 | "url": { 14 | "type": "string", 15 | "format": "uri" 16 | }, 17 | "method": { 18 | "type": "string", 19 | "enum": [ 20 | "GET", 21 | "POST", 22 | "PUT", 23 | "PATCH", 24 | "DELETE", 25 | "HEAD", 26 | "OPTIONS", 27 | "CONNECT", 28 | "TRACE" 29 | ] 30 | }, 31 | "body": { 32 | "type": "object" 33 | }, 34 | "headers": { 35 | "type": "array", 36 | "items": { 37 | "type": "object", 38 | "properties": { 39 | "name": { 40 | "type": "string" 41 | }, 42 | "value": { 43 | "type": "string" 44 | } 45 | }, 46 | "required": [ 47 | "name", 48 | "value" 49 | ] 50 | } 51 | } 52 | }, 53 | "required": [ 54 | "url" 55 | ] 56 | } 57 | }, 58 | "required": [ 59 | "request" 60 | ], 61 | "additionalProperties": false 62 | } -------------------------------------------------------------------------------- /schemas/v0.18.0/ratelimitingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "body": { 11 | "type": [ 12 | "object", 13 | "array", 14 | "string" 15 | ] 16 | }, 17 | "statusCode": { 18 | "type": "integer" 19 | }, 20 | "headers": { 21 | "type": "array", 22 | "items": { 23 | "type": "object", 24 | "properties": { 25 | "name": { 26 | "type": "string" 27 | }, 28 | "value": { 29 | "type": "string" 30 | } 31 | }, 32 | "required": [ 33 | "name", 34 | "value" 35 | ] 36 | } 37 | } 38 | }, 39 | "additionalProperties": false 40 | } -------------------------------------------------------------------------------- /schemas/v0.19.0/genericrandomerrorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GenericRandomErrorPlugin responses", 4 | "description": "Mocks for the Dev Proxy GenericRandomErrorPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "responses": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "body": { 16 | "type": [ 17 | "object", 18 | "array", 19 | "string" 20 | ] 21 | }, 22 | "statusCode": { 23 | "type": "integer" 24 | }, 25 | "headers": { 26 | "type": "array", 27 | "items": { 28 | "type": "object", 29 | "properties": { 30 | "name": { 31 | "type": "string" 32 | }, 33 | "value": { 34 | "type": "string" 35 | } 36 | }, 37 | "required": [ 38 | "name", 39 | "value" 40 | ] 41 | } 42 | } 43 | } 44 | } 45 | } 46 | }, 47 | "required": [ 48 | "responses" 49 | ], 50 | "additionalProperties": false 51 | } -------------------------------------------------------------------------------- /schemas/v0.19.0/mockrequestplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin mocks", 4 | "description": "Mock request for the Dev Proxy MockRequestPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "request": { 11 | "type": "object", 12 | "properties": { 13 | "url": { 14 | "type": "string", 15 | "format": "uri" 16 | }, 17 | "method": { 18 | "type": "string", 19 | "enum": [ 20 | "GET", 21 | "POST", 22 | "PUT", 23 | "PATCH", 24 | "DELETE", 25 | "HEAD", 26 | "OPTIONS", 27 | "CONNECT", 28 | "TRACE" 29 | ] 30 | }, 31 | "body": { 32 | "type": "object" 33 | }, 34 | "headers": { 35 | "type": "array", 36 | "items": { 37 | "type": "object", 38 | "properties": { 39 | "name": { 40 | "type": "string" 41 | }, 42 | "value": { 43 | "type": "string" 44 | } 45 | }, 46 | "required": [ 47 | "name", 48 | "value" 49 | ] 50 | } 51 | } 52 | }, 53 | "required": [ 54 | "url" 55 | ] 56 | } 57 | }, 58 | "required": [ 59 | "request" 60 | ], 61 | "additionalProperties": false 62 | } -------------------------------------------------------------------------------- /schemas/v0.19.0/ratelimitingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "body": { 11 | "type": [ 12 | "object", 13 | "array", 14 | "string" 15 | ] 16 | }, 17 | "statusCode": { 18 | "type": "integer" 19 | }, 20 | "headers": { 21 | "type": "array", 22 | "items": { 23 | "type": "object", 24 | "properties": { 25 | "name": { 26 | "type": "string" 27 | }, 28 | "value": { 29 | "type": "string" 30 | } 31 | }, 32 | "required": [ 33 | "name", 34 | "value" 35 | ] 36 | } 37 | } 38 | }, 39 | "additionalProperties": false 40 | } -------------------------------------------------------------------------------- /schemas/v0.19.1/genericrandomerrorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GenericRandomErrorPlugin responses", 4 | "description": "Mocks for the Dev Proxy GenericRandomErrorPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "responses": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "body": { 16 | "type": [ 17 | "object", 18 | "array", 19 | "string" 20 | ] 21 | }, 22 | "statusCode": { 23 | "type": "integer" 24 | }, 25 | "headers": { 26 | "type": "array", 27 | "items": { 28 | "type": "object", 29 | "properties": { 30 | "name": { 31 | "type": "string" 32 | }, 33 | "value": { 34 | "type": "string" 35 | } 36 | }, 37 | "required": [ 38 | "name", 39 | "value" 40 | ] 41 | } 42 | } 43 | } 44 | } 45 | } 46 | }, 47 | "required": [ 48 | "responses" 49 | ], 50 | "additionalProperties": false 51 | } -------------------------------------------------------------------------------- /schemas/v0.19.1/mockrequestplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin mocks", 4 | "description": "Mock request for the Dev Proxy MockRequestPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "request": { 11 | "type": "object", 12 | "properties": { 13 | "url": { 14 | "type": "string", 15 | "format": "uri" 16 | }, 17 | "method": { 18 | "type": "string", 19 | "enum": [ 20 | "GET", 21 | "POST", 22 | "PUT", 23 | "PATCH", 24 | "DELETE", 25 | "HEAD", 26 | "OPTIONS", 27 | "CONNECT", 28 | "TRACE" 29 | ] 30 | }, 31 | "body": { 32 | "type": "object" 33 | }, 34 | "headers": { 35 | "type": "array", 36 | "items": { 37 | "type": "object", 38 | "properties": { 39 | "name": { 40 | "type": "string" 41 | }, 42 | "value": { 43 | "type": "string" 44 | } 45 | }, 46 | "required": [ 47 | "name", 48 | "value" 49 | ] 50 | } 51 | } 52 | }, 53 | "required": [ 54 | "url" 55 | ] 56 | } 57 | }, 58 | "required": [ 59 | "request" 60 | ], 61 | "additionalProperties": false 62 | } -------------------------------------------------------------------------------- /schemas/v0.19.1/ratelimitingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "body": { 11 | "type": [ 12 | "object", 13 | "array", 14 | "string" 15 | ] 16 | }, 17 | "statusCode": { 18 | "type": "integer" 19 | }, 20 | "headers": { 21 | "type": "array", 22 | "items": { 23 | "type": "object", 24 | "properties": { 25 | "name": { 26 | "type": "string" 27 | }, 28 | "value": { 29 | "type": "string" 30 | } 31 | }, 32 | "required": [ 33 | "name", 34 | "value" 35 | ] 36 | } 37 | } 38 | }, 39 | "additionalProperties": false 40 | } -------------------------------------------------------------------------------- /schemas/v0.20.0/mockrequestplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin mocks", 4 | "description": "Mock request for the Dev Proxy MockRequestPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "request": { 11 | "type": "object", 12 | "properties": { 13 | "url": { 14 | "type": "string", 15 | "format": "uri" 16 | }, 17 | "method": { 18 | "type": "string", 19 | "enum": [ 20 | "GET", 21 | "POST", 22 | "PUT", 23 | "PATCH", 24 | "DELETE", 25 | "HEAD", 26 | "OPTIONS", 27 | "CONNECT", 28 | "TRACE" 29 | ] 30 | }, 31 | "body": { 32 | "type": "object" 33 | }, 34 | "headers": { 35 | "type": "array", 36 | "items": { 37 | "type": "object", 38 | "properties": { 39 | "name": { 40 | "type": "string" 41 | }, 42 | "value": { 43 | "type": "string" 44 | } 45 | }, 46 | "required": [ 47 | "name", 48 | "value" 49 | ] 50 | } 51 | } 52 | }, 53 | "required": [ 54 | "url" 55 | ] 56 | } 57 | }, 58 | "required": [ 59 | "request" 60 | ], 61 | "additionalProperties": false 62 | } -------------------------------------------------------------------------------- /schemas/v0.20.0/ratelimitingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "body": { 11 | "type": [ 12 | "object", 13 | "array", 14 | "string" 15 | ] 16 | }, 17 | "statusCode": { 18 | "type": "integer" 19 | }, 20 | "headers": { 21 | "type": "array", 22 | "items": { 23 | "type": "object", 24 | "properties": { 25 | "name": { 26 | "type": "string" 27 | }, 28 | "value": { 29 | "type": "string" 30 | } 31 | }, 32 | "required": [ 33 | "name", 34 | "value" 35 | ] 36 | } 37 | } 38 | }, 39 | "additionalProperties": false 40 | } -------------------------------------------------------------------------------- /schemas/v0.20.1/mockrequestplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin mocks", 4 | "description": "Mock request for the Dev Proxy MockRequestPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "request": { 11 | "type": "object", 12 | "properties": { 13 | "url": { 14 | "type": "string", 15 | "format": "uri" 16 | }, 17 | "method": { 18 | "type": "string", 19 | "enum": [ 20 | "GET", 21 | "POST", 22 | "PUT", 23 | "PATCH", 24 | "DELETE", 25 | "HEAD", 26 | "OPTIONS", 27 | "CONNECT", 28 | "TRACE" 29 | ] 30 | }, 31 | "body": { 32 | "type": "object" 33 | }, 34 | "headers": { 35 | "type": "array", 36 | "items": { 37 | "type": "object", 38 | "properties": { 39 | "name": { 40 | "type": "string" 41 | }, 42 | "value": { 43 | "type": "string" 44 | } 45 | }, 46 | "required": [ 47 | "name", 48 | "value" 49 | ] 50 | } 51 | } 52 | }, 53 | "required": [ 54 | "url" 55 | ] 56 | } 57 | }, 58 | "required": [ 59 | "request" 60 | ], 61 | "additionalProperties": false 62 | } -------------------------------------------------------------------------------- /schemas/v0.20.1/ratelimitingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "body": { 11 | "type": [ 12 | "object", 13 | "array", 14 | "string" 15 | ] 16 | }, 17 | "statusCode": { 18 | "type": "integer" 19 | }, 20 | "headers": { 21 | "type": "array", 22 | "items": { 23 | "type": "object", 24 | "properties": { 25 | "name": { 26 | "type": "string" 27 | }, 28 | "value": { 29 | "type": "string" 30 | } 31 | }, 32 | "required": [ 33 | "name", 34 | "value" 35 | ] 36 | } 37 | } 38 | }, 39 | "additionalProperties": false 40 | } -------------------------------------------------------------------------------- /schemas/v0.21.0/mockrequestplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin mocks", 4 | "description": "Mock request for the Dev Proxy MockRequestPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "request": { 11 | "type": "object", 12 | "properties": { 13 | "url": { 14 | "type": "string", 15 | "format": "uri" 16 | }, 17 | "method": { 18 | "type": "string", 19 | "enum": [ 20 | "GET", 21 | "POST", 22 | "PUT", 23 | "PATCH", 24 | "DELETE", 25 | "HEAD", 26 | "OPTIONS", 27 | "CONNECT", 28 | "TRACE" 29 | ] 30 | }, 31 | "body": { 32 | "type": "object" 33 | }, 34 | "headers": { 35 | "type": "array", 36 | "items": { 37 | "type": "object", 38 | "properties": { 39 | "name": { 40 | "type": "string" 41 | }, 42 | "value": { 43 | "type": "string" 44 | } 45 | }, 46 | "required": [ 47 | "name", 48 | "value" 49 | ] 50 | } 51 | } 52 | }, 53 | "required": [ 54 | "url" 55 | ] 56 | } 57 | }, 58 | "required": [ 59 | "request" 60 | ], 61 | "additionalProperties": false 62 | } -------------------------------------------------------------------------------- /schemas/v0.21.0/ratelimitingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "body": { 11 | "type": [ 12 | "object", 13 | "array", 14 | "string" 15 | ] 16 | }, 17 | "statusCode": { 18 | "type": "integer" 19 | }, 20 | "headers": { 21 | "type": "array", 22 | "items": { 23 | "type": "object", 24 | "properties": { 25 | "name": { 26 | "type": "string" 27 | }, 28 | "value": { 29 | "type": "string" 30 | } 31 | }, 32 | "required": [ 33 | "name", 34 | "value" 35 | ] 36 | } 37 | } 38 | }, 39 | "additionalProperties": false 40 | } -------------------------------------------------------------------------------- /schemas/v0.22.0/mockrequestplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin mocks", 4 | "description": "Mock request for the Dev Proxy MockRequestPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "request": { 11 | "type": "object", 12 | "properties": { 13 | "url": { 14 | "type": "string", 15 | "format": "uri" 16 | }, 17 | "method": { 18 | "type": "string", 19 | "enum": [ 20 | "GET", 21 | "POST", 22 | "PUT", 23 | "PATCH", 24 | "DELETE", 25 | "HEAD", 26 | "OPTIONS", 27 | "CONNECT", 28 | "TRACE" 29 | ] 30 | }, 31 | "body": { 32 | "type": "object" 33 | }, 34 | "headers": { 35 | "type": "array", 36 | "items": { 37 | "type": "object", 38 | "properties": { 39 | "name": { 40 | "type": "string" 41 | }, 42 | "value": { 43 | "type": "string" 44 | } 45 | }, 46 | "required": [ 47 | "name", 48 | "value" 49 | ] 50 | } 51 | } 52 | }, 53 | "required": [ 54 | "url" 55 | ] 56 | } 57 | }, 58 | "required": [ 59 | "request" 60 | ], 61 | "additionalProperties": false 62 | } -------------------------------------------------------------------------------- /schemas/v0.22.0/ratelimitingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "body": { 11 | "type": [ 12 | "object", 13 | "array", 14 | "string" 15 | ] 16 | }, 17 | "statusCode": { 18 | "type": "integer" 19 | }, 20 | "headers": { 21 | "type": "array", 22 | "items": { 23 | "type": "object", 24 | "properties": { 25 | "name": { 26 | "type": "string" 27 | }, 28 | "value": { 29 | "type": "string" 30 | } 31 | }, 32 | "required": [ 33 | "name", 34 | "value" 35 | ] 36 | } 37 | } 38 | }, 39 | "additionalProperties": false 40 | } -------------------------------------------------------------------------------- /schemas/v0.23.0/mockrequestplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin mocks", 4 | "description": "Mock request for the Dev Proxy MockRequestPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "request": { 11 | "type": "object", 12 | "properties": { 13 | "url": { 14 | "type": "string", 15 | "format": "uri" 16 | }, 17 | "method": { 18 | "type": "string", 19 | "enum": [ 20 | "GET", 21 | "POST", 22 | "PUT", 23 | "PATCH", 24 | "DELETE", 25 | "HEAD", 26 | "OPTIONS", 27 | "CONNECT", 28 | "TRACE" 29 | ] 30 | }, 31 | "body": { 32 | "type": "object" 33 | }, 34 | "headers": { 35 | "type": "array", 36 | "items": { 37 | "type": "object", 38 | "properties": { 39 | "name": { 40 | "type": "string" 41 | }, 42 | "value": { 43 | "type": "string" 44 | } 45 | }, 46 | "required": [ 47 | "name", 48 | "value" 49 | ] 50 | } 51 | } 52 | }, 53 | "required": [ 54 | "url" 55 | ] 56 | } 57 | }, 58 | "required": [ 59 | "request" 60 | ], 61 | "additionalProperties": false 62 | } -------------------------------------------------------------------------------- /schemas/v0.23.0/ratelimitingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "body": { 11 | "type": [ 12 | "object", 13 | "array", 14 | "string" 15 | ] 16 | }, 17 | "statusCode": { 18 | "type": "integer" 19 | }, 20 | "headers": { 21 | "type": "array", 22 | "items": { 23 | "type": "object", 24 | "properties": { 25 | "name": { 26 | "type": "string" 27 | }, 28 | "value": { 29 | "type": "string" 30 | } 31 | }, 32 | "required": [ 33 | "name", 34 | "value" 35 | ] 36 | } 37 | } 38 | }, 39 | "additionalProperties": false 40 | } -------------------------------------------------------------------------------- /schemas/v0.23.0/rewriteplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RewritePlugin rewrite rules", 4 | "description": "Rewrite rules for the Dev Proxy RewritePlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "rewrites": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "in": { 16 | "type": "object", 17 | "properties": { 18 | "url": { 19 | "type": "string", 20 | "pattern": "^.+$" 21 | } 22 | }, 23 | "required": ["url"] 24 | }, 25 | "out": { 26 | "type": "object", 27 | "properties": { 28 | "url": { 29 | "type": "string", 30 | "pattern": "^.*$" 31 | } 32 | }, 33 | "required": ["url"] 34 | } 35 | }, 36 | "required": ["in", "out"] 37 | } 38 | } 39 | }, 40 | "required": [ 41 | "rewrites" 42 | ], 43 | "additionalProperties": false 44 | } -------------------------------------------------------------------------------- /schemas/v0.24.0/mockrequestplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin mocks", 4 | "description": "Mock request for the Dev Proxy MockRequestPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "request": { 11 | "type": "object", 12 | "properties": { 13 | "url": { 14 | "type": "string", 15 | "format": "uri" 16 | }, 17 | "method": { 18 | "type": "string", 19 | "enum": [ 20 | "GET", 21 | "POST", 22 | "PUT", 23 | "PATCH", 24 | "DELETE", 25 | "HEAD", 26 | "OPTIONS", 27 | "CONNECT", 28 | "TRACE" 29 | ] 30 | }, 31 | "body": { 32 | "type": "object" 33 | }, 34 | "headers": { 35 | "type": "array", 36 | "items": { 37 | "type": "object", 38 | "properties": { 39 | "name": { 40 | "type": "string" 41 | }, 42 | "value": { 43 | "type": "string" 44 | } 45 | }, 46 | "required": [ 47 | "name", 48 | "value" 49 | ] 50 | } 51 | } 52 | }, 53 | "required": [ 54 | "url" 55 | ] 56 | } 57 | }, 58 | "required": [ 59 | "request" 60 | ], 61 | "additionalProperties": false 62 | } -------------------------------------------------------------------------------- /schemas/v0.24.0/ratelimitingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "body": { 11 | "type": [ 12 | "object", 13 | "array", 14 | "string" 15 | ] 16 | }, 17 | "statusCode": { 18 | "type": "integer" 19 | }, 20 | "headers": { 21 | "type": "array", 22 | "items": { 23 | "type": "object", 24 | "properties": { 25 | "name": { 26 | "type": "string" 27 | }, 28 | "value": { 29 | "type": "string" 30 | } 31 | }, 32 | "required": [ 33 | "name", 34 | "value" 35 | ] 36 | } 37 | } 38 | }, 39 | "additionalProperties": false 40 | } -------------------------------------------------------------------------------- /schemas/v0.24.0/rewriteplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RewritePlugin rewrite rules", 4 | "description": "Rewrite rules for the Dev Proxy RewritePlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "rewrites": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "in": { 16 | "type": "object", 17 | "properties": { 18 | "url": { 19 | "type": "string", 20 | "pattern": "^.+$" 21 | } 22 | }, 23 | "required": ["url"] 24 | }, 25 | "out": { 26 | "type": "object", 27 | "properties": { 28 | "url": { 29 | "type": "string", 30 | "pattern": "^.*$" 31 | } 32 | }, 33 | "required": ["url"] 34 | } 35 | }, 36 | "required": ["in", "out"] 37 | } 38 | } 39 | }, 40 | "required": [ 41 | "rewrites" 42 | ], 43 | "additionalProperties": false 44 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/apicenterminimalpermissionsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy ApiCenterMinimalPermissionsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "resourceGroupName": { 10 | "type": "string" 11 | }, 12 | "serviceName": { 13 | "type": "string" 14 | }, 15 | "subscriptionId": { 16 | "type": "string" 17 | }, 18 | "workspace": { 19 | "type": "string" 20 | } 21 | }, 22 | "required": [ 23 | "resourceGroupName", 24 | "serviceName", 25 | "subscriptionId" 26 | ], 27 | "additionalProperties": false 28 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/apicenteronboardingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy ApiCenterOnboardingPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "createApicEntryForNewApis": { 10 | "type": "boolean" 11 | }, 12 | "resourceGroupName": { 13 | "type": "string" 14 | }, 15 | "serviceName": { 16 | "type": "string" 17 | }, 18 | "subscriptionId": { 19 | "type": "string" 20 | }, 21 | "workspace": { 22 | "type": "string" 23 | } 24 | }, 25 | "required": [ 26 | "resourceGroupName", 27 | "serviceName", 28 | "subscriptionId" 29 | ], 30 | "additionalProperties": false 31 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/apicenterproductionversionplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy ApiCenterProductionVersionPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "resourceGroupName": { 10 | "type": "string" 11 | }, 12 | "serviceName": { 13 | "type": "string" 14 | }, 15 | "subscriptionId": { 16 | "type": "string" 17 | }, 18 | "workspace": { 19 | "type": "string" 20 | } 21 | }, 22 | "required": [ 23 | "resourceGroupName", 24 | "serviceName", 25 | "subscriptionId" 26 | ], 27 | "additionalProperties": false 28 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/cachingguidanceplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy CachingGuidancePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "cacheThresholdSeconds": { 10 | "type": "integer" 11 | } 12 | }, 13 | "additionalProperties": false 14 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/crudapiplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy CrudApiPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "apiFile": { 10 | "type": "string" 11 | } 12 | }, 13 | "required": [ 14 | "apiFile" 15 | ], 16 | "additionalProperties": false 17 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/devtoolsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy DevToolsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "preferredBrowser": { 10 | "type": "string", 11 | "enum": [ 12 | "Edge", 13 | "EdgeDev", 14 | "Chrome" 15 | ] 16 | } 17 | }, 18 | "additionalProperties": false 19 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/executionsummaryplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy ExecutionSummaryPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "groupBy": { 10 | "type": "string", 11 | "enum": [ 12 | "url", 13 | "messageType" 14 | ] 15 | } 16 | }, 17 | "additionalProperties": false 18 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/genericrandomerrorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GenericRandomErrorPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "errorsFile": { 10 | "type": "string" 11 | }, 12 | "rate": { 13 | "type": "number", 14 | "minimum": 0, 15 | "maximum": 100 16 | }, 17 | "retryAfterInSeconds": { 18 | "type": "integer", 19 | "minimum": 1 20 | } 21 | }, 22 | "required": [ 23 | "errorsFile" 24 | ], 25 | "additionalProperties": false 26 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/graphconnectornotificationplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GraphConnectorNotificationPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "audience": { 10 | "type": "string" 11 | }, 12 | "mockFile": { 13 | "type": "string" 14 | }, 15 | "tenant": { 16 | "type": "string" 17 | } 18 | }, 19 | "required": [ 20 | "audience", 21 | "mockFile", 22 | "tenant" 23 | ], 24 | "additionalProperties": false 25 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/graphminimalpermissionsguidanceplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GraphMinimalPermissionsGuidancePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "permissionsToIgnore": { 10 | "type": "array", 11 | "items": { 12 | "type": "string" 13 | } 14 | } 15 | }, 16 | "additionalProperties": false 17 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/graphminimalpermissionsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GraphMinimalPermissionsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "type": { 10 | "type": "string", 11 | "enum": [ 12 | "Delegated", 13 | "Application" 14 | ] 15 | } 16 | }, 17 | "additionalProperties": false 18 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/graphrandomerrorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GraphRandomErrorPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "allowedErrors": { 10 | "type": "array", 11 | "items": { 12 | "type": "integer", 13 | "minimum": 400, 14 | "maximum": 599 15 | } 16 | }, 17 | "rate": { 18 | "type": "number", 19 | "minimum": 0, 20 | "maximum": 100 21 | }, 22 | "retryAfterInSeconds": { 23 | "type": "integer", 24 | "minimum": 0 25 | } 26 | }, 27 | "additionalProperties": false 28 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/httpfilegeneratorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy HttpFileGeneratorPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "includeOptionsRequests": { 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false 14 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/latencyplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy LatencyPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "minMs": { 10 | "type": "integer", 11 | "minimum": 0 12 | }, 13 | "maxMs": { 14 | "type": "integer", 15 | "minimum": 0, 16 | "maximum": 10000 17 | } 18 | }, 19 | "additionalProperties": false 20 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/minimalpermissionsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MinimalPermissionsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "apiSpecsFolderPath": { 10 | "type": "string" 11 | } 12 | }, 13 | "required": [ 14 | "apiSpecsFolderPath" 15 | ], 16 | "additionalProperties": false 17 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/mockrequestplugin.mockfile.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin mocks", 4 | "description": "Mock request for the Dev Proxy MockRequestPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "request": { 11 | "type": "object", 12 | "properties": { 13 | "url": { 14 | "type": "string", 15 | "format": "uri" 16 | }, 17 | "method": { 18 | "type": "string", 19 | "enum": [ 20 | "GET", 21 | "POST", 22 | "PUT", 23 | "PATCH", 24 | "DELETE", 25 | "HEAD", 26 | "OPTIONS", 27 | "CONNECT", 28 | "TRACE" 29 | ] 30 | }, 31 | "body": { 32 | "type": "object" 33 | }, 34 | "headers": { 35 | "type": "array", 36 | "items": { 37 | "type": "object", 38 | "properties": { 39 | "name": { 40 | "type": "string" 41 | }, 42 | "value": { 43 | "type": "string" 44 | } 45 | }, 46 | "required": [ 47 | "name", 48 | "value" 49 | ] 50 | } 51 | } 52 | }, 53 | "required": [ 54 | "url" 55 | ] 56 | } 57 | }, 58 | "required": [ 59 | "request" 60 | ], 61 | "additionalProperties": false 62 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/mockrequestplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "mockFile": { 10 | "type": "string" 11 | } 12 | }, 13 | "required": [ 14 | "mockFile" 15 | ], 16 | "additionalProperties": false 17 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/mockresponseplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockResponsePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "mocksFile": { 11 | "type": "string", 12 | "description": "Path to the file containing the mock responses." 13 | }, 14 | "blockUnmockedRequests": { 15 | "type": "boolean", 16 | "description": "Set to true to return 502 Bad Gateway response for requests that aren't mocked. Default is false." 17 | } 18 | }, 19 | "required": [ 20 | "mocksFile" 21 | ], 22 | "additionalProperties": false 23 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/openapispecgeneratorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy OpenApiSpecGeneratorPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "includeOptionsRequests": { 10 | "type": "boolean" 11 | }, 12 | "specVersion": { 13 | "type": "string", 14 | "enum": [ 15 | "v2_0", 16 | "v3_0" 17 | ] 18 | }, 19 | "specFormat": { 20 | "type": "string", 21 | "enum": [ 22 | "Json", 23 | "Yaml" 24 | ] 25 | } 26 | }, 27 | "additionalProperties": false 28 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/ratelimitingplugin.customresponsefile.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "body": { 11 | "type": [ 12 | "object", 13 | "array", 14 | "string" 15 | ] 16 | }, 17 | "statusCode": { 18 | "type": "integer" 19 | }, 20 | "headers": { 21 | "type": "array", 22 | "items": { 23 | "type": "object", 24 | "properties": { 25 | "name": { 26 | "type": "string" 27 | }, 28 | "value": { 29 | "type": "string" 30 | } 31 | }, 32 | "required": [ 33 | "name", 34 | "value" 35 | ] 36 | } 37 | } 38 | }, 39 | "additionalProperties": false 40 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/ratelimitingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "headerLimit": { 10 | "type": "string" 11 | }, 12 | "headerRemaining": { 13 | "type": "string" 14 | }, 15 | "headerReset": { 16 | "type": "string" 17 | }, 18 | "headerRetryAfter": { 19 | "type": "string" 20 | }, 21 | "costPerRequest": { 22 | "type": "integer", 23 | "minimum": 1 24 | }, 25 | "resetTimeWindowSeconds": { 26 | "type": "integer", 27 | "minimum": 1 28 | }, 29 | "warningThresholdPercent": { 30 | "type": "integer", 31 | "minimum": 0, 32 | "maximum": 100 33 | }, 34 | "rateLimit": { 35 | "type": "integer", 36 | "minimum": 1 37 | }, 38 | "whenLimitExceeded": { 39 | "type": "string", 40 | "enum": [ 41 | "Throttle", 42 | "Custom" 43 | ] 44 | }, 45 | "resetFormat": { 46 | "type": "string", 47 | "enum": [ 48 | "SecondsLeft", 49 | "UtcEpochSeconds" 50 | ] 51 | }, 52 | "customResponseFile": { 53 | "type": "string" 54 | } 55 | }, 56 | "additionalProperties": false 57 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/rewriteplugin.rewritesfile.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RewritePlugin rewrite rules", 4 | "description": "Rewrite rules for the Dev Proxy RewritePlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "rewrites": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "in": { 16 | "type": "object", 17 | "properties": { 18 | "url": { 19 | "type": "string", 20 | "pattern": "^.+$" 21 | } 22 | }, 23 | "required": ["url"] 24 | }, 25 | "out": { 26 | "type": "object", 27 | "properties": { 28 | "url": { 29 | "type": "string", 30 | "pattern": "^.*$" 31 | } 32 | }, 33 | "required": ["url"] 34 | } 35 | }, 36 | "required": ["in", "out"] 37 | } 38 | } 39 | }, 40 | "required": [ 41 | "rewrites" 42 | ], 43 | "additionalProperties": false 44 | } -------------------------------------------------------------------------------- /schemas/v0.25.0/rewriteplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RewritePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "rewritesFile": { 10 | "type": "string" 11 | } 12 | }, 13 | "required": [ 14 | "rewritesFile" 15 | ], 16 | "additionalProperties": false 17 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/apicenterminimalpermissionsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy ApiCenterMinimalPermissionsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "resourceGroupName": { 10 | "type": "string" 11 | }, 12 | "serviceName": { 13 | "type": "string" 14 | }, 15 | "subscriptionId": { 16 | "type": "string" 17 | }, 18 | "workspace": { 19 | "type": "string" 20 | } 21 | }, 22 | "required": [ 23 | "resourceGroupName", 24 | "serviceName", 25 | "subscriptionId" 26 | ], 27 | "additionalProperties": false 28 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/apicenteronboardingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy ApiCenterOnboardingPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "createApicEntryForNewApis": { 10 | "type": "boolean" 11 | }, 12 | "resourceGroupName": { 13 | "type": "string" 14 | }, 15 | "serviceName": { 16 | "type": "string" 17 | }, 18 | "subscriptionId": { 19 | "type": "string" 20 | }, 21 | "workspace": { 22 | "type": "string" 23 | } 24 | }, 25 | "required": [ 26 | "resourceGroupName", 27 | "serviceName", 28 | "subscriptionId" 29 | ], 30 | "additionalProperties": false 31 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/apicenterproductionversionplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy ApiCenterProductionVersionPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "resourceGroupName": { 10 | "type": "string" 11 | }, 12 | "serviceName": { 13 | "type": "string" 14 | }, 15 | "subscriptionId": { 16 | "type": "string" 17 | }, 18 | "workspace": { 19 | "type": "string" 20 | } 21 | }, 22 | "required": [ 23 | "resourceGroupName", 24 | "serviceName", 25 | "subscriptionId" 26 | ], 27 | "additionalProperties": false 28 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/cachingguidanceplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy CachingGuidancePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "cacheThresholdSeconds": { 10 | "type": "integer" 11 | } 12 | }, 13 | "additionalProperties": false 14 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/crudapiplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy CrudApiPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "apiFile": { 10 | "type": "string" 11 | } 12 | }, 13 | "required": [ 14 | "apiFile" 15 | ], 16 | "additionalProperties": false 17 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/devtoolsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy DevToolsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "preferredBrowser": { 10 | "type": "string", 11 | "enum": [ 12 | "Edge", 13 | "EdgeDev", 14 | "Chrome" 15 | ] 16 | } 17 | }, 18 | "additionalProperties": false 19 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/executionsummaryplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy ExecutionSummaryPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "groupBy": { 10 | "type": "string", 11 | "enum": [ 12 | "url", 13 | "messageType" 14 | ] 15 | } 16 | }, 17 | "additionalProperties": false 18 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/genericrandomerrorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GenericRandomErrorPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "errorsFile": { 10 | "type": "string" 11 | }, 12 | "rate": { 13 | "type": "number", 14 | "minimum": 0, 15 | "maximum": 100 16 | }, 17 | "retryAfterInSeconds": { 18 | "type": "integer", 19 | "minimum": 1 20 | } 21 | }, 22 | "required": [ 23 | "errorsFile" 24 | ], 25 | "additionalProperties": false 26 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/graphconnectornotificationplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GraphConnectorNotificationPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "audience": { 10 | "type": "string" 11 | }, 12 | "mockFile": { 13 | "type": "string" 14 | }, 15 | "tenant": { 16 | "type": "string" 17 | } 18 | }, 19 | "required": [ 20 | "audience", 21 | "mockFile", 22 | "tenant" 23 | ], 24 | "additionalProperties": false 25 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/graphminimalpermissionsguidanceplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GraphMinimalPermissionsGuidancePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "permissionsToIgnore": { 10 | "type": "array", 11 | "items": { 12 | "type": "string" 13 | } 14 | } 15 | }, 16 | "additionalProperties": false 17 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/graphminimalpermissionsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GraphMinimalPermissionsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "type": { 10 | "type": "string", 11 | "enum": [ 12 | "Delegated", 13 | "Application" 14 | ] 15 | } 16 | }, 17 | "additionalProperties": false 18 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/graphrandomerrorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GraphRandomErrorPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "allowedErrors": { 10 | "type": "array", 11 | "items": { 12 | "type": "integer", 13 | "minimum": 400, 14 | "maximum": 599 15 | } 16 | }, 17 | "rate": { 18 | "type": "number", 19 | "minimum": 0, 20 | "maximum": 100 21 | }, 22 | "retryAfterInSeconds": { 23 | "type": "integer", 24 | "minimum": 0 25 | } 26 | }, 27 | "additionalProperties": false 28 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/httpfilegeneratorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy HttpFileGeneratorPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "includeOptionsRequests": { 10 | "type": "boolean" 11 | } 12 | }, 13 | "additionalProperties": false 14 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/latencyplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy LatencyPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "minMs": { 10 | "type": "integer", 11 | "minimum": 0 12 | }, 13 | "maxMs": { 14 | "type": "integer", 15 | "minimum": 0, 16 | "maximum": 10000 17 | } 18 | }, 19 | "additionalProperties": false 20 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/minimalcsompermissionsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MinimalCsomPermissionsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "typesFilePath": { 10 | "type": "string" 11 | } 12 | }, 13 | "additionalProperties": false 14 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/minimalpermissionsguidanceplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MinimalPermissionsGuidancePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "apiSpecsFolderPath": { 10 | "type": "string" 11 | } 12 | }, 13 | "required": [ 14 | "apiSpecsFolderPath" 15 | ], 16 | "additionalProperties": false 17 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/minimalpermissionsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MinimalPermissionsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "apiSpecsFolderPath": { 10 | "type": "string" 11 | } 12 | }, 13 | "required": [ 14 | "apiSpecsFolderPath" 15 | ], 16 | "additionalProperties": false 17 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/mockrequestplugin.mockfile.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin mocks", 4 | "description": "Mock request for the Dev Proxy MockRequestPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "request": { 11 | "type": "object", 12 | "properties": { 13 | "url": { 14 | "type": "string", 15 | "format": "uri" 16 | }, 17 | "method": { 18 | "type": "string", 19 | "enum": [ 20 | "GET", 21 | "POST", 22 | "PUT", 23 | "PATCH", 24 | "DELETE", 25 | "HEAD", 26 | "OPTIONS", 27 | "CONNECT", 28 | "TRACE" 29 | ] 30 | }, 31 | "body": { 32 | "type": "object" 33 | }, 34 | "headers": { 35 | "type": "array", 36 | "items": { 37 | "type": "object", 38 | "properties": { 39 | "name": { 40 | "type": "string" 41 | }, 42 | "value": { 43 | "type": "string" 44 | } 45 | }, 46 | "required": [ 47 | "name", 48 | "value" 49 | ] 50 | } 51 | } 52 | }, 53 | "required": [ 54 | "url" 55 | ] 56 | } 57 | }, 58 | "required": [ 59 | "request" 60 | ], 61 | "additionalProperties": false 62 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/mockrequestplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "mockFile": { 10 | "type": "string" 11 | } 12 | }, 13 | "required": [ 14 | "mockFile" 15 | ], 16 | "additionalProperties": false 17 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/mockresponseplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockResponsePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "mocksFile": { 11 | "type": "string", 12 | "description": "Path to the file containing the mock responses." 13 | }, 14 | "blockUnmockedRequests": { 15 | "type": "boolean", 16 | "description": "Set to true to return 502 Bad Gateway response for requests that aren't mocked. Default is false." 17 | } 18 | }, 19 | "required": [ 20 | "mocksFile" 21 | ], 22 | "additionalProperties": false 23 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/openapispecgeneratorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy OpenApiSpecGeneratorPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "includeOptionsRequests": { 10 | "type": "boolean" 11 | }, 12 | "specVersion": { 13 | "type": "string", 14 | "enum": [ 15 | "v2_0", 16 | "v3_0" 17 | ] 18 | }, 19 | "specFormat": { 20 | "type": "string", 21 | "enum": [ 22 | "Json", 23 | "Yaml" 24 | ] 25 | } 26 | }, 27 | "additionalProperties": false 28 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/ratelimitingplugin.customresponsefile.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type":"string" 9 | }, 10 | "body": { 11 | "type": [ 12 | "object", 13 | "array", 14 | "string" 15 | ] 16 | }, 17 | "statusCode": { 18 | "type": "integer" 19 | }, 20 | "headers": { 21 | "type": "array", 22 | "items": { 23 | "type": "object", 24 | "properties": { 25 | "name": { 26 | "type": "string" 27 | }, 28 | "value": { 29 | "type": "string" 30 | } 31 | }, 32 | "required": [ 33 | "name", 34 | "value" 35 | ] 36 | } 37 | } 38 | }, 39 | "additionalProperties": false 40 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/ratelimitingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "headerLimit": { 10 | "type": "string" 11 | }, 12 | "headerRemaining": { 13 | "type": "string" 14 | }, 15 | "headerReset": { 16 | "type": "string" 17 | }, 18 | "headerRetryAfter": { 19 | "type": "string" 20 | }, 21 | "costPerRequest": { 22 | "type": "integer", 23 | "minimum": 1 24 | }, 25 | "resetTimeWindowSeconds": { 26 | "type": "integer", 27 | "minimum": 1 28 | }, 29 | "warningThresholdPercent": { 30 | "type": "integer", 31 | "minimum": 0, 32 | "maximum": 100 33 | }, 34 | "rateLimit": { 35 | "type": "integer", 36 | "minimum": 1 37 | }, 38 | "whenLimitExceeded": { 39 | "type": "string", 40 | "enum": [ 41 | "Throttle", 42 | "Custom" 43 | ] 44 | }, 45 | "resetFormat": { 46 | "type": "string", 47 | "enum": [ 48 | "SecondsLeft", 49 | "UtcEpochSeconds" 50 | ] 51 | }, 52 | "customResponseFile": { 53 | "type": "string" 54 | } 55 | }, 56 | "additionalProperties": false 57 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/rewriteplugin.rewritesfile.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RewritePlugin rewrite rules", 4 | "description": "Rewrite rules for the Dev Proxy RewritePlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string" 9 | }, 10 | "rewrites": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "in": { 16 | "type": "object", 17 | "properties": { 18 | "url": { 19 | "type": "string", 20 | "pattern": "^.+$" 21 | } 22 | }, 23 | "required": ["url"] 24 | }, 25 | "out": { 26 | "type": "object", 27 | "properties": { 28 | "url": { 29 | "type": "string", 30 | "pattern": "^.*$" 31 | } 32 | }, 33 | "required": ["url"] 34 | } 35 | }, 36 | "required": ["in", "out"] 37 | } 38 | } 39 | }, 40 | "required": [ 41 | "rewrites" 42 | ], 43 | "additionalProperties": false 44 | } -------------------------------------------------------------------------------- /schemas/v0.26.0/rewriteplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RewritePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string" 8 | }, 9 | "rewritesFile": { 10 | "type": "string" 11 | } 12 | }, 13 | "required": [ 14 | "rewritesFile" 15 | ], 16 | "additionalProperties": false 17 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/apicenterminimalpermissionsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy ApiCenterMinimalPermissionsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "resourceGroupName": { 11 | "type": "string", 12 | "description": "Name of the resource group where the Azure API Center is located." 13 | }, 14 | "serviceName": { 15 | "type": "string", 16 | "description": "Name of the Azure API Center instance that Dev Proxy should use to check if the APIs used in the app are registered." 17 | }, 18 | "subscriptionId": { 19 | "type": "string", 20 | "description": "ID of the Azure subscription where the Azure API Center instance is located." 21 | }, 22 | "workspace": { 23 | "type": "string", 24 | "description": "Name of the Azure API Center workspace to use. Default is 'default'.", 25 | "default": "default" 26 | } 27 | }, 28 | "required": [ 29 | "resourceGroupName", 30 | "serviceName", 31 | "subscriptionId" 32 | ], 33 | "additionalProperties": false 34 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/apicenteronboardingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy ApiCenterOnboardingPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "createApicEntryForNewApis": { 11 | "type": "boolean", 12 | "description": "Set to true to have Dev Proxy create new API entries for APIs detected but not yet registered in API Center. When false, Dev Proxy only lists unregistered APIs. Default is true." 13 | }, 14 | "resourceGroupName": { 15 | "type": "string", 16 | "description": "Name of the resource group where the Azure API Center is located." 17 | }, 18 | "serviceName": { 19 | "type": "string", 20 | "description": "Name of the Azure API Center instance that Dev Proxy should use to check if the APIs used in the app are registered." 21 | }, 22 | "subscriptionId": { 23 | "type": "string", 24 | "description": "ID of the Azure subscription where the Azure API Center instance is located." 25 | }, 26 | "workspace": { 27 | "type": "string", 28 | "description": "Name of the Azure API Center workspace to use. Default is 'default'." 29 | } 30 | }, 31 | "required": [ 32 | "resourceGroupName", 33 | "serviceName", 34 | "subscriptionId" 35 | ], 36 | "additionalProperties": false 37 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/apicenterproductionversionplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy ApiCenterProductionVersionPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "resourceGroupName": { 11 | "type": "string", 12 | "description": "Name of the resource group where the Azure API Center is located." 13 | }, 14 | "serviceName": { 15 | "type": "string", 16 | "description": "Name of the Azure API Center instance that Dev Proxy should use to check if the APIs used in the app are registered." 17 | }, 18 | "subscriptionId": { 19 | "type": "string", 20 | "description": "ID of the Azure subscription where the Azure API Center instance is located." 21 | }, 22 | "workspace": { 23 | "type": "string", 24 | "description": "Name of the Azure API Center workspace to use. Default is 'default'." 25 | } 26 | }, 27 | "required": [ 28 | "resourceGroupName", 29 | "serviceName", 30 | "subscriptionId" 31 | ], 32 | "additionalProperties": false 33 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/cachingguidanceplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy CachingGuidancePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "cacheThresholdSeconds": { 11 | "type": "integer", 12 | "description": "The number of seconds between the same request that triggers the guidance warning. Default is 5." 13 | } 14 | }, 15 | "additionalProperties": false 16 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/crudapiplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy CrudApiPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "apiFile": { 11 | "type": "string", 12 | "description": "Path to the file that contains the definition of the CRUD API." 13 | } 14 | }, 15 | "required": [ 16 | "apiFile" 17 | ], 18 | "additionalProperties": false 19 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/devtoolsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy DevToolsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "preferredBrowser": { 11 | "type": "string", 12 | "enum": [ 13 | "Edge", 14 | "EdgeDev", 15 | "Chrome" 16 | ], 17 | "description": "Which browser to use to launch Dev Tools. Supported values: Edge, EdgeDev, Chrome. Default: Edge." 18 | } 19 | }, 20 | "additionalProperties": false 21 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/executionsummaryplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy ExecutionSummaryPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "groupBy": { 11 | "type": "string", 12 | "enum": [ 13 | "url", 14 | "messageType" 15 | ], 16 | "description": "How proxy should group the information in the summary. Available options: url, messageType. Default: url." 17 | } 18 | }, 19 | "additionalProperties": false 20 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/genericrandomerrorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GenericRandomErrorPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "errorsFile": { 11 | "type": "string", 12 | "description": "Path to the file that contains error responses." 13 | }, 14 | "rate": { 15 | "type": "number", 16 | "minimum": 0, 17 | "maximum": 100, 18 | "description": "The percentage of requests to fail with a random error. Value between 0 and 100." 19 | }, 20 | "retryAfterInSeconds": { 21 | "type": "integer", 22 | "minimum": 1, 23 | "description": "The number of seconds to wait before retrying the request. Included on the Retry-After response header for dynamic throttling. Default: 5." 24 | } 25 | }, 26 | "required": [ 27 | "errorsFile" 28 | ], 29 | "additionalProperties": false 30 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/graphconnectornotificationplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GraphConnectorNotificationPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "audience": { 11 | "type": "string", 12 | "description": "The Microsoft Entra app registration ID that the Microsoft Graph connector uses to authenticate the notification request." 13 | }, 14 | "mockFile": { 15 | "type": "string", 16 | "description": "Path to the file containing the mock request." 17 | }, 18 | "tenant": { 19 | "type": "string", 20 | "description": "The tenant ID where the Microsoft Graph connector creates the external connection." 21 | } 22 | }, 23 | "required": [ 24 | "audience", 25 | "mockFile", 26 | "tenant" 27 | ], 28 | "additionalProperties": false 29 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/graphminimalpermissionsguidanceplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GraphMinimalPermissionsGuidancePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "Reference to the JSON schema definition." 9 | }, 10 | "permissionsToIgnore": { 11 | "type": "array", 12 | "description": "The scopes to ignore and not include in the report. Default: ['profile', 'openid', 'offline_access', 'email'].", 13 | "items": { 14 | "type": "string" 15 | } 16 | } 17 | }, 18 | "additionalProperties": false 19 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/graphminimalpermissionsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GraphMinimalPermissionsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "Reference to the JSON schema definition." 9 | }, 10 | "type": { 11 | "type": "string", 12 | "enum": [ 13 | "Delegated", 14 | "Application" 15 | ], 16 | "description": "Determines which type of permission scopes to return. Can be 'Delegated' or 'Application'. Default: 'Delegated'." 17 | } 18 | }, 19 | "additionalProperties": false 20 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/graphrandomerrorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GraphRandomErrorPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "Reference to the JSON schema definition." 9 | }, 10 | "allowedErrors": { 11 | "type": "array", 12 | "description": "Array of HTTP status codes (integers between 400 and 599) that the plugin can use to simulate errors. For example, [429] to simulate throttling.", 13 | "items": { 14 | "type": "integer", 15 | "minimum": 400, 16 | "maximum": 599 17 | } 18 | }, 19 | "rate": { 20 | "type": "number", 21 | "minimum": 0, 22 | "maximum": 100, 23 | "description": "The percentage (0-100) of requests that should be failed with a random error." 24 | }, 25 | "retryAfterInSeconds": { 26 | "type": "integer", 27 | "minimum": 0, 28 | "description": "The number of seconds to set in the Retry-After header for throttling responses." 29 | } 30 | }, 31 | "additionalProperties": false 32 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/httpfilegeneratorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy HttpFileGeneratorPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "Reference to the JSON schema definition." 9 | }, 10 | "includeOptionsRequests": { 11 | "type": "boolean", 12 | "description": "Determines whether to include OPTIONS requests in the generated HTTP file. Default: false." 13 | } 14 | }, 15 | "additionalProperties": false 16 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/latencyplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy LatencyPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "Reference to the JSON schema definition." 9 | }, 10 | "minMs": { 11 | "type": "integer", 12 | "minimum": 0, 13 | "description": "The minimum amount of delay (in milliseconds) added to a request. Default: 0." 14 | }, 15 | "maxMs": { 16 | "type": "integer", 17 | "minimum": 0, 18 | "maximum": 10000, 19 | "description": "The maximum amount of delay (in milliseconds) added to a request. Max value is 10000 (10 seconds). Default: 5000." 20 | } 21 | }, 22 | "additionalProperties": false 23 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/minimalcsompermissionsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MinimalCsomPermissionsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "Reference to the JSON schema definition." 9 | }, 10 | "typesFilePath": { 11 | "type": "string", 12 | "description": "Path to the file that lists permissions required to call SharePoint CSOM APIs. Default: ~appFolder/config/spo-csom-types.json." 13 | } 14 | }, 15 | "additionalProperties": false 16 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/minimalpermissionsguidanceplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MinimalPermissionsGuidancePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "apiSpecsFolderPath": { 11 | "type": "string", 12 | "description": "Relative or absolute path to the folder with API specs. Used to compare JWT token permissions against minimal required scopes." 13 | } 14 | }, 15 | "required": [ 16 | "apiSpecsFolderPath" 17 | ], 18 | "additionalProperties": false 19 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/minimalpermissionsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MinimalPermissionsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "apiSpecsFolderPath": { 11 | "type": "string", 12 | "description": "Relative or absolute path to the folder with API specs. Used to determine minimal permissions required for API calls." 13 | } 14 | }, 15 | "required": [ 16 | "apiSpecsFolderPath" 17 | ], 18 | "additionalProperties": false 19 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/mockrequestplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "mockFile": { 11 | "type": "string", 12 | "description": "Path to the file containing the mock request." 13 | } 14 | }, 15 | "required": [ 16 | "mockFile" 17 | ], 18 | "additionalProperties": false 19 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/mockresponseplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockResponsePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "mocksFile": { 11 | "type": "string", 12 | "description": "Path to the file containing the mock responses." 13 | }, 14 | "blockUnmockedRequests": { 15 | "type": "boolean", 16 | "description": "Set to true to return 502 Bad Gateway response for requests that aren't mocked. Default is false." 17 | } 18 | }, 19 | "required": [ 20 | "mocksFile" 21 | ], 22 | "additionalProperties": false 23 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/openapispecgeneratorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy OpenApiSpecGeneratorPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "includeOptionsRequests": { 11 | "type": "boolean", 12 | "description": "Determines whether to include OPTIONS requests in the generated OpenAPI spec. Default: false." 13 | }, 14 | "specVersion": { 15 | "type": "string", 16 | "enum": [ 17 | "v2_0", 18 | "v3_0" 19 | ], 20 | "description": "Specifies the OpenAPI spec version to generate. Allowed values: 'v2_0' or 'v3_0'. Default: 'v3_0'." 21 | }, 22 | "specFormat": { 23 | "type": "string", 24 | "enum": [ 25 | "Json", 26 | "Yaml" 27 | ], 28 | "description": "Specifies the format of the generated OpenAPI spec. Allowed values: 'Json' or 'Yaml'. Default: 'Json'." 29 | } 30 | }, 31 | "additionalProperties": false 32 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/ratelimitingplugin.customresponsefile.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string", 9 | "description": "The URL of the JSON schema used to validate this custom response file." 10 | }, 11 | "body": { 12 | "type": [ 13 | "object", 14 | "array", 15 | "string" 16 | ], 17 | "description": "The body of the custom response returned when the rate limit is exceeded. Can be an object, array, or string." 18 | }, 19 | "statusCode": { 20 | "type": "integer", 21 | "description": "HTTP status code to return when the rate limit is exceeded (e.g., 403)." 22 | }, 23 | "headers": { 24 | "type": "array", 25 | "description": "List of headers to include in the custom response.", 26 | "items": { 27 | "type": "object", 28 | "properties": { 29 | "name": { 30 | "type": "string", 31 | "description": "Header name." 32 | }, 33 | "value": { 34 | "type": "string", 35 | "description": "Header value." 36 | } 37 | }, 38 | "required": [ 39 | "name", 40 | "value" 41 | ] 42 | } 43 | } 44 | }, 45 | "additionalProperties": false 46 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/rewriteplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RewritePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The URL of the JSON schema used to validate this configuration file." 9 | }, 10 | "rewritesFile": { 11 | "type": "string", 12 | "description": "Path to the file containing rewrite definitions (e.g., 'rewrites.json')." 13 | } 14 | }, 15 | "required": [ 16 | "rewritesFile" 17 | ], 18 | "additionalProperties": false 19 | } -------------------------------------------------------------------------------- /schemas/v0.27.0/typespecgeneratorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy TypeSpecGeneratorPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The URL of the JSON schema used to validate this configuration file." 9 | }, 10 | "ignoreResponseTypes": { 11 | "type": "boolean", 12 | "description": "Determines whether to generate types for API responses (false) or to set them to 'string' (true)." 13 | } 14 | }, 15 | "additionalProperties": false 16 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/apicenterminimalpermissionsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy ApiCenterMinimalPermissionsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "resourceGroupName": { 11 | "type": "string", 12 | "description": "Name of the resource group where the Azure API Center is located." 13 | }, 14 | "serviceName": { 15 | "type": "string", 16 | "description": "Name of the Azure API Center instance that Dev Proxy should use to check if the APIs used in the app are registered." 17 | }, 18 | "subscriptionId": { 19 | "type": "string", 20 | "description": "ID of the Azure subscription where the Azure API Center instance is located." 21 | }, 22 | "workspace": { 23 | "type": "string", 24 | "description": "Name of the Azure API Center workspace to use. Default is 'default'.", 25 | "default": "default" 26 | } 27 | }, 28 | "required": [ 29 | "resourceGroupName", 30 | "serviceName", 31 | "subscriptionId" 32 | ], 33 | "additionalProperties": false 34 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/apicenteronboardingplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy ApiCenterOnboardingPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "createApicEntryForNewApis": { 11 | "type": "boolean", 12 | "description": "Set to true to have Dev Proxy create new API entries for APIs detected but not yet registered in API Center. When false, Dev Proxy only lists unregistered APIs. Default is true." 13 | }, 14 | "resourceGroupName": { 15 | "type": "string", 16 | "description": "Name of the resource group where the Azure API Center is located." 17 | }, 18 | "serviceName": { 19 | "type": "string", 20 | "description": "Name of the Azure API Center instance that Dev Proxy should use to check if the APIs used in the app are registered." 21 | }, 22 | "subscriptionId": { 23 | "type": "string", 24 | "description": "ID of the Azure subscription where the Azure API Center instance is located." 25 | }, 26 | "workspace": { 27 | "type": "string", 28 | "description": "Name of the Azure API Center workspace to use. Default is 'default'." 29 | } 30 | }, 31 | "required": [ 32 | "resourceGroupName", 33 | "serviceName", 34 | "subscriptionId" 35 | ], 36 | "additionalProperties": false 37 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/apicenterproductionversionplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy ApiCenterProductionVersionPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "resourceGroupName": { 11 | "type": "string", 12 | "description": "Name of the resource group where the Azure API Center is located." 13 | }, 14 | "serviceName": { 15 | "type": "string", 16 | "description": "Name of the Azure API Center instance that Dev Proxy should use to check if the APIs used in the app are registered." 17 | }, 18 | "subscriptionId": { 19 | "type": "string", 20 | "description": "ID of the Azure subscription where the Azure API Center instance is located." 21 | }, 22 | "workspace": { 23 | "type": "string", 24 | "description": "Name of the Azure API Center workspace to use. Default is 'default'." 25 | } 26 | }, 27 | "required": [ 28 | "resourceGroupName", 29 | "serviceName", 30 | "subscriptionId" 31 | ], 32 | "additionalProperties": false 33 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/cachingguidanceplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy CachingGuidancePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "cacheThresholdSeconds": { 11 | "type": "integer", 12 | "description": "The number of seconds between the same request that triggers the guidance warning. Default is 5." 13 | } 14 | }, 15 | "additionalProperties": false 16 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/crudapiplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy CrudApiPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "apiFile": { 11 | "type": "string", 12 | "description": "Path to the file that contains the definition of the CRUD API." 13 | } 14 | }, 15 | "required": [ 16 | "apiFile" 17 | ], 18 | "additionalProperties": false 19 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/devtoolsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy DevToolsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "preferredBrowser": { 11 | "type": "string", 12 | "enum": [ 13 | "Edge", 14 | "EdgeDev", 15 | "Chrome" 16 | ], 17 | "description": "Which browser to use to launch Dev Tools. Supported values: Edge, EdgeDev, Chrome. Default: Edge." 18 | } 19 | }, 20 | "additionalProperties": false 21 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/executionsummaryplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy ExecutionSummaryPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "groupBy": { 11 | "type": "string", 12 | "enum": [ 13 | "url", 14 | "messageType" 15 | ], 16 | "description": "How proxy should group the information in the summary. Available options: url, messageType. Default: url." 17 | } 18 | }, 19 | "additionalProperties": false 20 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/genericrandomerrorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GenericRandomErrorPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "errorsFile": { 11 | "type": "string", 12 | "description": "Path to the file that contains error responses." 13 | }, 14 | "rate": { 15 | "type": "number", 16 | "minimum": 0, 17 | "maximum": 100, 18 | "description": "The percentage of requests to fail with a random error. Value between 0 and 100." 19 | }, 20 | "retryAfterInSeconds": { 21 | "type": "integer", 22 | "minimum": 1, 23 | "description": "The number of seconds to wait before retrying the request. Included on the Retry-After response header for dynamic throttling. Default: 5." 24 | } 25 | }, 26 | "required": [ 27 | "errorsFile" 28 | ], 29 | "additionalProperties": false 30 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/graphminimalpermissionsguidanceplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GraphMinimalPermissionsGuidancePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "Reference to the JSON schema definition." 9 | }, 10 | "permissionsToIgnore": { 11 | "type": "array", 12 | "description": "The scopes to ignore and not include in the report. Default: ['profile', 'openid', 'offline_access', 'email'].", 13 | "items": { 14 | "type": "string" 15 | } 16 | } 17 | }, 18 | "additionalProperties": false 19 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/graphminimalpermissionsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GraphMinimalPermissionsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "Reference to the JSON schema definition." 9 | }, 10 | "type": { 11 | "type": "string", 12 | "enum": [ 13 | "Delegated", 14 | "Application" 15 | ], 16 | "description": "Determines which type of permission scopes to return. Can be 'Delegated' or 'Application'. Default: 'Delegated'." 17 | } 18 | }, 19 | "additionalProperties": false 20 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/graphrandomerrorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy GraphRandomErrorPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "Reference to the JSON schema definition." 9 | }, 10 | "allowedErrors": { 11 | "type": "array", 12 | "description": "Array of HTTP status codes (integers between 400 and 599) that the plugin can use to simulate errors. For example, [429] to simulate throttling.", 13 | "items": { 14 | "type": "integer", 15 | "minimum": 400, 16 | "maximum": 599 17 | } 18 | }, 19 | "rate": { 20 | "type": "number", 21 | "minimum": 0, 22 | "maximum": 100, 23 | "description": "The percentage (0-100) of requests that should be failed with a random error." 24 | }, 25 | "retryAfterInSeconds": { 26 | "type": "integer", 27 | "minimum": 0, 28 | "description": "The number of seconds to set in the Retry-After header for throttling responses." 29 | } 30 | }, 31 | "additionalProperties": false 32 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/httpfilegeneratorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy HttpFileGeneratorPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "Reference to the JSON schema definition." 9 | }, 10 | "includeOptionsRequests": { 11 | "type": "boolean", 12 | "description": "Determines whether to include OPTIONS requests in the generated HTTP file. Default: false." 13 | } 14 | }, 15 | "additionalProperties": false 16 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/latencyplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy LatencyPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "Reference to the JSON schema definition." 9 | }, 10 | "minMs": { 11 | "type": "integer", 12 | "minimum": 0, 13 | "description": "The minimum amount of delay (in milliseconds) added to a request. Default: 0." 14 | }, 15 | "maxMs": { 16 | "type": "integer", 17 | "minimum": 0, 18 | "maximum": 10000, 19 | "description": "The maximum amount of delay (in milliseconds) added to a request. Max value is 10000 (10 seconds). Default: 5000." 20 | } 21 | }, 22 | "additionalProperties": false 23 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/minimalcsompermissionsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MinimalCsomPermissionsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "Reference to the JSON schema definition." 9 | }, 10 | "typesFilePath": { 11 | "type": "string", 12 | "description": "Path to the file that lists permissions required to call SharePoint CSOM APIs. Default: ~appFolder/config/spo-csom-types.json." 13 | } 14 | }, 15 | "additionalProperties": false 16 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/minimalpermissionsguidanceplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MinimalPermissionsGuidancePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "apiSpecsFolderPath": { 11 | "type": "string", 12 | "description": "Relative or absolute path to the folder with API specs. Used to compare JWT token permissions against minimal required scopes." 13 | } 14 | }, 15 | "required": [ 16 | "apiSpecsFolderPath" 17 | ], 18 | "additionalProperties": false 19 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/minimalpermissionsplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MinimalPermissionsPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "apiSpecsFolderPath": { 11 | "type": "string", 12 | "description": "Relative or absolute path to the folder with API specs. Used to determine minimal permissions required for API calls." 13 | } 14 | }, 15 | "required": [ 16 | "apiSpecsFolderPath" 17 | ], 18 | "additionalProperties": false 19 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/mockrequestplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockRequestPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "mockFile": { 11 | "type": "string", 12 | "description": "Path to the file containing the mock request." 13 | } 14 | }, 15 | "required": [ 16 | "mockFile" 17 | ], 18 | "additionalProperties": false 19 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/mockresponseplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy MockResponsePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "mocksFile": { 11 | "type": "string", 12 | "description": "Path to the file containing the mock responses." 13 | } 14 | }, 15 | "required": [ 16 | "mocksFile" 17 | ], 18 | "additionalProperties": false 19 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/openaitelemetryplugin.pricesfile.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "OpenAI Telemetry Plugin language model prices file schema", 4 | "description": "Schema for the language model prices file used by the OpenAI Telemetry plugin.", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string", 9 | "description": "The JSON schema reference for validation." 10 | }, 11 | "prices": { 12 | "type": "object", 13 | "description": "Map of model names to their pricing information.", 14 | "additionalProperties": { 15 | "type": "object", 16 | "properties": { 17 | "input": { 18 | "type": "number", 19 | "description": "The price per million tokens for input/prompt tokens." 20 | }, 21 | "output": { 22 | "type": "number", 23 | "description": "The price per million tokens for output/completion tokens." 24 | } 25 | }, 26 | "required": [ 27 | "input", 28 | "output" 29 | ] 30 | } 31 | } 32 | }, 33 | "required": [ 34 | "prices" 35 | ], 36 | "additionalProperties": false 37 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/openapispecgeneratorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy OpenApiSpecGeneratorPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The JSON schema reference for validation." 9 | }, 10 | "includeOptionsRequests": { 11 | "type": "boolean", 12 | "description": "Determines whether to include OPTIONS requests in the generated OpenAPI spec. Default: false." 13 | }, 14 | "specVersion": { 15 | "type": "string", 16 | "enum": [ 17 | "v2_0", 18 | "v3_0" 19 | ], 20 | "description": "Specifies the OpenAPI spec version to generate. Allowed values: 'v2_0' or 'v3_0'. Default: 'v3_0'." 21 | }, 22 | "specFormat": { 23 | "type": "string", 24 | "enum": [ 25 | "Json", 26 | "Yaml" 27 | ], 28 | "description": "Specifies the format of the generated OpenAPI spec. Allowed values: 'Json' or 'Yaml'. Default: 'Json'." 29 | } 30 | }, 31 | "additionalProperties": false 32 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/ratelimitingplugin.customresponsefile.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RateLimitingPlugin response", 4 | "description": "Mock for the Dev Proxy RateLimitingPlugin", 5 | "type": "object", 6 | "properties": { 7 | "$schema": { 8 | "type": "string", 9 | "description": "The URL of the JSON schema used to validate this custom response file." 10 | }, 11 | "body": { 12 | "type": [ 13 | "object", 14 | "array", 15 | "string" 16 | ], 17 | "description": "The body of the custom response returned when the rate limit is exceeded. Can be an object, array, or string." 18 | }, 19 | "statusCode": { 20 | "type": "integer", 21 | "description": "HTTP status code to return when the rate limit is exceeded (e.g., 403)." 22 | }, 23 | "headers": { 24 | "type": "array", 25 | "description": "List of headers to include in the custom response.", 26 | "items": { 27 | "type": "object", 28 | "properties": { 29 | "name": { 30 | "type": "string", 31 | "description": "Header name." 32 | }, 33 | "value": { 34 | "type": "string", 35 | "description": "Header value." 36 | } 37 | }, 38 | "required": [ 39 | "name", 40 | "value" 41 | ] 42 | } 43 | } 44 | }, 45 | "additionalProperties": false 46 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/rewriteplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy RewritePlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The URL of the JSON schema used to validate this configuration file." 9 | }, 10 | "rewritesFile": { 11 | "type": "string", 12 | "description": "Path to the file containing rewrite definitions (e.g., 'rewrites.json')." 13 | } 14 | }, 15 | "required": [ 16 | "rewritesFile" 17 | ], 18 | "additionalProperties": false 19 | } -------------------------------------------------------------------------------- /schemas/v0.28.0/typespecgeneratorplugin.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", 3 | "title": "Dev Proxy TypeSpecGeneratorPlugin config schema", 4 | "type": "object", 5 | "properties": { 6 | "$schema": { 7 | "type": "string", 8 | "description": "The URL of the JSON schema used to validate this configuration file." 9 | }, 10 | "ignoreResponseTypes": { 11 | "type": "boolean", 12 | "description": "Determines whether to generate types for API responses (false) or to set them to 'string' (true)." 13 | } 14 | }, 15 | "additionalProperties": false 16 | } -------------------------------------------------------------------------------- /scripts/local-build.ps1: -------------------------------------------------------------------------------- 1 | # Licensed to the .NET Foundation under one or more agreements. 2 | # The .NET Foundation licenses this file to you under the MIT license. 3 | # See the LICENSE file in the project root for more information. 4 | 5 | . (Join-Path $PSScriptRoot "version.ps1") 6 | $version = $versionString.Substring(1) 7 | $platform = "linux-arm64" 8 | 9 | Remove-Item ../bld -Recurse -Force 10 | 11 | dotnet publish ../DevProxy/DevProxy.csproj -c Release -p:PublishSingleFile=true -r $platform --self-contained -o ../bld -p:InformationalVersion=$version 12 | dotnet build ../DevProxy.Plugins/DevProxy.Plugins.csproj -c Release -r $platform --no-self-contained -p:InformationalVersion=$version 13 | cp -R ../DevProxy/bin/Release/net9.0/$platform/plugins ../bld 14 | pushd 15 | 16 | cd ../bld 17 | Get-ChildItem -Filter *.pdb -Recurse | Remove-Item 18 | Get-ChildItem -Filter *.deps.json -Recurse | Remove-Item 19 | Get-ChildItem -Filter *.runtimeconfig.json -Recurse | Remove-Item 20 | Get-ChildItem -Filter *.staticwebassets.endpoints.json -Recurse | Remove-Item 21 | Get-ChildItem -Filter web.config -Recurse | Remove-Item 22 | popd -------------------------------------------------------------------------------- /scripts/local-docker.ps1: -------------------------------------------------------------------------------- 1 | # Licensed to the .NET Foundation under one or more agreements. 2 | # The .NET Foundation licenses this file to you under the MIT license. 3 | # See the LICENSE file in the project root for more information. 4 | 5 | . (Join-Path $PSScriptRoot "version.ps1") 6 | . (Join-Path $PSScriptRoot "local-build.ps1") 7 | 8 | $version = $versionString.Substring(1) 9 | 10 | docker build --build-arg DEVPROXY_VERSION=$version -t dev-proxy-local:$version -f Dockerfile_local .. -------------------------------------------------------------------------------- /scripts/local-setup.ps1: -------------------------------------------------------------------------------- 1 | # Licensed to the .NET Foundation under one or more agreements. 2 | # The .NET Foundation licenses this file to you under the MIT license. 3 | # See the LICENSE file in the project root for more information. 4 | 5 | $versionString = "v0.28.0-beta.1" 6 | $version = $versionString.Substring(1) 7 | $isBeta = $version.Contains("-beta") 8 | 9 | # Remove old installer if any 10 | Get-Item ../bld/*installer* -ErrorAction SilentlyContinue | Remove-Item 11 | 12 | if (-not (Test-Path ../bld)) { 13 | Write-Error "Build directory not found. Run local-build.ps1 first." 14 | exit 1 15 | } 16 | 17 | if ($isBeta) { 18 | # Rename executable for beta 19 | Rename-Item -Path ../bld/devproxy.exe -NewName devproxy-beta.exe 20 | # Set newVersionNotification for beta 21 | $content = Get-Content ../bld/devproxyrc.json 22 | $content -replace '"newVersionNotification": "stable"', '"newVersionNotification": "beta"' | Set-Content ../bld/devproxyrc.json 23 | } 24 | 25 | # Set icon filename 26 | $icon = $isBeta ? "icon-beta.ico" : "icon.ico" 27 | 28 | # Add installer icon 29 | Copy-Item "../media/$icon" "../bld/$icon" 30 | 31 | # Set installer filename 32 | $installer = $isBeta ? "install-beta.iss" : "install.iss" 33 | 34 | # Copy installer file 35 | Copy-Item "../$installer" "../bld/$installer" 36 | 37 | # Set version in installer script 38 | if ($isBeta) { 39 | (Get-Content "../bld/$installer") -replace "#define MyAppVersion .*", "#define MyAppVersion `"$version`"" | Set-Content "../bld/$installer" 40 | } 41 | 42 | 43 | ISCC.exe "../bld/$installer" /F"dev-proxy-installer-win-x64-$versionString" -------------------------------------------------------------------------------- /scripts/version.ps1: -------------------------------------------------------------------------------- 1 | # Licensed to the .NET Foundation under one or more agreements. 2 | # The .NET Foundation licenses this file to you under the MIT license. 3 | # See the LICENSE file in the project root for more information. 4 | 5 | $script:versionString = "v0.28.0-beta.1" 6 | -------------------------------------------------------------------------------- /tests/devproxy-api.http: -------------------------------------------------------------------------------- 1 | GET http://localhost:8897/proxy 2 | 3 | ### 4 | 5 | POST http://localhost:8897/proxy 6 | content-type: application/json 7 | 8 | { 9 | "recording": true 10 | } 11 | 12 | ### 13 | 14 | POST http://localhost:8897/proxy 15 | content-type: application/json 16 | 17 | { 18 | "recording": false 19 | } 20 | 21 | ### 22 | 23 | POST http://localhost:8897/proxy/raiseMockRequest 24 | 25 | ### 26 | 27 | POST http://localhost:8897/proxy/stopProxy 28 | --------------------------------------------------------------------------------