From bc2f1eefeb2f458f225cff1cdeb4e92390e129d6 Mon Sep 17 00:00:00 2001 From: waldekmastykarz Date: Thu, 25 Apr 2024 07:56:03 +0200 Subject: [PATCH] Updates version to v0.17.1 --- .../dev-proxy-abstractions.csproj | 2 +- dev-proxy-plugins/Mocks/MockResponsePlugin.cs | 2 +- dev-proxy-plugins/dev-proxy-plugins.csproj | 2 +- dev-proxy/dev-proxy.csproj | 2 +- dev-proxy/devproxy-errors.json | 2 +- dev-proxy/devproxyrc.json | 2 +- dev-proxy/presets/m365-mocks.json | 2 +- dev-proxy/presets/m365.json | 2 +- .../microsoft-graph-rate-limiting.json | 2 +- dev-proxy/presets/microsoft-graph.json | 2 +- install-beta.iss | 4 +- install.iss | 4 +- schemas/v0.17.1/crudapiplugin.schema.json | 135 ++++++++++++++++++ .../genericrandomerrorplugin.schema.json | 51 +++++++ schemas/v0.17.1/mockrequestplugin.schema.json | 62 ++++++++ .../v0.17.1/mockresponseplugin.schema.json | 91 ++++++++++++ .../v0.17.1/ratelimitingplugin.schema.json | 40 ++++++ schemas/v0.17.1/rc.schema.json | 107 ++++++++++++++ scripts/local-build.ps1 | 2 +- scripts/local-setup.ps1 | 2 +- 20 files changed, 502 insertions(+), 16 deletions(-) create mode 100644 schemas/v0.17.1/crudapiplugin.schema.json create mode 100644 schemas/v0.17.1/genericrandomerrorplugin.schema.json create mode 100644 schemas/v0.17.1/mockrequestplugin.schema.json create mode 100644 schemas/v0.17.1/mockresponseplugin.schema.json create mode 100644 schemas/v0.17.1/ratelimitingplugin.schema.json create mode 100644 schemas/v0.17.1/rc.schema.json diff --git a/dev-proxy-abstractions/dev-proxy-abstractions.csproj b/dev-proxy-abstractions/dev-proxy-abstractions.csproj index 690515fd..b554cbda 100644 --- a/dev-proxy-abstractions/dev-proxy-abstractions.csproj +++ b/dev-proxy-abstractions/dev-proxy-abstractions.csproj @@ -5,7 +5,7 @@ Microsoft.DevProxy.Abstractions enable enable - 0.17.0 + 0.17.1 false diff --git a/dev-proxy-plugins/Mocks/MockResponsePlugin.cs b/dev-proxy-plugins/Mocks/MockResponsePlugin.cs index 99b55fcb..e937d4f4 100644 --- a/dev-proxy-plugins/Mocks/MockResponsePlugin.cs +++ b/dev-proxy-plugins/Mocks/MockResponsePlugin.cs @@ -27,7 +27,7 @@ public class MockResponseConfiguration public bool BlockUnmockedRequests { get; set; } = false; [JsonPropertyName("$schema")] - public string Schema { get; set; } = "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.17.0/mockresponseplugin.schema.json"; + public string Schema { get; set; } = "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.17.1/mockresponseplugin.schema.json"; public IEnumerable Mocks { get; set; } = Array.Empty(); } diff --git a/dev-proxy-plugins/dev-proxy-plugins.csproj b/dev-proxy-plugins/dev-proxy-plugins.csproj index a3b3e706..9e45f848 100644 --- a/dev-proxy-plugins/dev-proxy-plugins.csproj +++ b/dev-proxy-plugins/dev-proxy-plugins.csproj @@ -6,7 +6,7 @@ enable true OnOutputUpdated - 0.17.0 + 0.17.1 false diff --git a/dev-proxy/dev-proxy.csproj b/dev-proxy/dev-proxy.csproj index cc25cad6..6c654320 100644 --- a/dev-proxy/dev-proxy.csproj +++ b/dev-proxy/dev-proxy.csproj @@ -8,7 +8,7 @@ enable LICENSE Dev Proxy - 0.17.0 + 0.17.1 Microsoft Dev Proxy devproxy diff --git a/dev-proxy/devproxy-errors.json b/dev-proxy/devproxy-errors.json index 4c31efd2..a2f1f1f0 100644 --- a/dev-proxy/devproxy-errors.json +++ b/dev-proxy/devproxy-errors.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.17.0/genericrandomerrorplugin.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.17.1/genericrandomerrorplugin.schema.json", "responses": [ { "statusCode": 400, diff --git a/dev-proxy/devproxyrc.json b/dev-proxy/devproxyrc.json index 07bfc8c1..78e27728 100644 --- a/dev-proxy/devproxyrc.json +++ b/dev-proxy/devproxyrc.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.17.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.17.1/rc.schema.json", "plugins": [ { "name": "RetryAfterPlugin", diff --git a/dev-proxy/presets/m365-mocks.json b/dev-proxy/presets/m365-mocks.json index 63a3459f..201f8339 100644 --- a/dev-proxy/presets/m365-mocks.json +++ b/dev-proxy/presets/m365-mocks.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.17.0/mockresponseplugin.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.17.1/mockresponseplugin.schema.json", "mocks": [ { "request": { diff --git a/dev-proxy/presets/m365.json b/dev-proxy/presets/m365.json index 6ce57f49..6deea4c5 100644 --- a/dev-proxy/presets/m365.json +++ b/dev-proxy/presets/m365.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.17.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.17.1/rc.schema.json", "plugins": [ { "name": "DevToolsPlugin", diff --git a/dev-proxy/presets/microsoft-graph-rate-limiting.json b/dev-proxy/presets/microsoft-graph-rate-limiting.json index b708156a..d8a6282a 100644 --- a/dev-proxy/presets/microsoft-graph-rate-limiting.json +++ b/dev-proxy/presets/microsoft-graph-rate-limiting.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.17.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.17.1/rc.schema.json", "plugins": [ { "name": "RateLimitingPlugin", diff --git a/dev-proxy/presets/microsoft-graph.json b/dev-proxy/presets/microsoft-graph.json index 3d5be531..5a50e237 100644 --- a/dev-proxy/presets/microsoft-graph.json +++ b/dev-proxy/presets/microsoft-graph.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.17.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.17.1/rc.schema.json", "plugins": [ { "name": "GraphSelectGuidancePlugin", diff --git a/install-beta.iss b/install-beta.iss index 7a82ec14..8e4404d6 100644 --- a/install-beta.iss +++ b/install-beta.iss @@ -3,8 +3,8 @@ #define MyAppName "Dev Proxy Beta" ; for local use only. In production replaced by a command line arg -#define MyAppSetupExeName "dev-proxy-installer-win-x64-0.17.0-beta.4" -#define MyAppVersion "0.17.0-beta.4" +#define MyAppSetupExeName "dev-proxy-installer-win-x64-0.17.1-beta.1" +#define MyAppVersion "0.17.1-beta.1" #define MyAppPublisher "Microsoft" #define MyAppURL "https://aka.ms/devproxy" diff --git a/install.iss b/install.iss index e7013c4c..c6c60089 100644 --- a/install.iss +++ b/install.iss @@ -3,8 +3,8 @@ #define MyAppName "Dev Proxy" ; for local use only. In production replaced by a command line arg -#define MyAppSetupExeName "dev-proxy-installer-win-x64-0.17.0" -#define MyAppVersion "0.17.0" +#define MyAppSetupExeName "dev-proxy-installer-win-x64-0.17.1" +#define MyAppVersion "0.17.1" #define MyAppPublisher "Microsoft" #define MyAppURL "https://aka.ms/devproxy" diff --git a/schemas/v0.17.1/crudapiplugin.schema.json b/schemas/v0.17.1/crudapiplugin.schema.json new file mode 100644 index 00000000..286a3c2c --- /dev/null +++ b/schemas/v0.17.1/crudapiplugin.schema.json @@ -0,0 +1,135 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CRUD API plugin API definition", + "description": "API definition for use with the CRUD API Dev Proxy plugin", + "type": "object", + "properties": { + "$schema": { + "type": "string" + }, + "baseUrl": { + "type": "string" + }, + "dataFile": { + "type": "string" + }, + "actions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": [ + "create", + "getAll", + "getOne", + "getMany", + "merge", + "update", + "delete" + ] + }, + "url": { + "type": "string" + }, + "query": { + "type": "string" + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ] + }, + "auth": { + "type": "string", + "enum": [ + "none", + "entra" + ] + }, + "entraAuthConfig": { + "type": "object", + "properties": { + "audience": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "validateLifetime": { + "type": "boolean" + }, + "validateSigningKey": { + "type": "boolean" + } + } + } + }, + "required": [ + "action" + ], + "additionalProperties": false + } + }, + "auth": { + "type": "string", + "enum": [ + "none", + "entra" + ] + }, + "entraAuthConfig": { + "type": "object", + "properties": { + "audience": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "validateLifetime": { + "type": "boolean" + }, + "validateSigningKey": { + "type": "boolean" + } + } + } + }, + "required": [ + "baseUrl", + "dataFile", + "actions" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/schemas/v0.17.1/genericrandomerrorplugin.schema.json b/schemas/v0.17.1/genericrandomerrorplugin.schema.json new file mode 100644 index 00000000..39174b32 --- /dev/null +++ b/schemas/v0.17.1/genericrandomerrorplugin.schema.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dev Proxy GenericRandomErrorPlugin responses", + "description": "Mocks for the Dev Proxy GenericRandomErrorPlugin", + "type": "object", + "properties": { + "$schema": { + "type":"string" + }, + "responses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "body": { + "type": [ + "object", + "array", + "string" + ] + }, + "statusCode": { + "type": "integer" + }, + "headers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ] + } + } + } + } + } + }, + "required": [ + "responses" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/schemas/v0.17.1/mockrequestplugin.schema.json b/schemas/v0.17.1/mockrequestplugin.schema.json new file mode 100644 index 00000000..f690cb8f --- /dev/null +++ b/schemas/v0.17.1/mockrequestplugin.schema.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dev Proxy MockRequestPlugin mocks", + "description": "Mock request for the Dev Proxy MockRequestPlugin", + "type": "object", + "properties": { + "$schema": { + "type": "string" + }, + "request": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS", + "CONNECT", + "TRACE" + ] + }, + "body": { + "type": "object" + }, + "headers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ] + } + } + }, + "required": [ + "url" + ] + } + }, + "required": [ + "request" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/schemas/v0.17.1/mockresponseplugin.schema.json b/schemas/v0.17.1/mockresponseplugin.schema.json new file mode 100644 index 00000000..ea1e9bff --- /dev/null +++ b/schemas/v0.17.1/mockresponseplugin.schema.json @@ -0,0 +1,91 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dev Proxy MockResponsePlugin mocks", + "description": "Mocks for the Dev Proxy MockResponsePlugin", + "type": "object", + "properties": { + "$schema": { + "type": "string" + }, + "mocks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "request": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "method": { + "type": "string", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS", + "CONNECT", + "TRACE" + ] + }, + "nth": { + "type": "integer" + }, + "bodyFragment": { + "type": "string" + } + }, + "required": [ + "url" + ] + }, + "response": { + "type": "object", + "properties": { + "body": { + "type": [ + "object", + "array", + "string" + ] + }, + "statusCode": { + "type": "integer" + }, + "headers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ] + } + } + } + } + }, + "required": [ + "request", + "response" + ] + } + } + }, + "required": [ + "mocks" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/schemas/v0.17.1/ratelimitingplugin.schema.json b/schemas/v0.17.1/ratelimitingplugin.schema.json new file mode 100644 index 00000000..11e6ecbd --- /dev/null +++ b/schemas/v0.17.1/ratelimitingplugin.schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dev Proxy RateLimitingPlugin response", + "description": "Mock for the Dev Proxy RateLimitingPlugin", + "type": "object", + "properties": { + "$schema": { + "type":"string" + }, + "body": { + "type": [ + "object", + "array", + "string" + ] + }, + "statusCode": { + "type": "integer" + }, + "headers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ] + } + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/schemas/v0.17.1/rc.schema.json b/schemas/v0.17.1/rc.schema.json new file mode 100644 index 00000000..827c33ea --- /dev/null +++ b/schemas/v0.17.1/rc.schema.json @@ -0,0 +1,107 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dev Proxy config", + "description": "Configuration for Dev Proxy", + "type": "object", + "properties": { + "$schema": { + "type":"string" + }, + "ipAddress": { + "type": "string", + "format": "ipv4" + }, + "labelMode": { + "type": "string", + "enum": [ + "debug", + "text", + "icon", + "nerdFont" + ] + }, + "logLevel": { + "type": "string", + "enum": [ + "debug", + "information", + "warning", + "error" + ] + }, + "newVersionNotification": { + "type": "string", + "enum": [ + "none", + "stable", + "beta" + ] + }, + "plugins": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "pluginPath": { + "type": "string" + }, + "configSection": { + "type": "string" + }, + "urlsToWatch": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "name", + "enabled", + "pluginPath" + ] + } + }, + "port": { + "type": "number", + "minimum": 0, + "maximum": 65535 + }, + "rate": { + "type": "number", + "minimum": 0, + "maximum": 100 + }, + "record": { + "type": "boolean" + }, + "urlsToWatch": { + "type": "array", + "items": { + "type": "string" + } + }, + "watchPids": { + "type": "array", + "items": { + "type": "number" + } + }, + "watchProcessNames": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "plugins" + ], + "additionalProperties": true +} \ No newline at end of file diff --git a/scripts/local-build.ps1 b/scripts/local-build.ps1 index 619151f7..29681518 100644 --- a/scripts/local-build.ps1 +++ b/scripts/local-build.ps1 @@ -1,4 +1,4 @@ -$versionString = "v0.17.0-beta.4" +$versionString = "v0.17.1-beta.1" $version = $versionString.Substring(1) Remove-Item ../bld -Recurse -Force diff --git a/scripts/local-setup.ps1 b/scripts/local-setup.ps1 index f845f20f..16270179 100644 --- a/scripts/local-setup.ps1 +++ b/scripts/local-setup.ps1 @@ -1,4 +1,4 @@ -$versionString = "v0.17.0-beta.4" +$versionString = "v0.17.1-beta.1" $version = $versionString.Substring(1) $isBeta = $version.Contains("-beta")