diff --git a/DevProxy.Abstractions.Tests/Proxy/SystemProxyAddressTests.cs b/DevProxy.Abstractions.Tests/Proxy/SystemProxyAddressTests.cs index 0bde0039..e41c1ce7 100644 --- a/DevProxy.Abstractions.Tests/Proxy/SystemProxyAddressTests.cs +++ b/DevProxy.Abstractions.Tests/Proxy/SystemProxyAddressTests.cs @@ -15,6 +15,9 @@ public class SystemProxyAddressTests [InlineData(" ")] [InlineData("0.0.0.0")] [InlineData("::")] + [InlineData("::0")] + [InlineData("0:0:0:0:0:0:0:0")] + [InlineData("[::]")] public void ResolveHost_WildcardOrEmpty_CollapsesToLoopback(string? ipAddress) => Assert.Equal("127.0.0.1", SystemProxyAddress.ResolveHost(ipAddress)); @@ -33,6 +36,27 @@ public void ToHostPort_ComposesNormalizedHostAndPort() => public void ToHostPort_ExplicitAddress() => Assert.Equal("10.0.0.5:9090", SystemProxyAddress.ToHostPort("10.0.0.5", 9090)); + [Fact] + public void ToHostPort_ExplicitIpv6Address_UsesBrackets() => + Assert.Equal("[::1]:9090", SystemProxyAddress.ToHostPort("::1", 9090)); + + [Fact] + public void ToHttpAuthority_Ipv6Address_UsesBrackets() => + Assert.Equal("http://[::1]:9090", SystemProxyAddress.ToHttpAuthority("::1", 9090)); + + [Fact] + public void ToHttpAuthority_DefaultHttpPort_IsPreserved() => + Assert.Equal("http://127.0.0.1:80", SystemProxyAddress.ToHttpAuthority("127.0.0.1", 80)); + + [Theory] + [InlineData("0.0.0.0")] + [InlineData("::")] + [InlineData("::0")] + [InlineData("0:0:0:0:0:0:0:0")] + [InlineData("[::]")] + public void ToHttpAuthority_WildcardAddress_UsesLoopback(string ipAddress) => + Assert.Equal("http://127.0.0.1:9090", SystemProxyAddress.ToHttpAuthority(ipAddress, 9090)); + [Fact] public void ToHostPort_NullAddress_UsesLoopback() => Assert.Equal("127.0.0.1:8080", SystemProxyAddress.ToHostPort(null, 8080)); diff --git a/DevProxy.Abstractions/Proxy/SystemProxyAddress.cs b/DevProxy.Abstractions/Proxy/SystemProxyAddress.cs index 37f40f7d..8e905679 100644 --- a/DevProxy.Abstractions/Proxy/SystemProxyAddress.cs +++ b/DevProxy.Abstractions/Proxy/SystemProxyAddress.cs @@ -3,6 +3,8 @@ // See the LICENSE file in the project root for more information. using System.Globalization; +using System.Net; +using System.Net.Sockets; namespace DevProxy.Abstractions.Proxy; @@ -33,12 +35,35 @@ public static string ResolveHost(string? ipAddress) return "127.0.0.1"; } - return ipAddress is "0.0.0.0" or "::" ? "127.0.0.1" : ipAddress; + var host = ipAddress; + if (host.Length > 1 && host[0] == '[' && host[^1] == ']') + { + host = host[1..^1]; + } + + if (IPAddress.TryParse(host, out var address) && + (address.Equals(IPAddress.Any) || address.Equals(IPAddress.IPv6Any))) + { + return "127.0.0.1"; + } + + return host; } + public static string ToHttpAuthority(string? ipAddress, int port) => + $"{Uri.UriSchemeHttp}://{ToHostPort(ipAddress, port)}"; + /// /// The host:port value used for the Windows ProxyServer registry setting. /// - public static string ToHostPort(string? ipAddress, int port) => - $"{ResolveHost(ipAddress)}:{port.ToString(CultureInfo.InvariantCulture)}"; + public static string ToHostPort(string? ipAddress, int port) + { + var host = ResolveHost(ipAddress); + if (IPAddress.TryParse(host, out var address) && address.AddressFamily == AddressFamily.InterNetworkV6) + { + host = $"[{host}]"; + } + + return $"{host}:{port.ToString(CultureInfo.InvariantCulture)}"; + } } diff --git a/DevProxy.Plugins/Inspection/DevToolsPlugin.cs b/DevProxy.Plugins/Inspection/DevToolsPlugin.cs index 2cc5f7fb..bee76fbe 100644 --- a/DevProxy.Plugins/Inspection/DevToolsPlugin.cs +++ b/DevProxy.Plugins/Inspection/DevToolsPlugin.cs @@ -861,7 +861,7 @@ private string GetBrowserPath() PreferredBrowser.Chrome => "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", PreferredBrowser.Edge => "/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge", PreferredBrowser.EdgeDev => "/Applications/Microsoft Edge Dev.app/Contents/MacOS/Microsoft Edge Dev", - PreferredBrowser.EdgeBeta => "/Applications/Microsoft Edge Dev.app/Contents/MacOS/Microsoft Edge Beta", + PreferredBrowser.EdgeBeta => "/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta", _ => throw new NotSupportedException($"{Configuration.PreferredBrowser} is an unsupported browser. Please change your PreferredBrowser setting for {Name}.") }; } diff --git a/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs b/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs index 885b2207..d5dc0926 100644 --- a/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs +++ b/DevProxy.Plugins/Mocking/MockStdioResponsePlugin.cs @@ -32,7 +32,7 @@ public sealed class MockStdioResponseConfiguration public bool NoMocks { get; set; } [JsonPropertyName("$schema")] - public string Schema { get; set; } = "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v2.1.0/mockstdioresponseplugin.mocksfile.schema.json"; + public string Schema { get; set; } = "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/mockstdioresponseplugin.mocksfile.schema.json"; } public class MockStdioResponsePlugin( diff --git a/DevProxy.Tests/ConsoleHotkeyHandlerTests.cs b/DevProxy.Tests/ConsoleHotkeyHandlerTests.cs index 4df2799f..53a15455 100644 --- a/DevProxy.Tests/ConsoleHotkeyHandlerTests.cs +++ b/DevProxy.Tests/ConsoleHotkeyHandlerTests.cs @@ -15,11 +15,11 @@ namespace DevProxy.Tests; public sealed class ConsoleHotkeyHandlerTests { private static (ConsoleHotkeyHandler handler, FakeProxyStateController controller, RecordingConsole console) - CreateHandler(OutputFormat output = OutputFormat.Text) + CreateHandler(OutputFormat output = OutputFormat.Text, string ipAddress = "127.0.0.1") { var controller = new FakeProxyStateController(); var console = new RecordingConsole(); - var configuration = new FakeProxyConfiguration { Output = output }; + var configuration = new FakeProxyConfiguration { Output = output, IPAddress = ipAddress }; var handler = new ConsoleHotkeyHandler(controller, configuration, console); return (handler, controller, console); } @@ -125,6 +125,26 @@ public void PrintApiInstructions_WritesAllApiCommands() Assert.Contains("/proxy/stopProxy", joined, StringComparison.Ordinal); } + [Fact] + public void PrintApiInstructions_FormatsIpv6Address() + { + var (handler, _, console) = CreateHandler(OutputFormat.Json, "::1"); + + handler.PrintApiInstructions(); + + Assert.Contains(console.Lines, line => line.Contains("http://[::1]:8897/proxy", StringComparison.Ordinal)); + } + + [Fact] + public void PrintApiInstructions_NormalizesIpv6WildcardAddress() + { + var (handler, _, console) = CreateHandler(OutputFormat.Json, "::"); + + handler.PrintApiInstructions(); + + Assert.Contains(console.Lines, line => line.Contains("http://127.0.0.1:8897/proxy", StringComparison.Ordinal)); + } + [Fact] public void PrintBanner_TextMode_PrintsHotkeys() { diff --git a/DevProxy/Commands/ApiCommand.cs b/DevProxy/Commands/ApiCommand.cs index f18d5bf0..909bf9e4 100644 --- a/DevProxy/Commands/ApiCommand.cs +++ b/DevProxy/Commands/ApiCommand.cs @@ -43,7 +43,7 @@ private void PrintApiInfo(OutputFormat outputFormat) { var ipAddress = _proxyConfiguration.IPAddress; var apiPort = _proxyConfiguration.ApiPort; - var baseUrl = $"http://{ipAddress}:{apiPort}"; + var baseUrl = SystemProxyAddress.ToHttpAuthority(ipAddress, apiPort); var endpoints = new[] { diff --git a/DevProxy/Commands/DevProxyCommand.cs b/DevProxy/Commands/DevProxyCommand.cs index 6cde4062..00b9f6ae 100644 --- a/DevProxy/Commands/DevProxyCommand.cs +++ b/DevProxy/Commands/DevProxyCommand.cs @@ -243,7 +243,7 @@ public DevProxyCommand( IProxyConfiguration proxyConfiguration, IServiceProvider serviceProvider, UpdateNotification updateNotification, - ILogger logger) : base($"Start Dev Proxy\n\nAPI:\n Dev Proxy exposes a REST API for runtime management.\n OpenAPI spec: http://{proxyConfiguration.IPAddress ?? "127.0.0.1"}:{proxyConfiguration.ApiPort}/swagger\n Use --api-port to configure (default: {proxyConfiguration.ApiPort}).\n Run 'devproxy api show' for more information.") + ILogger logger) : base($"Start Dev Proxy\n\nAPI:\n Dev Proxy exposes a REST API for runtime management.\n OpenAPI spec: {SystemProxyAddress.ToHttpAuthority(proxyConfiguration.IPAddress, proxyConfiguration.ApiPort)}/swagger\n Use --api-port to configure (default: {proxyConfiguration.ApiPort}).\n Run 'devproxy api show' for more information.") { _serviceProvider = serviceProvider; _plugins = plugins; @@ -313,7 +313,10 @@ private async Task InvokeAsync(ParseResult parseResult, CancellationToken c _app.Lifetime.ApplicationStarted.Register(() => { var serverAddresses = _app.Services.GetRequiredService().Features.Get(); - var address = serverAddresses?.Addresses.FirstOrDefault() ?? $"http://{_proxyConfiguration.IPAddress}:{_proxyConfiguration.ApiPort}"; + var serverAddress = serverAddresses?.Addresses.FirstOrDefault(); + var address = Uri.TryCreate(serverAddress, UriKind.Absolute, out var serverUri) ? + SystemProxyAddress.ToHttpAuthority(serverUri.DnsSafeHost, serverUri.Port) : + SystemProxyAddress.ToHttpAuthority(_proxyConfiguration.IPAddress, _proxyConfiguration.ApiPort); _logger.LogInformation("Dev Proxy API listening on {Address}...", address); // Persist the daemon state so the parent process's readiness check, diff --git a/DevProxy/Proxy/ConsoleHotkeyHandler.cs b/DevProxy/Proxy/ConsoleHotkeyHandler.cs index d804280a..134cb787 100644 --- a/DevProxy/Proxy/ConsoleHotkeyHandler.cs +++ b/DevProxy/Proxy/ConsoleHotkeyHandler.cs @@ -54,7 +54,7 @@ public void PrintHotkeys() public void PrintApiInstructions() { - var baseUrl = $"http://{configuration.IPAddress}:{configuration.ApiPort}/proxy"; + var baseUrl = SystemProxyAddress.ToHttpAuthority(configuration.IPAddress, configuration.ApiPort) + "/proxy"; var timestamp = DateTime.UtcNow.ToString("O", CultureInfo.InvariantCulture); console.WriteLine(""); console.WriteLine($"{{\"type\":\"log\",\"level\":\"info\",\"message\":\"Issue web request: curl -X POST {baseUrl}/mockRequest\",\"category\":\"ProxyEngine\",\"timestamp\":\"{timestamp}\"}}"); diff --git a/DevProxy/config-templates/devproxyrc.json b/DevProxy/config-templates/devproxyrc.json index f9cb6b6e..1bcebe33 100644 --- a/DevProxy/config-templates/devproxyrc.json +++ b/DevProxy/config-templates/devproxyrc.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.3.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ ], "urlsToWatch": [ diff --git a/DevProxy/config-templates/devproxyrc.yaml b/DevProxy/config-templates/devproxyrc.yaml index ce9e3342..e16fc8af 100644 --- a/DevProxy/config-templates/devproxyrc.yaml +++ b/DevProxy/config-templates/devproxyrc.yaml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.3.0/rc.schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json plugins: - urlsToWatch: diff --git a/DevProxy/devproxy-errors.yaml b/DevProxy/devproxy-errors.yaml index bc3ed1c8..0a50f993 100644 --- a/DevProxy/devproxy-errors.yaml +++ b/DevProxy/devproxy-errors.yaml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.3.0/genericrandomerrorplugin.errorsfile.schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/genericrandomerrorplugin.errorsfile.schema.json # Dev Proxy error responses configuration # This YAML version serves as a reference example alongside the default JSON configuration. # It demonstrates YAML features like comments, multiline strings, and anchors. diff --git a/DevProxy/devproxyrc.yaml b/DevProxy/devproxyrc.yaml index 82e5e0b7..c93076bd 100644 --- a/DevProxy/devproxyrc.yaml +++ b/DevProxy/devproxyrc.yaml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.3.0/rc.schema.json +# yaml-language-server: $schema=https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json # Dev Proxy configuration file # This YAML version serves as a reference example alongside the default JSON configuration. @@ -16,7 +16,7 @@ urlsToWatch: - "https://jsonplaceholder.typicode.com/*" genericRandomErrorPlugin: - # yaml-language-server: $schema=https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.3.0/genericrandomerrorplugin.schema.json + # yaml-language-server: $schema=https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/genericrandomerrorplugin.schema.json errorsFile: devproxy-errors.yaml rate: 50 diff --git a/schemas/v4.0.0/crudapiplugin.apifile.schema.json b/schemas/v4.0.0/crudapiplugin.apifile.schema.json index 5f3b58bd..35f6fc7a 100644 --- a/schemas/v4.0.0/crudapiplugin.apifile.schema.json +++ b/schemas/v4.0.0/crudapiplugin.apifile.schema.json @@ -54,7 +54,8 @@ "POST", "PUT", "PATCH", - "DELETE" + "DELETE", + "QUERY" ], "description": "HTTP method that Dev Proxy uses to expose the action. Defaults depend on the action type." }, diff --git a/schemas/v4.0.0/devtoolsplugin.schema.json b/schemas/v4.0.0/devtoolsplugin.schema.json index e451af1f..840fdf91 100644 --- a/schemas/v4.0.0/devtoolsplugin.schema.json +++ b/schemas/v4.0.0/devtoolsplugin.schema.json @@ -12,9 +12,14 @@ "enum": [ "Edge", "EdgeDev", - "Chrome" + "Chrome", + "EdgeBeta" ], - "description": "Which browser to use to launch Dev Tools. Supported values: Edge, EdgeDev, Chrome. Default: Edge." + "description": "Which browser to use to launch Dev Tools. Supported values: Edge, EdgeDev, Chrome, EdgeBeta. Default: Edge." + }, + "preferredBrowserPath": { + "type": "string", + "description": "Path to the browser executable. When specified, overrides preferredBrowser." } }, "additionalProperties": false diff --git a/schemas/v4.0.0/genericrandomerrorplugin.errorsfile.schema.json b/schemas/v4.0.0/genericrandomerrorplugin.errorsfile.schema.json index 80641623..f3c4491c 100644 --- a/schemas/v4.0.0/genericrandomerrorplugin.errorsfile.schema.json +++ b/schemas/v4.0.0/genericrandomerrorplugin.errorsfile.schema.json @@ -61,7 +61,7 @@ "number", "boolean" ], - "description": "Response body to return." + "description": "Response body to return. Can be an object, array, string, number, or boolean." }, "statusCode": { "type": "integer", diff --git a/schemas/v4.0.0/genericrandomerrorplugin.schema.json b/schemas/v4.0.0/genericrandomerrorplugin.schema.json index ec9facf0..fde0213e 100644 --- a/schemas/v4.0.0/genericrandomerrorplugin.schema.json +++ b/schemas/v4.0.0/genericrandomerrorplugin.schema.json @@ -12,7 +12,7 @@ "description": "Path to the file that contains error responses." }, "rate": { - "type": "number", + "type": "integer", "minimum": 0, "maximum": 100, "description": "The percentage of requests to fail with a random error. Value between 0 and 100." diff --git a/schemas/v4.0.0/graphrandomerrorplugin.schema.json b/schemas/v4.0.0/graphrandomerrorplugin.schema.json index e74fae9d..79db8a23 100644 --- a/schemas/v4.0.0/graphrandomerrorplugin.schema.json +++ b/schemas/v4.0.0/graphrandomerrorplugin.schema.json @@ -17,7 +17,7 @@ } }, "rate": { - "type": "number", + "type": "integer", "minimum": 0, "maximum": 100, "description": "The percentage (0-100) of requests that should be failed with a random error." diff --git a/schemas/v4.0.0/languagemodelratelimitingplugin.customresponsefile.schema.json b/schemas/v4.0.0/languagemodelratelimitingplugin.customresponsefile.schema.json index 1aa7e904..248f2dbe 100644 --- a/schemas/v4.0.0/languagemodelratelimitingplugin.customresponsefile.schema.json +++ b/schemas/v4.0.0/languagemodelratelimitingplugin.customresponsefile.schema.json @@ -16,7 +16,7 @@ "number", "boolean" ], - "description": "The body of the custom response returned when the token limit is exceeded." + "description": "The body of the custom response returned when the token limit is exceeded. Can be an object, array, string, number, or boolean." }, "statusCode": { "type": "integer", diff --git a/schemas/v4.0.0/mockrequestplugin.mockfile.schema.json b/schemas/v4.0.0/mockrequestplugin.mockfile.schema.json index dba31fe7..e339900e 100644 --- a/schemas/v4.0.0/mockrequestplugin.mockfile.schema.json +++ b/schemas/v4.0.0/mockrequestplugin.mockfile.schema.json @@ -34,8 +34,14 @@ "description": "HTTP method to use (default: POST)." }, "body": { - "type": ["object", "array", "string", "number", "boolean"], - "description": "Body of the request." + "type": [ + "object", + "array", + "string", + "number", + "boolean" + ], + "description": "Body of the request (object, array, string, number, or boolean)." }, "headers": { "type": "array", diff --git a/schemas/v4.0.0/mockresponseplugin.mocksfile.schema.json b/schemas/v4.0.0/mockresponseplugin.mocksfile.schema.json index 1adf0748..70201ad3 100644 --- a/schemas/v4.0.0/mockresponseplugin.mocksfile.schema.json +++ b/schemas/v4.0.0/mockresponseplugin.mocksfile.schema.json @@ -63,7 +63,7 @@ "number", "boolean" ], - "description": "The response body; string values can reference a file with '@filename'." + "description": "The response body (object, array, string, number, or boolean; strings can reference a file with '@filename')." }, "statusCode": { "type": "integer", diff --git a/schemas/v4.0.0/mockstdioresponseplugin.mocksfile.schema.json b/schemas/v4.0.0/mockstdioresponseplugin.mocksfile.schema.json index 2ea467f4..cfeea3c3 100644 --- a/schemas/v4.0.0/mockstdioresponseplugin.mocksfile.schema.json +++ b/schemas/v4.0.0/mockstdioresponseplugin.mocksfile.schema.json @@ -44,7 +44,7 @@ "number", "boolean" ], - "description": "The stdout content to return. If a string value starts with @, it's treated as a file path." + "description": "The stdout content to return. Can be an object, array, string, number, or boolean. If a string value starts with @, it's treated as a file path." }, "stderr": { "type": [ @@ -54,7 +54,7 @@ "number", "boolean" ], - "description": "The stderr content to return. If a string value starts with @, it's treated as a file path." + "description": "The stderr content to return. Can be an object, array, string, number, or boolean. If a string value starts with @, it's treated as a file path." } } } diff --git a/schemas/v4.0.0/openapispecgeneratorplugin.schema.json b/schemas/v4.0.0/openapispecgeneratorplugin.schema.json index 6e09049a..60417b04 100644 --- a/schemas/v4.0.0/openapispecgeneratorplugin.schema.json +++ b/schemas/v4.0.0/openapispecgeneratorplugin.schema.json @@ -23,7 +23,7 @@ "v3_1", "v3_2" ], - "description": "Specifies the OpenAPI spec version to generate. Allowed values: 'v2_0', 'v3_0', 'v3_1', or 'v3_2'. Default: 'v3_0'." + "description": "Specifies the OpenAPI spec version to generate. Allowed values: 'v2_0', 'v3_0', 'v3_1' or 'v3_2'. Default: 'v3_0'." }, "specFormat": { "type": "string", diff --git a/schemas/v4.0.0/ratelimitingplugin.customresponsefile.schema.json b/schemas/v4.0.0/ratelimitingplugin.customresponsefile.schema.json index 6986680b..5f2c8820 100644 --- a/schemas/v4.0.0/ratelimitingplugin.customresponsefile.schema.json +++ b/schemas/v4.0.0/ratelimitingplugin.customresponsefile.schema.json @@ -16,7 +16,7 @@ "number", "boolean" ], - "description": "The body of the custom response returned when the rate limit is exceeded." + "description": "The body of the custom response returned when the rate limit is exceeded. Can be an object, array, string, number, or boolean." }, "statusCode": { "type": "integer", diff --git a/schemas/v4.0.0/rc.schema.json b/schemas/v4.0.0/rc.schema.json index 812be54f..1525d8ee 100644 --- a/schemas/v4.0.0/rc.schema.json +++ b/schemas/v4.0.0/rc.schema.json @@ -9,7 +9,7 @@ "description": "The URL of the JSON schema used to validate this configuration file. Should match the Dev Proxy version." }, "apiPort": { - "type": "number", + "type": "integer", "minimum": 0, "maximum": 65535, "description": "Port for the Dev Proxy API server." @@ -41,7 +41,14 @@ }, "ipAddress": { "type": "string", - "format": "ipv4", + "anyOf": [ + { + "format": "ipv4" + }, + { + "format": "ipv6" + } + ], "description": "IP address for Dev Proxy to listen on." }, "languageModel": { @@ -134,13 +141,12 @@ }, "required": [ "name", - "enabled", "pluginPath" ] } }, "port": { - "type": "number", + "type": "integer", "minimum": 0, "maximum": 65535, "description": "Port for Dev Proxy to listen on." @@ -168,7 +174,7 @@ "type": "array", "description": "List of process IDs to watch for network traffic.", "items": { - "type": "number" + "type": "integer" } }, "watchProcessNames": { @@ -182,8 +188,8 @@ "type": "boolean", "description": "Show timestamps in log output." }, - "timeout": { - "type": "number", + "timeoutSeconds": { + "type": "integer", "minimum": 1, "description": "Timeout in seconds for requests passing through Dev Proxy." } diff --git a/skills/dev-proxy/SKILL.md b/skills/dev-proxy/SKILL.md index c11fb696..df8ee512 100644 --- a/skills/dev-proxy/SKILL.md +++ b/skills/dev-proxy/SKILL.md @@ -79,7 +79,7 @@ A quick reference. All configuration details are in [references/configuration.md ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "PluginName", @@ -90,7 +90,7 @@ A quick reference. All configuration details are in [references/configuration.md ], "urlsToWatch": ["https://api.contoso.com/*"], "pluginConfig": { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/pluginname.schema.json" + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/pluginname.schema.json" } } ``` diff --git a/skills/dev-proxy/references/analyze-api-usage.md b/skills/dev-proxy/references/analyze-api-usage.md index ab7eb5b4..1a9a98d8 100644 --- a/skills/dev-proxy/references/analyze-api-usage.md +++ b/skills/dev-proxy/references/analyze-api-usage.md @@ -40,7 +40,7 @@ Use `OpenApiSpecGeneratorPlugin` to reverse-engineer OpenAPI specs from intercep ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "OpenApiSpecGeneratorPlugin", @@ -56,7 +56,7 @@ Use `OpenApiSpecGeneratorPlugin` to reverse-engineer OpenAPI specs from intercep ], "urlsToWatch": ["https://api.contoso.com/*"], "openApiSpecGeneratorPlugin": { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/openapispecgeneratorplugin.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/openapispecgeneratorplugin.schema.json", "specVersion": "v3_0", "specFormat": "Json", "includeOptionsRequests": false, @@ -349,7 +349,7 @@ Reporter plugins format report output. Always place them AFTER reporting plugins ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "ExecutionSummaryPlugin", "enabled": true, "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll", "configSection": "executionSummaryPlugin" }, { "name": "GraphMinimalPermissionsPlugin", "enabled": true, "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll", "configSection": "graphMinimalPermissionsPlugin" }, @@ -369,7 +369,7 @@ Reporter plugins format report output. Always place them AFTER reporting plugins ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "ApiCenterOnboardingPlugin", "enabled": true, "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll", "configSection": "apiCenterOnboardingPlugin" }, { "name": "ApiCenterProductionVersionPlugin", "enabled": true, "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll", "configSection": "apiCenterProductionVersionPlugin" }, @@ -385,7 +385,7 @@ Reporter plugins format report output. Always place them AFTER reporting plugins ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "UrlDiscoveryPlugin", "enabled": true, "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll" }, { "name": "OpenApiSpecGeneratorPlugin", "enabled": true, "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll", "configSection": "openApiSpecGeneratorPlugin" }, diff --git a/skills/dev-proxy/references/ci-cd-integration.md b/skills/dev-proxy/references/ci-cd-integration.md index 11661247..d8a2a096 100644 --- a/skills/dev-proxy/references/ci-cd-integration.md +++ b/skills/dev-proxy/references/ci-cd-integration.md @@ -63,7 +63,7 @@ Access via `${{ steps..outputs.proxy-url }}`. ```yaml - uses: dev-proxy-tools/actions/setup@v1 with: - version: 3.0.0 + version: 4.0.0 ``` ### Multiple Recording Sessions @@ -103,7 +103,7 @@ jobs: - uses: dev-proxy-tools/actions/setup@v1 with: - version: 3.0.0 + version: 4.0.0 - id: start-proxy uses: dev-proxy-tools/actions/start@v1 @@ -182,7 +182,7 @@ No dedicated actions — use script tasks with the Dev Proxy API. ```yaml variables: - name: DEV_PROXY_VERSION - value: v3.0.0 + value: v4.0.0 steps: - task: Cache@2 @@ -233,7 +233,7 @@ pool: variables: - name: DEV_PROXY_VERSION - value: v3.0.0 + value: v4.0.0 - name: LOG_FILE value: devproxy.log @@ -300,7 +300,7 @@ For any CI system, follow these steps: ### 1. Install with Pinned Version ```bash -bash -c "$(curl -sL https://aka.ms/devproxy/setup.sh)" -- v3.0.0 +bash -c "$(curl -sL https://aka.ms/devproxy/setup.sh)" -- v4.0.0 ``` ### 2. Start in Background with Logging diff --git a/skills/dev-proxy/references/configuration.md b/skills/dev-proxy/references/configuration.md index cabdb083..38a56390 100644 --- a/skills/dev-proxy/references/configuration.md +++ b/skills/dev-proxy/references/configuration.md @@ -10,7 +10,7 @@ A configuration file follows a specific property order: `$schema`, then `plugins ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "RetryAfterPlugin", @@ -28,7 +28,7 @@ A configuration file follows a specific property order: `$schema`, then `plugins "https://jsonplaceholder.typicode.com/*" ], "genericRandomErrorPlugin": { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/genericrandomerrorplugin.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/genericrandomerrorplugin.schema.json", "errorsFile": "devproxy-errors.json", "rate": 50 }, @@ -288,4 +288,5 @@ Exposes Dev Proxy activity in Chrome DevTools (HTTP and STDIO). | Property | Default | Description | |----------|---------|-------------| -| `preferredBrowser` | `Edge` | `Edge`, `EdgeDev`, or `Chrome` | +| `preferredBrowser` | `Edge` | `Edge`, `EdgeDev`, `EdgeBeta`, or `Chrome` | +| `preferredBrowserPath` | empty | Path to the browser executable; overrides `preferredBrowser` | diff --git a/skills/dev-proxy/references/installation.md b/skills/dev-proxy/references/installation.md index e654a69a..d6c04631 100644 --- a/skills/dev-proxy/references/installation.md +++ b/skills/dev-proxy/references/installation.md @@ -63,13 +63,13 @@ Or with PowerShell: Pass the version to the setup script: ```bash -bash -c "$(curl -sL https://aka.ms/devproxy/setup.sh)" -- v3.0.0 +bash -c "$(curl -sL https://aka.ms/devproxy/setup.sh)" -- v4.0.0 ``` With winget: ```console -winget install DevProxy.DevProxy --version 3.0.0 --silent +winget install DevProxy.DevProxy --version 4.0.0 --silent ``` ## First Run Setup diff --git a/skills/dev-proxy/references/mock-api-responses.md b/skills/dev-proxy/references/mock-api-responses.md index db41f3ba..cb6dcc2c 100644 --- a/skills/dev-proxy/references/mock-api-responses.md +++ b/skills/dev-proxy/references/mock-api-responses.md @@ -20,7 +20,7 @@ The most common mocking plugin. Returns predefined responses matched by URL, HTT ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "MockResponsePlugin", @@ -31,7 +31,7 @@ The most common mocking plugin. Returns predefined responses matched by URL, HTT ], "urlsToWatch": ["https://api.contoso.com/*"], "mocksPlugin": { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/mockresponseplugin.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/mockresponseplugin.schema.json", "mocksFile": "mocks.json", "blockUnmockedRequests": false } @@ -46,7 +46,7 @@ CLI overrides: `--no-mocks` to disable, `--mocks-file ` to change mock fil ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/mockresponseplugin.mocksfile.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/mockresponseplugin.mocksfile.schema.json", "mocks": [ { "request": { @@ -174,7 +174,7 @@ Creates a fully functional CRUD API backed by an in-memory JSON data store. Supp ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "CrudApiPlugin", @@ -184,7 +184,7 @@ Creates a fully functional CRUD API backed by an in-memory JSON data store. Supp } ], "customersApi": { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/crudapiplugin.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/crudapiplugin.schema.json", "apiFile": "customers-api.json" } } @@ -194,7 +194,7 @@ Creates a fully functional CRUD API backed by an in-memory JSON data store. Supp ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/crudapiplugin.apifile.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/crudapiplugin.apifile.schema.json", "baseUrl": "https://api.contoso.com/v1/customers", "dataFile": "customers-data.json", "actions": [ @@ -301,7 +301,7 @@ Mocks STDIO communication for MCP servers and STDIO-based apps. Use with `devpro ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "MockStdioResponsePlugin", @@ -311,7 +311,7 @@ Mocks STDIO communication for MCP servers and STDIO-based apps. Use with `devpro } ], "mockStdioResponsePlugin": { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/mockstdioresponseplugin.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/mockstdioresponseplugin.schema.json", "mocksFile": "stdio-mocks.json", "blockUnmockedRequests": false } @@ -322,7 +322,7 @@ Mocks STDIO communication for MCP servers and STDIO-based apps. Use with `devpro ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/mockstdioresponseplugin.mocksfile.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/mockstdioresponseplugin.mocksfile.schema.json", "mocks": [ { "request": { "bodyFragment": "initialize" }, diff --git a/skills/dev-proxy/references/plugin-catalog.md b/skills/dev-proxy/references/plugin-catalog.md index 55fc8bb5..a5970f0f 100644 --- a/skills/dev-proxy/references/plugin-catalog.md +++ b/skills/dev-proxy/references/plugin-catalog.md @@ -137,7 +137,8 @@ Exposes Dev Proxy activity in Chrome DevTools (HTTP and STDIO). | Property | Default | Description | |----------|---------|-------------| -| `preferredBrowser` | `Edge` | `Edge`, `EdgeDev`, or `Chrome` | +| `preferredBrowser` | `Edge` | `Edge`, `EdgeDev`, `EdgeBeta`, or `Chrome` | +| `preferredBrowserPath` | empty | Path to the browser executable; overrides `preferredBrowser` | ### MockStdioResponsePlugin diff --git a/skills/dev-proxy/references/test-api-resilience.md b/skills/dev-proxy/references/test-api-resilience.md index a685b7fc..861b42c9 100644 --- a/skills/dev-proxy/references/test-api-resilience.md +++ b/skills/dev-proxy/references/test-api-resilience.md @@ -10,7 +10,7 @@ Randomly fails requests with errors from a configured file. Works with any API. ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "GenericRandomErrorPlugin", @@ -21,7 +21,7 @@ Randomly fails requests with errors from a configured file. Works with any API. ], "urlsToWatch": ["https://api.contoso.com/*"], "genericRandomErrorPlugin": { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/genericrandomerrorplugin.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/genericrandomerrorplugin.schema.json", "errorsFile": "errors.json", "rate": 50, "retryAfterInSeconds": 5 @@ -41,7 +41,7 @@ CLI: `devproxy --failure-rate 80` overrides `rate`. ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/genericrandomerrorplugin.errorsfile.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/genericrandomerrorplugin.errorsfile.schema.json", "errors": [ { "statusCode": 429, @@ -70,7 +70,7 @@ When `addDynamicRetryAfter: true`, Dev Proxy auto-calculates the Retry-After val ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/genericrandomerrorplugin.errorsfile.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/genericrandomerrorplugin.errorsfile.schema.json", "errors": [ { "statusCode": 400, "body": { "error": { "code": "BadRequest", "message": "The request was malformed or contains invalid parameters." } } }, { "statusCode": 401, "body": { "error": { "code": "Unauthorized", "message": "Authentication required." } } }, @@ -89,7 +89,7 @@ When `addDynamicRetryAfter: true`, Dev Proxy auto-calculates the Retry-After val ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/genericrandomerrorplugin.errorsfile.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/genericrandomerrorplugin.errorsfile.schema.json", "errors": [ { "statusCode": 429, "headers": [{ "name": "Retry-After", "value": "@dynamic" }, { "name": "Content-Type", "value": "application/json" }], "body": { "error": { "message": "Rate limit reached for default-gpt-4 in organization org-xxx on tokens per min.", "type": "tokens", "param": null, "code": "rate_limit_exceeded" } }, "addDynamicRetryAfter": true }, { "statusCode": 429, "body": { "error": { "message": "The engine is currently overloaded, please try again later.", "type": "server_error", "param": null, "code": null } } }, @@ -105,7 +105,7 @@ Fails Microsoft Graph requests with Graph-specific error responses. Supports bat ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "GraphRandomErrorPlugin", @@ -119,7 +119,7 @@ Fails Microsoft Graph requests with Graph-specific error responses. Supports bat "https://graph.microsoft.com/beta/*" ], "graphRandomErrorPlugin": { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/graphrandomerrorplugin.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/graphrandomerrorplugin.schema.json", "allowedErrors": [429, 500, 502, 503, 504, 507], "rate": 50 } @@ -163,7 +163,7 @@ Simulates rate-limit behavior with configurable headers, thresholds, and respons ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "RateLimitingPlugin", @@ -173,7 +173,7 @@ Simulates rate-limit behavior with configurable headers, thresholds, and respons } ], "rateLimiting": { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/ratelimitingplugin.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/ratelimitingplugin.schema.json", "costPerRequest": 2, "rateLimit": 120, "resetTimeWindowSeconds": 60, @@ -271,7 +271,7 @@ Adds random delay to responses. Works with both HTTP and STDIO. ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "LatencyPlugin", @@ -281,7 +281,7 @@ Adds random delay to responses. Works with both HTTP and STDIO. } ], "latencyPlugin": { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/latencyplugin.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/latencyplugin.schema.json", "minMs": 200, "maxMs": 10000 } @@ -311,7 +311,7 @@ devproxy config get openai-throttling ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "LatencyPlugin", "enabled": true, "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll", "configSection": "latencyPlugin" }, { "name": "RateLimitingPlugin", "enabled": true, "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll", "configSection": "rateLimiting" }, @@ -328,7 +328,7 @@ devproxy config get openai-throttling ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "RetryAfterPlugin", "enabled": true, "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll" }, { "name": "GraphRandomErrorPlugin", "enabled": true, "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll", "configSection": "graphRandomErrorPlugin" }, diff --git a/skills/dev-proxy/references/test-llm-apps.md b/skills/dev-proxy/references/test-llm-apps.md index 65d3f3fb..8fcf7296 100644 --- a/skills/dev-proxy/references/test-llm-apps.md +++ b/skills/dev-proxy/references/test-llm-apps.md @@ -19,7 +19,7 @@ Use `OpenAIMockResponsePlugin` to simulate OpenAI/Azure OpenAI completions and c ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "OpenAIMockResponsePlugin", @@ -64,7 +64,7 @@ Use `LanguageModelFailurePlugin` to test how an app handles common LLM failure m ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "LanguageModelFailurePlugin", @@ -123,7 +123,7 @@ Use `LanguageModelRateLimitingPlugin` to test token quota handling. ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "LanguageModelRateLimitingPlugin", @@ -158,7 +158,7 @@ Use `LanguageModelRateLimitingPlugin` to test token quota handling. ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/languagemodelratelimitingplugin.customresponsefile.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/languagemodelratelimitingplugin.customresponsefile.schema.json", "statusCode": 429, "headers": [ { "name": "retry-after", "value": "@dynamic" }, @@ -188,7 +188,7 @@ Use `OpenAITelemetryPlugin` to send usage telemetry to OpenTelemetry-compatible ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "OpenAITelemetryPlugin", @@ -228,7 +228,7 @@ Use `OpenAITelemetryPlugin` to send usage telemetry to OpenTelemetry-compatible ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/openaitelemetryplugin.pricesfile.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/openaitelemetryplugin.pricesfile.schema.json", "prices": { "gpt-4": { "input": 0.03, "output": 0.06 }, "gpt-4-turbo": { "input": 0.01, "output": 0.03 }, @@ -291,7 +291,7 @@ See the mocking reference (`references/mock-api-responses.md`) for STDIO mock fi ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "LanguageModelFailurePlugin", "enabled": true, "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll", "configSection": "languageModelFailurePlugin" }, { "name": "LanguageModelRateLimitingPlugin", "enabled": true, "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll", "configSection": "languageModelRateLimitingPlugin" }, @@ -312,7 +312,7 @@ This config: randomly injects LLM failures (50% of requests), enforces token lim ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "OpenAIMockResponsePlugin", "enabled": true, "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll" }, { "name": "OpenAIUsageDebuggingPlugin", "enabled": true, "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll" } @@ -326,7 +326,7 @@ This config: randomly injects LLM failures (50% of requests), enforces token lim ```json { - "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v3.0.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json", "plugins": [ { "name": "LatencyPlugin", "enabled": true, "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll", "configSection": "latencyPlugin" }, { "name": "MockStdioResponsePlugin", "enabled": true, "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll", "configSection": "mockStdioResponsePlugin" }