diff --git a/dev-proxy-abstractions/dev-proxy-abstractions.csproj b/dev-proxy-abstractions/dev-proxy-abstractions.csproj index 53125531..9c499772 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.16.0 + 0.16.1 false diff --git a/dev-proxy-plugins/Mocks/MockResponsePlugin.cs b/dev-proxy-plugins/Mocks/MockResponsePlugin.cs index 8872170e..a8746280 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.16.0/mockresponseplugin.schema.json"; + public string Schema { get; set; } = "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.16.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 45531657..89653593 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.16.0 + 0.16.1 false diff --git a/dev-proxy/dev-proxy.csproj b/dev-proxy/dev-proxy.csproj index 4c013d37..55620c01 100644 --- a/dev-proxy/dev-proxy.csproj +++ b/dev-proxy/dev-proxy.csproj @@ -8,7 +8,7 @@ enable LICENSE Dev Proxy - 0.16.0 + 0.16.1 Microsoft Dev Proxy devproxy diff --git a/dev-proxy/devproxy-errors.json b/dev-proxy/devproxy-errors.json index efa47c75..b5c1c94d 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.16.0/genericrandomerrorplugin.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.16.1/genericrandomerrorplugin.schema.json", "responses": [ { "statusCode": 400, diff --git a/dev-proxy/devproxyrc.json b/dev-proxy/devproxyrc.json index 3852e77b..44e75193 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.16.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.16.1/rc.schema.json", "plugins": [ { "name": "RetryAfterPlugin", diff --git a/dev-proxy/presets/m365-mocks.json b/dev-proxy/presets/m365-mocks.json index f9034550..e48c04e1 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.16.0/mockresponseplugin.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.16.1/mockresponseplugin.schema.json", "mocks": [ { "request": { diff --git a/dev-proxy/presets/m365.json b/dev-proxy/presets/m365.json index 1e7f524e..56660b98 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.16.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.16.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 afbad702..7b5d35ae 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.16.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.16.1/rc.schema.json", "plugins": [ { "name": "RateLimitingPlugin", diff --git a/dev-proxy/presets/microsoft-graph.json b/dev-proxy/presets/microsoft-graph.json index 52ce6e20..182a863e 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.16.0/rc.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.16.1/rc.schema.json", "plugins": [ { "name": "GraphSelectGuidancePlugin", diff --git a/schemas/v0.16.1/crudapiplugin.schema.json b/schemas/v0.16.1/crudapiplugin.schema.json new file mode 100644 index 00000000..286a3c2c --- /dev/null +++ b/schemas/v0.16.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.16.1/genericrandomerrorplugin.schema.json b/schemas/v0.16.1/genericrandomerrorplugin.schema.json new file mode 100644 index 00000000..39174b32 --- /dev/null +++ b/schemas/v0.16.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.16.1/mockrequestplugin.schema.json b/schemas/v0.16.1/mockrequestplugin.schema.json new file mode 100644 index 00000000..f690cb8f --- /dev/null +++ b/schemas/v0.16.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.16.1/mockresponseplugin.schema.json b/schemas/v0.16.1/mockresponseplugin.schema.json new file mode 100644 index 00000000..d4719182 --- /dev/null +++ b/schemas/v0.16.1/mockresponseplugin.schema.json @@ -0,0 +1,88 @@ +{ + "$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" + } + }, + "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.16.1/ratelimitingplugin.schema.json b/schemas/v0.16.1/ratelimitingplugin.schema.json new file mode 100644 index 00000000..11e6ecbd --- /dev/null +++ b/schemas/v0.16.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.16.1/rc.schema.json b/schemas/v0.16.1/rc.schema.json new file mode 100644 index 00000000..827c33ea --- /dev/null +++ b/schemas/v0.16.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