From 9e8dc7e282d478a6b505bdb344a5e274b67bf269 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 19 Nov 2021 18:56:25 +0000 Subject: [PATCH] CodeGen from PR 16818 in Azure/azure-rest-api-specs Merge 1bda422cff125bd31e30ee2cee41a4d4234da85b into a1b9ef6577a827925dcf6a0bc1b5cb5ad79afddb --- .../Microsoft.ApiManagement.json | 178 ++++++++++++++++++ 1 file changed, 178 insertions(+) diff --git a/schemas/2021-04-01-preview/Microsoft.ApiManagement.json b/schemas/2021-04-01-preview/Microsoft.ApiManagement.json index 20da4ae84a..a55520125d 100644 --- a/schemas/2021-04-01-preview/Microsoft.ApiManagement.json +++ b/schemas/2021-04-01-preview/Microsoft.ApiManagement.json @@ -1954,6 +1954,70 @@ "properties" ], "description": "Microsoft.ApiManagement/service/portalsettings" + }, + { + "type": "object", + "properties": { + "name": { + "oneOf": [ + { + "type": "string", + "pattern": "^.*/csp$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ] + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PortalSettingsCspProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The developer portal Content Security Policy (CSP) settings contract properties." + } + }, + "required": [ + "name", + "properties" + ], + "description": "Microsoft.ApiManagement/service/portalsettings" + }, + { + "type": "object", + "properties": { + "name": { + "oneOf": [ + { + "type": "string", + "pattern": "^.*/cors$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ] + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PortalSettingsCorsProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings contract properties." + } + }, + "required": [ + "name", + "properties" + ], + "description": "Microsoft.ApiManagement/service/portalsettings" } ], "properties": { @@ -5229,6 +5293,66 @@ } } }, + "PortalSettingsCorsProperties": { + "type": "object", + "properties": { + "allowedOrigins": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Allowed origins, e.g. `https://trusted.com`." + } + }, + "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings contract properties." + }, + "PortalSettingsCspProperties": { + "type": "object", + "properties": { + "allowedSources": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`." + }, + "mode": { + "oneOf": [ + { + "type": "string", + "enum": [ + "enabled", + "disabled", + "reportOnly" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The mode of the developer portal Content Security Policy (CSP)." + }, + "reportUri": { + "type": "string", + "description": "The URL used by the browser to report CSP violations." + } + }, + "description": "The developer portal Content Security Policy (CSP) settings contract properties." + }, "PortalSigninSettingProperties": { "type": "object", "properties": { @@ -7347,6 +7471,60 @@ "properties" ], "description": "Microsoft.ApiManagement/service/portalsettings" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "csp" + ] + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PortalSettingsCspProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The developer portal Content Security Policy (CSP) settings contract properties." + } + }, + "required": [ + "name", + "properties" + ], + "description": "Microsoft.ApiManagement/service/portalsettings" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "cors" + ] + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PortalSettingsCorsProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings contract properties." + } + }, + "required": [ + "name", + "properties" + ], + "description": "Microsoft.ApiManagement/service/portalsettings" } ], "properties": {