From 42315db770b1cb4597580bd53de6a403a7154823 Mon Sep 17 00:00:00 2001 From: waldekmastykarz Date: Mon, 2 Sep 2024 08:36:39 +0200 Subject: [PATCH] Updates version to v0.20.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.20.1/crudapiplugin.schema.json | 135 ++++++++++++++++++ .../genericrandomerrorplugin.schema.json | 91 ++++++++++++ schemas/v0.20.1/mockrequestplugin.schema.json | 62 ++++++++ .../v0.20.1/mockresponseplugin.schema.json | 91 ++++++++++++ .../v0.20.1/ratelimitingplugin.schema.json | 40 ++++++ schemas/v0.20.1/rc.schema.json | 99 +++++++++++++ scripts/local-build.ps1 | 2 +- scripts/local-setup.ps1 | 2 +- 20 files changed, 534 insertions(+), 16 deletions(-) create mode 100644 schemas/v0.20.1/crudapiplugin.schema.json create mode 100644 schemas/v0.20.1/genericrandomerrorplugin.schema.json create mode 100644 schemas/v0.20.1/mockrequestplugin.schema.json create mode 100644 schemas/v0.20.1/mockresponseplugin.schema.json create mode 100644 schemas/v0.20.1/ratelimitingplugin.schema.json create mode 100644 schemas/v0.20.1/rc.schema.json diff --git a/dev-proxy-abstractions/dev-proxy-abstractions.csproj b/dev-proxy-abstractions/dev-proxy-abstractions.csproj index e08a6877..0a8ed39e 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.20.0 + 0.20.1 false diff --git a/dev-proxy-plugins/Mocks/MockResponsePlugin.cs b/dev-proxy-plugins/Mocks/MockResponsePlugin.cs index 30f3f936..620b8860 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.20.0/mockresponseplugin.schema.json"; + public string Schema { get; set; } = "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.20.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 2b4dbb1d..183552e8 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.20.0 + 0.20.1 false diff --git a/dev-proxy/dev-proxy.csproj b/dev-proxy/dev-proxy.csproj index 0278b1c6..4953be89 100644 --- a/dev-proxy/dev-proxy.csproj +++ b/dev-proxy/dev-proxy.csproj @@ -8,7 +8,7 @@ enable LICENSE Dev Proxy - 0.20.0 + 0.20.1 Microsoft Dev Proxy devproxy diff --git a/dev-proxy/devproxy-errors.json b/dev-proxy/devproxy-errors.json index cc659f5a..be5e4115 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.20.0/genericrandomerrorplugin.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.20.1/genericrandomerrorplugin.schema.json", "errors": [ { "request": { diff --git a/dev-proxy/devproxyrc.json b/dev-proxy/devproxyrc.json index 5ba571e9..eab598e8 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.20.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.20.1/rc.schema.json", "plugins": [ { "name": "RetryAfterPlugin", diff --git a/dev-proxy/presets/m365-mocks.json b/dev-proxy/presets/m365-mocks.json index eb085c89..9d780d33 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.20.0/mockresponseplugin.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.20.1/mockresponseplugin.schema.json", "mocks": [ { "request": { diff --git a/dev-proxy/presets/m365.json b/dev-proxy/presets/m365.json index 14ad9f35..a1cf3af0 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.20.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.20.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 c3cea7ec..94306fa9 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.20.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.20.1/rc.schema.json", "plugins": [ { "name": "RateLimitingPlugin", diff --git a/dev-proxy/presets/microsoft-graph.json b/dev-proxy/presets/microsoft-graph.json index a459a3a2..0b914666 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.20.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.20.1/rc.schema.json", "plugins": [ { "name": "GraphSelectGuidancePlugin", diff --git a/install-beta.iss b/install-beta.iss index 901919b5..58d27871 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.20.0-beta.1" -#define MyAppVersion "0.20.0-beta.1" +#define MyAppSetupExeName "dev-proxy-installer-win-x64-0.20.1-beta.1" +#define MyAppVersion "0.20.1-beta.1" #define MyAppPublisher "Microsoft" #define MyAppURL "https://aka.ms/devproxy" diff --git a/install.iss b/install.iss index 90198df9..7540e549 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.20.0" -#define MyAppVersion "0.20.0" +#define MyAppSetupExeName "dev-proxy-installer-win-x64-0.20.1" +#define MyAppVersion "0.20.1" #define MyAppPublisher "Microsoft" #define MyAppURL "https://aka.ms/devproxy" diff --git a/schemas/v0.20.1/crudapiplugin.schema.json b/schemas/v0.20.1/crudapiplugin.schema.json new file mode 100644 index 00000000..286a3c2c --- /dev/null +++ b/schemas/v0.20.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.20.1/genericrandomerrorplugin.schema.json b/schemas/v0.20.1/genericrandomerrorplugin.schema.json new file mode 100644 index 00000000..58b49c62 --- /dev/null +++ b/schemas/v0.20.1/genericrandomerrorplugin.schema.json @@ -0,0 +1,91 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dev Proxy GenericRandomErrorPlugin responses", + "description": "Error responses for the Dev Proxy GenericRandomErrorPlugin", + "type": "object", + "properties": { + "$schema": { + "type": "string" + }, + "errors": { + "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" + ] + }, + "bodyFragment": { + "type": "string" + } + }, + "required": [ + "url" + ] + }, + "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": [ + "request", + "responses" + ] + } + } + }, + "required": [ + "errors" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/schemas/v0.20.1/mockrequestplugin.schema.json b/schemas/v0.20.1/mockrequestplugin.schema.json new file mode 100644 index 00000000..f690cb8f --- /dev/null +++ b/schemas/v0.20.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.20.1/mockresponseplugin.schema.json b/schemas/v0.20.1/mockresponseplugin.schema.json new file mode 100644 index 00000000..ea1e9bff --- /dev/null +++ b/schemas/v0.20.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.20.1/ratelimitingplugin.schema.json b/schemas/v0.20.1/ratelimitingplugin.schema.json new file mode 100644 index 00000000..11e6ecbd --- /dev/null +++ b/schemas/v0.20.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.20.1/rc.schema.json b/schemas/v0.20.1/rc.schema.json new file mode 100644 index 00000000..7775c2bd --- /dev/null +++ b/schemas/v0.20.1/rc.schema.json @@ -0,0 +1,99 @@ +{ + "$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" + }, + "logLevel": { + "type": "string", + "enum": [ + "debug", + "information", + "warning", + "error", + "trace" + ] + }, + "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 6b1f3af4..424ad7bf 100644 --- a/scripts/local-build.ps1 +++ b/scripts/local-build.ps1 @@ -1,4 +1,4 @@ -$versionString = "v0.20.0-beta.1" +$versionString = "v0.20.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 d56c26d1..a9164da3 100644 --- a/scripts/local-setup.ps1 +++ b/scripts/local-setup.ps1 @@ -1,4 +1,4 @@ -$versionString = "v0.20.0-beta.1" +$versionString = "v0.20.1-beta.1" $version = $versionString.Substring(1) $isBeta = $version.Contains("-beta")