From 9e4a71aba45b8112e9fcc4b08b995ee320f8c1ae Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Fri, 19 Nov 2021 11:25:05 -0800 Subject: [PATCH 01/37] Added CORS and CSP settings resources. --- .../apimportalsettings.json | 384 ++++++++++++++++++ .../ApiManagementPortalSettingsCorsGet.json | 20 + .../ApiManagementPortalSettingsCorsHead.json | 15 + .../ApiManagementPortalSettingsCorsPatch.json | 17 + .../ApiManagementPortalSettingsCorsPut.json | 26 ++ .../ApiManagementPortalSettingsCspGet.json | 25 ++ .../ApiManagementPortalSettingsCspHead.json | 15 + .../ApiManagementPortalSettingsCspPatch.json | 23 ++ .../ApiManagementPortalSettingsCspPut.json | 37 ++ 9 files changed, 562 insertions(+) create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsGet.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsHead.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPatch.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPut.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspGet.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspHead.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPatch.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPut.json diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json index 7ee746826fa5..1902ed652607 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json @@ -693,6 +693,390 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/csp": { + "head": { + "tags": [ + "PortalSettingsCsp" + ], + "operationId": "PortalSettingsCsp_GetEntityTag", + "description": "Get the entity state (Etag) version of the Content Security Policy (CSP) settings for the developer portal.", + "x-ms-examples": { + "ApiManagementPortalSettingsCspHead": { + "$ref": "./examples/ApiManagementPortalSettingsCspHead.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Operation completed successfully.", + "headers": { + "ETag": { + "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "PortalSettingsCsp" + ], + "operationId": "PortalSettingsCsp_Get", + "description": "Get the Content Security Policy (CSP) settings for the developer portal.", + "x-ms-examples": { + "ApiManagementPortalSettingsCspGet": { + "$ref": "./examples/ApiManagementPortalSettingsCspGet.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The developer portal Content Security Policy (CSP) settings.", + "schema": { + "$ref": "./definitions.json#/definitions/PortalSettingsCsp" + }, + "headers": { + "ETag": { + "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "PortalSettingsCsp" + ], + "operationId": "PortalSettingsCsp_Update", + "description": "Update the Content Security Policy (CSP) settings for the developer portal.", + "x-ms-examples": { + "ApiManagementPortalSettingsCspPatch": { + "$ref": "./examples/ApiManagementPortalSettingsCspPatch.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "./definitions.json#/definitions/PortalSettingsCsp" + }, + "description": "Update the Content Security Policy (CSP) settings for the developer portal." + }, + { + "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "204": { + "description": "The settings were successfully updated." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "PortalSettingsCsp" + ], + "operationId": "PortalSettingsCsp_CreateOrUpdate", + "description": "Create or update Content Security Policy (CSP) settings for the developer portal.", + "x-ms-examples": { + "PortalSettingsCspPut": { + "$ref": "./examples/ApiManagementPortalSettingsCspPut.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "./definitions.json#/definitions/PortalSettingsCsp" + }, + "description": "Create or update parameters." + }, + { + "$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The settings were successfully updated.", + "schema": { + "$ref": "./definitions.json#/definitions/PortalSettingsCsp" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/cors": { + "head": { + "tags": [ + "PortalSettingsCors" + ], + "operationId": "PortalSettingsCors_GetEntityTag", + "description": "Get the entity state (Etag) version of the Cross-Origin Resource Sharing (CORS) settings for the developer portal.", + "x-ms-examples": { + "ApiManagementPortalSettingsCorsHead": { + "$ref": "./examples/ApiManagementPortalSettingsCorsHead.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Operation completed successfully.", + "headers": { + "ETag": { + "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "PortalSettingsCors" + ], + "operationId": "PortalSettingsCors_Get", + "description": "Get the Cross-Origin Resource Sharing (CORS) settings for the developer portal.", + "x-ms-examples": { + "ApiManagementPortalSettingsCorsGet": { + "$ref": "./examples/ApiManagementPortalSettingsCorsGet.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings.", + "schema": { + "$ref": "./definitions.json#/definitions/PortalSettingsCors" + }, + "headers": { + "ETag": { + "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "PortalSettingsCors" + ], + "operationId": "PortalSettingsCors_Update", + "description": "Update the Cross-Origin Resource Sharing (CORS) settings for the developer portal.", + "x-ms-examples": { + "ApiManagementPortalSettingsCorsPatch": { + "$ref": "./examples/ApiManagementPortalSettingsCorsPatch.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "./definitions.json#/definitions/PortalSettingsCors" + }, + "description": "Update the Cross-Origin Resource Sharing (CORS) settings for the developer portal." + }, + { + "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "204": { + "description": "The settings were successfully updated." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "PortalSettingsCors" + ], + "operationId": "PortalSettingsCors_CreateOrUpdate", + "description": "Create or update the Cross-Origin Resource Sharing (CORS) settings for the developer portal.", + "x-ms-examples": { + "ApiManagementPortalSettingsCorsPut": { + "$ref": "./examples/ApiManagementPortalSettingsCorsPut.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "./definitions.json#/definitions/PortalSettingsCors" + }, + "description": "Create or update parameters." + }, + { + "$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The settings were successfully updated.", + "schema": { + "$ref": "./definitions.json#/definitions/PortalSettingsCors" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + } } }, "definitions": {} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsGet.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsGet.json new file mode 100644 index 000000000000..e759db21f616 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsGet.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2021-04-01-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/cors", + "type": "Microsoft.ApiManagement/service/portalsettings/cors", + "name": "cors", + "properties": { + "allowedOrigins": ["https://trusted.com"] + } + } + } + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsHead.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsHead.json new file mode 100644 index 000000000000..7407089f02d3 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsHead.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2021-04-01-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPatch.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPatch.json new file mode 100644 index 000000000000..970b857d033c --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPatch.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2021-04-01-preview", + "subscriptionId": "subid", + "If-Match": "*", + "parameters": { + "properties": { + "allowedOrigins": ["https://trusted.com"] + } + } + }, + "responses": { + "204": {} + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPut.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPut.json new file mode 100644 index 000000000000..59ebf9e43fb3 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPut.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2021-04-01-preview", + "subscriptionId": "subid", + "If-Match": "*", + "parameters": { + "properties": { + "allowedOrigins": ["https://trusted.com"] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/cors", + "type": "Microsoft.ApiManagement/service/portalsettings/cors", + "name": "cors", + "properties": { + "allowedOrigins": ["https://trusted.com"] + } + } + } + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspGet.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspGet.json new file mode 100644 index 000000000000..a5e5775bcdd9 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2021-04-01-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/csp", + "type": "Microsoft.ApiManagement/service/portalsettings/csp", + "name": "csp", + "properties": { + "mode": "reportOnly", + "reportUri": "https://report.com", + "allowedSources": [ + "*.trusted.com", + "trusted.com" + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspHead.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspHead.json new file mode 100644 index 000000000000..7407089f02d3 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspHead.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2021-04-01-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPatch.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPatch.json new file mode 100644 index 000000000000..2414c44f4c89 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPatch.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2021-04-01-preview", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512288c680b", + "If-Match": "*", + "parameters": { + "properties": { + "mode": "reportOnly", + "reportUri": "https://report.com", + "allowedSources": [ + "*.trusted.com", + "trusted.com" + ] + } + } + }, + "responses": { + "204": {} + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPut.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPut.json new file mode 100644 index 000000000000..9e677b320c8c --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPut.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2021-04-01-preview", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512288c680b", + "If-Match": "*", + "parameters": { + "properties": { + "mode": "reportOnly", + "reportUri": "https://report.com", + "allowedSources": [ + "*.trusted.com", + "trusted.com" + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/csp", + "type": "Microsoft.ApiManagement/service/portalsettings/csp", + "name": "csp", + "properties": { + "mode": "reportOnly", + "reportUri": "https://report.com", + "allowedSources": [ + "*.trusted.com", + "trusted.com" + ] + } + } + } + } +} From c62719d22b73a6045cf6fa6503c6f08768497829 Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Fri, 19 Nov 2021 11:35:24 -0800 Subject: [PATCH 02/37] Added missing definitions. --- .../2021-12-01-preview/definitions.json | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json index c6d8ed869747..a17a5bf64f04 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json @@ -3945,6 +3945,91 @@ }, "description": "Delegation settings contract properties." }, + "PortalSettingsCors": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PortalSettingsCorsProperties", + "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings contract properties." + } + }, + "allOf": [ + { + "$ref": "./../../../../../common-types/resource-management/v2/types.json#/definitions/Resource" + } + ], + "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings." + }, + "PortalSettingsCorsProperties": { + "properties": { + "allowedOrigins": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed origins, e.g. `https://trusted.com`." + } + }, + "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings contract properties." + }, + "PortalSettingsCsp": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PortalSettingsCspProperties", + "description": "The developer portal Content Security Policy (CSP) settings contract properties." + } + }, + "allOf": [ + { + "$ref": "./../../../../../common-types/resource-management/v2/types.json#/definitions/Resource" + } + ], + "description": "The developer portal Content Security Policy (CSP) settings." + }, + "PortalSettingsCspProperties": { + "properties": { + "mode": { + "type": "string", + "description": "The mode of the developer portal Content Security Policy (CSP).", + "enum": [ + "enabled", + "disabled", + "reportOnly" + ], + "x-ms-enum": { + "modelAsString": true, + "name": "PortalSettingsCspMode", + "values": [ + { + "value": "enabled", + "description": "The browser will block requests not matching allowed origins." + }, + { + "value": "disabled", + "description": "The browser will not apply the origin restrictions." + }, + { + "value": "reportOnly", + "description": "The browser will report requests not matching allowed origins without blocking them." + } + ] + } + }, + "reportUri": { + "type": "string", + "description": "The URL used by the browser to report CSP violations." + }, + "allowedSources": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`." + } + }, + "description": "The developer portal Content Security Policy (CSP) settings contract properties." + }, "PortalSettingsCollection": { "properties": { "value": { From 01b0228adf82a996e472247997cf633f4a73aede Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Fri, 19 Nov 2021 12:56:07 -0800 Subject: [PATCH 03/37] Added suppression of R4009 for apimportalsettings.json. --- specification/apimanagement/resource-manager/readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/apimanagement/resource-manager/readme.md b/specification/apimanagement/resource-manager/readme.md index 503db5c7210c..39a0f5f6c027 100644 --- a/specification/apimanagement/resource-manager/readme.md +++ b/specification/apimanagement/resource-manager/readme.md @@ -724,4 +724,7 @@ directive: - suppress: R4009 from: apimprivatelink.json reason: Warning raised to error while PR was being reviewed. SystemData will implement in next preview version. + - suppress: R4009 + from: apimportalsettings.json + reason: Warning raised to error while PR was being reviewed. SystemData will implement in next preview version. ``` From 75ae892dc21eaf9306fc4207a3b89a597dcdd3bd Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Fri, 19 Nov 2021 14:33:48 -0800 Subject: [PATCH 04/37] Ran Prettier. --- .../examples/ApiManagementPortalSettingsCorsGet.json | 4 +++- .../examples/ApiManagementPortalSettingsCorsPatch.json | 4 +++- .../examples/ApiManagementPortalSettingsCorsPut.json | 8 ++++++-- .../examples/ApiManagementPortalSettingsCspGet.json | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsGet.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsGet.json index e759db21f616..66159a43b10a 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsGet.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsGet.json @@ -12,7 +12,9 @@ "type": "Microsoft.ApiManagement/service/portalsettings/cors", "name": "cors", "properties": { - "allowedOrigins": ["https://trusted.com"] + "allowedOrigins": [ + "https://trusted.com" + ] } } } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPatch.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPatch.json index 970b857d033c..4b86b24473b9 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPatch.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPatch.json @@ -7,7 +7,9 @@ "If-Match": "*", "parameters": { "properties": { - "allowedOrigins": ["https://trusted.com"] + "allowedOrigins": [ + "https://trusted.com" + ] } } }, diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPut.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPut.json index 59ebf9e43fb3..0bb8aa9d254a 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPut.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPut.json @@ -7,7 +7,9 @@ "If-Match": "*", "parameters": { "properties": { - "allowedOrigins": ["https://trusted.com"] + "allowedOrigins": [ + "https://trusted.com" + ] } } }, @@ -18,7 +20,9 @@ "type": "Microsoft.ApiManagement/service/portalsettings/cors", "name": "cors", "properties": { - "allowedOrigins": ["https://trusted.com"] + "allowedOrigins": [ + "https://trusted.com" + ] } } } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspGet.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspGet.json index a5e5775bcdd9..b081e6d11892 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspGet.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspGet.json @@ -22,4 +22,4 @@ } } } -} \ No newline at end of file +} From 806afe64a57ad71b2dee69c4dec5104e1b98d5fd Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Fri, 19 Nov 2021 14:45:08 -0800 Subject: [PATCH 05/37] Renamed definitions. --- .../preview/2021-12-01-preview/apimanagement.json | 1 + .../preview/2021-12-01-preview/definitions.json | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json index 1270de56ffa8..903d9b67bf32 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json @@ -36,6 +36,7 @@ "paths": {}, "definitions": { "ErrorFieldContract": { + "type": "object", "properties": { "code": { "type": "string", diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json index a17a5bf64f04..fb79d2a5b1b0 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json @@ -3945,11 +3945,11 @@ }, "description": "Delegation settings contract properties." }, - "PortalSettingsCors": { + "PortalSettingsCorsContract": { "properties": { "properties": { "x-ms-client-flatten": true, - "$ref": "#/definitions/PortalSettingsCorsProperties", + "$ref": "#/definitions/PortalSettingsCorsPropertiesContract", "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings contract properties." } }, @@ -3960,7 +3960,7 @@ ], "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings." }, - "PortalSettingsCorsProperties": { + "PortalSettingsCorsPropertiesContract": { "properties": { "allowedOrigins": { "type": "array", @@ -3972,11 +3972,11 @@ }, "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings contract properties." }, - "PortalSettingsCsp": { + "PortalSettingsCspContract": { "properties": { "properties": { "x-ms-client-flatten": true, - "$ref": "#/definitions/PortalSettingsCspProperties", + "$ref": "#/definitions/PortalSettingsCspPropertiesContract", "description": "The developer portal Content Security Policy (CSP) settings contract properties." } }, @@ -3987,7 +3987,7 @@ ], "description": "The developer portal Content Security Policy (CSP) settings." }, - "PortalSettingsCspProperties": { + "PortalSettingsCspPropertiesContract": { "properties": { "mode": { "type": "string", From f06214680113773d35356e87579cda57351804a1 Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Fri, 19 Nov 2021 15:02:22 -0800 Subject: [PATCH 06/37] Fixed references. --- .../2021-12-01-preview/apimportalsettings.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json index 1902ed652607..82aa75aac31f 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json @@ -767,7 +767,7 @@ "200": { "description": "The developer portal Content Security Policy (CSP) settings.", "schema": { - "$ref": "./definitions.json#/definitions/PortalSettingsCsp" + "$ref": "./definitions.json#/definitions/PortalSettingsCspContract" }, "headers": { "ETag": { @@ -807,7 +807,7 @@ "in": "body", "required": true, "schema": { - "$ref": "./definitions.json#/definitions/PortalSettingsCsp" + "$ref": "./definitions.json#/definitions/PortalSettingsCspContract" }, "description": "Update the Content Security Policy (CSP) settings for the developer portal." }, @@ -856,7 +856,7 @@ "in": "body", "required": true, "schema": { - "$ref": "./definitions.json#/definitions/PortalSettingsCsp" + "$ref": "./definitions.json#/definitions/PortalSettingsCspContract" }, "description": "Create or update parameters." }, @@ -874,7 +874,7 @@ "200": { "description": "The settings were successfully updated.", "schema": { - "$ref": "./definitions.json#/definitions/PortalSettingsCsp" + "$ref": "./definitions.json#/definitions/PortalSettingsCspContract" } }, "default": { @@ -959,7 +959,7 @@ "200": { "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings.", "schema": { - "$ref": "./definitions.json#/definitions/PortalSettingsCors" + "$ref": "./definitions.json#/definitions/PortalSettingsCorsContract" }, "headers": { "ETag": { @@ -999,7 +999,7 @@ "in": "body", "required": true, "schema": { - "$ref": "./definitions.json#/definitions/PortalSettingsCors" + "$ref": "./definitions.json#/definitions/PortalSettingsCorsContract" }, "description": "Update the Cross-Origin Resource Sharing (CORS) settings for the developer portal." }, @@ -1048,7 +1048,7 @@ "in": "body", "required": true, "schema": { - "$ref": "./definitions.json#/definitions/PortalSettingsCors" + "$ref": "./definitions.json#/definitions/PortalSettingsCorsContract" }, "description": "Create or update parameters." }, @@ -1066,7 +1066,7 @@ "200": { "description": "The settings were successfully updated.", "schema": { - "$ref": "./definitions.json#/definitions/PortalSettingsCors" + "$ref": "./definitions.json#/definitions/PortalSettingsCorsContract" } }, "default": { From 5616af1399ac62c46855f99e6a09be9cd345f58e Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Fri, 19 Nov 2021 16:13:52 -0800 Subject: [PATCH 07/37] Updated examples. --- .../examples/ApiManagementPortalSettingsCorsGet.json | 2 +- .../examples/ApiManagementPortalSettingsCorsHead.json | 2 +- .../examples/ApiManagementPortalSettingsCorsPatch.json | 2 +- .../examples/ApiManagementPortalSettingsCorsPut.json | 2 +- .../examples/ApiManagementPortalSettingsCspGet.json | 2 +- .../examples/ApiManagementPortalSettingsCspHead.json | 2 +- .../examples/ApiManagementPortalSettingsCspPatch.json | 2 +- .../examples/ApiManagementPortalSettingsCspPut.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsGet.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsGet.json index 66159a43b10a..86ff8f1b63da 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsGet.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsGet.json @@ -2,7 +2,7 @@ "parameters": { "serviceName": "apimService1", "resourceGroupName": "rg1", - "api-version": "2021-04-01-preview", + "api-version": "2021-12-01-preview", "subscriptionId": "subid" }, "responses": { diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsHead.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsHead.json index 7407089f02d3..14c1ada64a9a 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsHead.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsHead.json @@ -2,7 +2,7 @@ "parameters": { "serviceName": "apimService1", "resourceGroupName": "rg1", - "api-version": "2021-04-01-preview", + "api-version": "2021-12-01-preview", "subscriptionId": "subid" }, "responses": { diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPatch.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPatch.json index 4b86b24473b9..b89871b3fa4d 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPatch.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPatch.json @@ -2,7 +2,7 @@ "parameters": { "serviceName": "apimService1", "resourceGroupName": "rg1", - "api-version": "2021-04-01-preview", + "api-version": "2021-12-01-preview", "subscriptionId": "subid", "If-Match": "*", "parameters": { diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPut.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPut.json index 0bb8aa9d254a..0ee942e8359e 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPut.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPut.json @@ -2,7 +2,7 @@ "parameters": { "serviceName": "apimService1", "resourceGroupName": "rg1", - "api-version": "2021-04-01-preview", + "api-version": "2021-12-01-preview", "subscriptionId": "subid", "If-Match": "*", "parameters": { diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspGet.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspGet.json index b081e6d11892..2bbfbc8f82a0 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspGet.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspGet.json @@ -2,7 +2,7 @@ "parameters": { "serviceName": "apimService1", "resourceGroupName": "rg1", - "api-version": "2021-04-01-preview", + "api-version": "2021-12-01-preview", "subscriptionId": "subid" }, "responses": { diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspHead.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspHead.json index 7407089f02d3..14c1ada64a9a 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspHead.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspHead.json @@ -2,7 +2,7 @@ "parameters": { "serviceName": "apimService1", "resourceGroupName": "rg1", - "api-version": "2021-04-01-preview", + "api-version": "2021-12-01-preview", "subscriptionId": "subid" }, "responses": { diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPatch.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPatch.json index 2414c44f4c89..247d0654f674 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPatch.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPatch.json @@ -2,7 +2,7 @@ "parameters": { "serviceName": "apimService1", "resourceGroupName": "rg1", - "api-version": "2021-04-01-preview", + "api-version": "2021-12-01-preview", "subscriptionId": "subid", "userId": "5931a75ae4bbd512288c680b", "If-Match": "*", diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPut.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPut.json index 9e677b320c8c..7252b8a56d34 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPut.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPut.json @@ -2,7 +2,7 @@ "parameters": { "serviceName": "apimService1", "resourceGroupName": "rg1", - "api-version": "2021-04-01-preview", + "api-version": "2021-12-01-preview", "subscriptionId": "subid", "userId": "5931a75ae4bbd512288c680b", "If-Match": "*", From 44d73f22c44da566485185688e9e247f63dd6fee Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Fri, 19 Nov 2021 16:21:08 -0800 Subject: [PATCH 08/37] Reversed change. --- .../preview/2021-12-01-preview/apimanagement.json | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json index 903d9b67bf32..1270de56ffa8 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json @@ -36,7 +36,6 @@ "paths": {}, "definitions": { "ErrorFieldContract": { - "type": "object", "properties": { "code": { "type": "string", From 7b4f953dc22e2d87e28b2470b261a813ee2f66c9 Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Wed, 12 Jan 2022 14:16:01 -0800 Subject: [PATCH 09/37] Created new resource for portal settings. --- .../2021-12-01-preview/apimanagement.json | 10 + .../2021-12-01-preview/apimportalconfig.json | 285 +++++++++++++ .../apimportalsettings.json | 398 +----------------- .../2021-12-01-preview/apimsettings.json | 2 + .../2021-12-01-preview/definitions.json | 157 ++++--- .../apimanagement/resource-manager/readme.md | 4 + 6 files changed, 418 insertions(+), 438 deletions(-) create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json index 1270de56ffa8..dfa998dc1f8d 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json @@ -765,6 +765,16 @@ "minLength": 1, "maxLength": 80, "x-ms-parameter-location": "method" + }, + "PortalConfigIdParameter": { + "name": "portalConfigId", + "in": "path", + "required": true, + "type": "string", + "description": "Portal configuration identifier.", + "minLength": 1, + "maxLength": 80, + "x-ms-parameter-location": "method" } } } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json new file mode 100644 index 000000000000..74a436a0dd96 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json @@ -0,0 +1,285 @@ +{ + "swagger": "2.0", + "info": { + "title": "ApiManagementClient", + "description": "Use this REST API to perform operations on the developer portal configuration.", + "version": "2021-04-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs": { + "get": { + "tags": [ + "PortalConfig" + ], + "operationId": "PortalConfig_ListByService", + "description": "Lists the developer portal configurations.", + "x-ms-examples": { + "ApiManagementListPortalConfig": { + "$ref": "./examples/ApiManagementListPortalConfig.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The developer portal configuration.", + "schema": { + "$ref": "./definitions.json#/definitions/PortalConfigCollection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}": { + "head": { + "tags": [ + "PortalConfig" + ], + "operationId": "PortalConfig_GetEntityTag", + "description": "Gets the entity state (Etag) version of the developer portal configuration.", + "x-ms-examples": { + "ApiManagementHeadPortalConfig": { + "$ref": "./examples/ApiManagementHeadPortalConfig.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/PortalConfigIdParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Operation completed successfully.", + "headers": { + "ETag": { + "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "PortalConfig" + ], + "operationId": "PortalConfig_Get", + "description": "Get the developer portal configuration.", + "x-ms-examples": { + "ApiManagementPortalConfig": { + "$ref": "./examples/ApiManagementPortalConfig.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/PortalConfigIdParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The developer portal configuration.", + "schema": { + "$ref": "./definitions.json#/definitions/PortalConfig" + }, + "headers": { + "ETag": { + "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "PortalConfig" + ], + "operationId": "PortalConfig_Update", + "description": "Update the developer portal configuration.", + "x-ms-examples": { + "ApiManagementPortalConfigUpdate": { + "$ref": "./examples/ApiManagementPortalConfigUpdate.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/PortalConfigIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "./definitions.json#/definitions/PortalConfig" + }, + "description": "Update the developer portal configuration." + }, + { + "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "204": { + "description": "Operation completed successfully." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "PortalConfig" + ], + "operationId": "PortalConfig_CreateOrUpdate", + "description": "Create or update the developer portal configuration.", + "x-ms-examples": { + "ApiManagementPortalConfigUpdate": { + "$ref": "./examples/ApiManagementPortalConfig.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/PortalConfigIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "./definitions.json#/definitions/PortalConfig" + }, + "description": "Create or update parameters." + }, + { + "$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Operation completed successfully.", + "schema": { + "$ref": "./definitions.json#/definitions/PortalConfig" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": {} +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json index 82aa75aac31f..9ef8d0d5a9ff 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json @@ -36,6 +36,7 @@ "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings": { "get": { + "deprecated": true, "tags": [ "PortalSettings" ], @@ -78,6 +79,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin": { "head": { + "deprecated": true, "tags": [ "SignInSettings" ], @@ -121,6 +123,7 @@ } }, "get": { + "deprecated": true, "tags": [ "SignInSettings" ], @@ -167,6 +170,7 @@ } }, "patch": { + "deprecated": true, "tags": [ "SignInSettings" ], @@ -216,6 +220,7 @@ } }, "put": { + "deprecated": true, "tags": [ "SignInSettings" ], @@ -270,6 +275,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup": { "head": { + "deprecated": true, "tags": [ "SignUpSettings" ], @@ -313,6 +319,7 @@ } }, "get": { + "deprecated": true, "tags": [ "SignUpSettings" ], @@ -359,6 +366,7 @@ } }, "patch": { + "deprecated": true, "tags": [ "SignUpSettings" ], @@ -408,6 +416,7 @@ } }, "put": { + "deprecated": true, "tags": [ "SignUpSettings" ], @@ -462,6 +471,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation": { "head": { + "deprecated": true, "tags": [ "DelegationSettings" ], @@ -505,6 +515,7 @@ } }, "get": { + "deprecated": true, "tags": [ "DelegationSettings" ], @@ -551,6 +562,7 @@ } }, "patch": { + "deprecated": true, "tags": [ "DelegationSettings" ], @@ -600,6 +612,7 @@ } }, "put": { + "deprecated": true, "tags": [ "DelegationSettings" ], @@ -654,6 +667,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation/listSecrets": { "post": { + "deprecated": true, "tags": [ "DelegationSettings" ], @@ -693,390 +707,6 @@ } } } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/csp": { - "head": { - "tags": [ - "PortalSettingsCsp" - ], - "operationId": "PortalSettingsCsp_GetEntityTag", - "description": "Get the entity state (Etag) version of the Content Security Policy (CSP) settings for the developer portal.", - "x-ms-examples": { - "ApiManagementPortalSettingsCspHead": { - "$ref": "./examples/ApiManagementPortalSettingsCspHead.json" - } - }, - "parameters": [ - { - "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "Operation completed successfully.", - "headers": { - "ETag": { - "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", - "type": "string" - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "./apimanagement.json#/definitions/ErrorResponse" - } - } - } - }, - "get": { - "tags": [ - "PortalSettingsCsp" - ], - "operationId": "PortalSettingsCsp_Get", - "description": "Get the Content Security Policy (CSP) settings for the developer portal.", - "x-ms-examples": { - "ApiManagementPortalSettingsCspGet": { - "$ref": "./examples/ApiManagementPortalSettingsCspGet.json" - } - }, - "parameters": [ - { - "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "The developer portal Content Security Policy (CSP) settings.", - "schema": { - "$ref": "./definitions.json#/definitions/PortalSettingsCspContract" - }, - "headers": { - "ETag": { - "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", - "type": "string" - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "./apimanagement.json#/definitions/ErrorResponse" - } - } - } - }, - "patch": { - "tags": [ - "PortalSettingsCsp" - ], - "operationId": "PortalSettingsCsp_Update", - "description": "Update the Content Security Policy (CSP) settings for the developer portal.", - "x-ms-examples": { - "ApiManagementPortalSettingsCspPatch": { - "$ref": "./examples/ApiManagementPortalSettingsCspPatch.json" - } - }, - "parameters": [ - { - "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "./definitions.json#/definitions/PortalSettingsCspContract" - }, - "description": "Update the Content Security Policy (CSP) settings for the developer portal." - }, - { - "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" - } - ], - "responses": { - "204": { - "description": "The settings were successfully updated." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "./apimanagement.json#/definitions/ErrorResponse" - } - } - } - }, - "put": { - "tags": [ - "PortalSettingsCsp" - ], - "operationId": "PortalSettingsCsp_CreateOrUpdate", - "description": "Create or update Content Security Policy (CSP) settings for the developer portal.", - "x-ms-examples": { - "PortalSettingsCspPut": { - "$ref": "./examples/ApiManagementPortalSettingsCspPut.json" - } - }, - "parameters": [ - { - "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "./definitions.json#/definitions/PortalSettingsCspContract" - }, - "description": "Create or update parameters." - }, - { - "$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "The settings were successfully updated.", - "schema": { - "$ref": "./definitions.json#/definitions/PortalSettingsCspContract" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "./apimanagement.json#/definitions/ErrorResponse" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/cors": { - "head": { - "tags": [ - "PortalSettingsCors" - ], - "operationId": "PortalSettingsCors_GetEntityTag", - "description": "Get the entity state (Etag) version of the Cross-Origin Resource Sharing (CORS) settings for the developer portal.", - "x-ms-examples": { - "ApiManagementPortalSettingsCorsHead": { - "$ref": "./examples/ApiManagementPortalSettingsCorsHead.json" - } - }, - "parameters": [ - { - "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "Operation completed successfully.", - "headers": { - "ETag": { - "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", - "type": "string" - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "./apimanagement.json#/definitions/ErrorResponse" - } - } - } - }, - "get": { - "tags": [ - "PortalSettingsCors" - ], - "operationId": "PortalSettingsCors_Get", - "description": "Get the Cross-Origin Resource Sharing (CORS) settings for the developer portal.", - "x-ms-examples": { - "ApiManagementPortalSettingsCorsGet": { - "$ref": "./examples/ApiManagementPortalSettingsCorsGet.json" - } - }, - "parameters": [ - { - "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings.", - "schema": { - "$ref": "./definitions.json#/definitions/PortalSettingsCorsContract" - }, - "headers": { - "ETag": { - "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", - "type": "string" - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "./apimanagement.json#/definitions/ErrorResponse" - } - } - } - }, - "patch": { - "tags": [ - "PortalSettingsCors" - ], - "operationId": "PortalSettingsCors_Update", - "description": "Update the Cross-Origin Resource Sharing (CORS) settings for the developer portal.", - "x-ms-examples": { - "ApiManagementPortalSettingsCorsPatch": { - "$ref": "./examples/ApiManagementPortalSettingsCorsPatch.json" - } - }, - "parameters": [ - { - "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "./definitions.json#/definitions/PortalSettingsCorsContract" - }, - "description": "Update the Cross-Origin Resource Sharing (CORS) settings for the developer portal." - }, - { - "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" - } - ], - "responses": { - "204": { - "description": "The settings were successfully updated." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "./apimanagement.json#/definitions/ErrorResponse" - } - } - } - }, - "put": { - "tags": [ - "PortalSettingsCors" - ], - "operationId": "PortalSettingsCors_CreateOrUpdate", - "description": "Create or update the Cross-Origin Resource Sharing (CORS) settings for the developer portal.", - "x-ms-examples": { - "ApiManagementPortalSettingsCorsPut": { - "$ref": "./examples/ApiManagementPortalSettingsCorsPut.json" - } - }, - "parameters": [ - { - "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "./definitions.json#/definitions/PortalSettingsCorsContract" - }, - "description": "Create or update parameters." - }, - { - "$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "The settings were successfully updated.", - "schema": { - "$ref": "./definitions.json#/definitions/PortalSettingsCorsContract" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "./apimanagement.json#/definitions/ErrorResponse" - } - } - } - } } }, "definitions": {} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimsettings.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimsettings.json index a8de8a0e33fc..69b9f59caba7 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimsettings.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimsettings.json @@ -36,6 +36,7 @@ "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings": { "get": { + "deprecated": true, "tags": [ "TenantSettings" ], @@ -89,6 +90,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings/{settingsType}": { "get": { + "deprecated": true, "tags": [ "TenantSettings" ], diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json index fb79d2a5b1b0..6de4846c04ae 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json @@ -3908,49 +3908,73 @@ }, "description": "Descriptions of APIM policies." }, - "PortalDelegationSettings": { + "PortalConfigProperties": { "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/PortalDelegationSettingsProperties", - "description": "Delegation settings contract properties." - } - }, - "allOf": [ - { - "$ref": "./../../../../../common-types/resource-management/v2/types.json#/definitions/Resource" - } - ], - "description": "Delegation settings for a developer portal." - }, - "PortalDelegationSettingsProperties": { - "properties": { - "url": { - "type": "string", - "description": "A delegation Url." + "type": "object", + "enableBasicAuth": { + "type": "boolean", + "description": "Enable or disable Basic authentication method." }, - "validationKey": { - "x-ms-secret": true, - "type": "string", - "description": "A base64-encoded validation key to validate, that a request is coming from Azure API Management." + "signin": { + "type": "object", + "properties": { + "require": { + "type": "boolean", + "description": "Redirect anonymous users to the sign-in page." + } + } }, - "subscriptions": { - "$ref": "#/definitions/SubscriptionsDelegationSettingsProperties", - "description": "Subscriptions delegation settings." + "signup": { + "type": "object", + "properties": { + "termsOfService": { + "type": "object", + "$ref": "#/definitions/TermsOfServiceProperties", + "description": "Terms of service contract properties." + } + } }, - "userRegistration": { - "$ref": "#/definitions/RegistrationDelegationSettingsProperties", - "description": "User registration delegation settings." + "delegation": { + "type": "object", + "properties": { + "delegateRegistration": { + "type": "boolean", + "description": "Enable or disable delegation for user registration." + }, + "delegateSubscription": { + "type": "boolean", + "description": "Enable or disable delegation for product subscriptions." + }, + "delegationUrl": { + "type": "string", + "description": "A delegation endpoint URL." + }, + "validationKey": { + "x-ms-secret": true, + "type": "string", + "description": "A base64-encoded validation key to validate, that a request is coming from Azure API Management." + } + } + }, + "cors": { + "type": "object", + "$ref": "#/definitions/PortalConfigCorsProperties", + "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings." + }, + "csp": { + "type": "object", + "$ref": "#/definitions/PortalConfigCspProperties", + "description": "The developer portal Content Security Policy (CSP) settings." } }, - "description": "Delegation settings contract properties." + "description": "The developer portal configuration contract properties." }, - "PortalSettingsCorsContract": { + "PortalConfig": { "properties": { "properties": { "x-ms-client-flatten": true, - "$ref": "#/definitions/PortalSettingsCorsPropertiesContract", - "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings contract properties." + "$ref": "#/definitions/PortalConfigProperties", + "description": "The developer portal configuration contract properties." } }, "allOf": [ @@ -3958,9 +3982,9 @@ "$ref": "./../../../../../common-types/resource-management/v2/types.json#/definitions/Resource" } ], - "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings." + "description": "The developer portal configuration contract." }, - "PortalSettingsCorsPropertiesContract": { + "PortalConfigCorsProperties": { "properties": { "allowedOrigins": { "type": "array", @@ -3970,25 +3994,11 @@ "description": "Allowed origins, e.g. `https://trusted.com`." } }, - "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings contract properties." - }, - "PortalSettingsCspContract": { - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/PortalSettingsCspPropertiesContract", - "description": "The developer portal Content Security Policy (CSP) settings contract properties." - } - }, - "allOf": [ - { - "$ref": "./../../../../../common-types/resource-management/v2/types.json#/definitions/Resource" - } - ], - "description": "The developer portal Content Security Policy (CSP) settings." + "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings." }, - "PortalSettingsCspPropertiesContract": { + "PortalConfigCspProperties": { "properties": { + "type": "object", "mode": { "type": "string", "description": "The mode of the developer portal Content Security Policy (CSP).", @@ -4028,7 +4038,46 @@ "description": "Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`." } }, - "description": "The developer portal Content Security Policy (CSP) settings contract properties." + "description": "The developer portal Content Security Policy (CSP) settings." + }, + "PortalDelegationSettings": { + "deprecated": true, + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PortalDelegationSettingsProperties", + "description": "Delegation settings contract properties." + } + }, + "allOf": [ + { + "$ref": "./../../../../../common-types/resource-management/v2/types.json#/definitions/Resource" + } + ], + "description": "Delegation settings for a developer portal." + }, + "PortalDelegationSettingsProperties": { + "deprecated": true, + "properties": { + "url": { + "type": "string", + "description": "A delegation Url." + }, + "validationKey": { + "x-ms-secret": true, + "type": "string", + "description": "A base64-encoded validation key to validate, that a request is coming from Azure API Management." + }, + "subscriptions": { + "$ref": "#/definitions/SubscriptionsDelegationSettingsProperties", + "description": "Subscriptions delegation settings." + }, + "userRegistration": { + "$ref": "#/definitions/RegistrationDelegationSettingsProperties", + "description": "User registration delegation settings." + } + }, + "description": "Delegation settings contract properties." }, "PortalSettingsCollection": { "properties": { @@ -7012,4 +7061,4 @@ } }, "parameters": {} -} +} \ No newline at end of file diff --git a/specification/apimanagement/resource-manager/readme.md b/specification/apimanagement/resource-manager/readme.md index 39a0f5f6c027..496f9979e7f8 100644 --- a/specification/apimanagement/resource-manager/readme.md +++ b/specification/apimanagement/resource-manager/readme.md @@ -72,6 +72,7 @@ input-file: - Microsoft.ApiManagement/preview/2021-12-01-preview/apimpolicydescriptions.json - Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalrevisions.json - Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json + - Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json - Microsoft.ApiManagement/preview/2021-12-01-preview/apimprivatelink.json - Microsoft.ApiManagement/preview/2021-12-01-preview/apimproducts.json - Microsoft.ApiManagement/preview/2021-12-01-preview/apimproductsByTags.json @@ -727,4 +728,7 @@ directive: - suppress: R4009 from: apimportalsettings.json reason: Warning raised to error while PR was being reviewed. SystemData will implement in next preview version. + - suppress: R4009 + from: apimportalconfig.json + reason: Warning raised to error while PR was being reviewed. SystemData will implement in next preview version. ``` From 2b0eb8c6cae368eaa2b4ee9cfda38ce94264140d Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Wed, 12 Jan 2022 14:43:22 -0800 Subject: [PATCH 10/37] Added list example. --- .../ApiManagementListPortalConfig.json | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json new file mode 100644 index 000000000000..9ece84908ccc --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2021-12-01-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "signin": { + "require": false + }, + "signup": { + "enableBasicAccount": true, + "termsOfService": { + "enabled": true, + "text": "I agree to the service terms and conditions.", + "requireConsent": false + } + }, + "delegation": { + "delegateRegistration": false, + "delegateSubscription": false, + "delegationUrl": null, + "validationKey": null + }, + "csp": { + "mode": "reportOnly", + "reportUri": "https://report.contoso.com", + "allowedSources": [ + "*.contoso.com" + ] + }, + "cors": { + "allowedOrigins": [ + "https://contoso.com" + ] + } + } + ] + } + } + } +} \ No newline at end of file From 7adbbd79aa52d7bcb752c50d36de8a87156ab8c3 Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Wed, 12 Jan 2022 14:55:58 -0800 Subject: [PATCH 11/37] Added missing collection contract. --- .../2021-12-01-preview/apimportalconfig.json | 8 ++-- .../2021-12-01-preview/definitions.json | 47 +++++++++++++------ 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json index 74a436a0dd96..a896e0cd84fa 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json @@ -155,7 +155,7 @@ "200": { "description": "The developer portal configuration.", "schema": { - "$ref": "./definitions.json#/definitions/PortalConfig" + "$ref": "./definitions.json#/definitions/PortalConfigContract" }, "headers": { "ETag": { @@ -198,7 +198,7 @@ "in": "body", "required": true, "schema": { - "$ref": "./definitions.json#/definitions/PortalConfig" + "$ref": "./definitions.json#/definitions/PortalConfigContract" }, "description": "Update the developer portal configuration." }, @@ -250,7 +250,7 @@ "in": "body", "required": true, "schema": { - "$ref": "./definitions.json#/definitions/PortalConfig" + "$ref": "./definitions.json#/definitions/PortalConfigContract" }, "description": "Create or update parameters." }, @@ -268,7 +268,7 @@ "200": { "description": "Operation completed successfully.", "schema": { - "$ref": "./definitions.json#/definitions/PortalConfig" + "$ref": "./definitions.json#/definitions/PortalConfigContract" } }, "default": { diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json index 0f98dd51c578..a484ed5fb10c 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json @@ -3908,6 +3908,38 @@ }, "description": "Descriptions of APIM policies." }, + "PortalConfigCollection": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/PortalConfigContract" + }, + "description": "The developer portal configurations." + }, + "count": { + "type": "integer", + "format": "int64", + "description": "Total record count number across all pages." + } + }, + "description": "The collection of the developer portal configurations." + }, + "PortalConfigContract": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PortalConfigProperties", + "description": "The developer portal configuration contract properties." + } + }, + "allOf": [ + { + "$ref": "./../../../../../common-types/resource-management/v2/types.json#/definitions/Resource" + } + ], + "description": "The developer portal configuration contract." + }, "PortalConfigProperties": { "properties": { "type": "object", @@ -3969,21 +4001,6 @@ }, "description": "The developer portal configuration contract properties." }, - "PortalConfig": { - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/PortalConfigProperties", - "description": "The developer portal configuration contract properties." - } - }, - "allOf": [ - { - "$ref": "./../../../../../common-types/resource-management/v2/types.json#/definitions/Resource" - } - ], - "description": "The developer portal configuration contract." - }, "PortalConfigCorsProperties": { "properties": { "allowedOrigins": { From 50cf2f925b9aade24ed88c4b02f0f0545456ccc2 Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Wed, 12 Jan 2022 16:23:22 -0800 Subject: [PATCH 12/37] Added missing example. Cleaned up old ones. --- ...son => ApiManagementHeadPortalConfig.json} | 0 .../examples/ApiManagementPortalConfig.json | 43 +++++++++++++++++++ .../ApiManagementPortalSettingsCorsGet.json | 22 ---------- .../ApiManagementPortalSettingsCorsPatch.json | 19 -------- .../ApiManagementPortalSettingsCorsPut.json | 30 ------------- .../ApiManagementPortalSettingsCspGet.json | 25 ----------- .../ApiManagementPortalSettingsCspHead.json | 15 ------- .../ApiManagementPortalSettingsCspPatch.json | 23 ---------- .../ApiManagementPortalSettingsCspPut.json | 37 ---------------- 9 files changed, 43 insertions(+), 171 deletions(-) rename specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/{ApiManagementPortalSettingsCorsHead.json => ApiManagementHeadPortalConfig.json} (100%) create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json delete mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsGet.json delete mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPatch.json delete mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPut.json delete mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspGet.json delete mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspHead.json delete mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPatch.json delete mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPut.json diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsHead.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementHeadPortalConfig.json similarity index 100% rename from specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsHead.json rename to specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementHeadPortalConfig.json diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json new file mode 100644 index 000000000000..7b6203830f78 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2021-12-01-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "signin": { + "require": false + }, + "signup": { + "enableBasicAccount": true, + "termsOfService": { + "enabled": true, + "text": "I agree to the service terms and conditions.", + "requireConsent": false + } + }, + "delegation": { + "delegateRegistration": false, + "delegateSubscription": false, + "delegationUrl": null, + "validationKey": null + }, + "csp": { + "mode": "reportOnly", + "reportUri": "https://report.contoso.com", + "allowedSources": [ + "*.contoso.com" + ] + }, + "cors": { + "allowedOrigins": [ + "https://contoso.com" + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsGet.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsGet.json deleted file mode 100644 index 86ff8f1b63da..000000000000 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsGet.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "parameters": { - "serviceName": "apimService1", - "resourceGroupName": "rg1", - "api-version": "2021-12-01-preview", - "subscriptionId": "subid" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/cors", - "type": "Microsoft.ApiManagement/service/portalsettings/cors", - "name": "cors", - "properties": { - "allowedOrigins": [ - "https://trusted.com" - ] - } - } - } - } -} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPatch.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPatch.json deleted file mode 100644 index b89871b3fa4d..000000000000 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPatch.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "parameters": { - "serviceName": "apimService1", - "resourceGroupName": "rg1", - "api-version": "2021-12-01-preview", - "subscriptionId": "subid", - "If-Match": "*", - "parameters": { - "properties": { - "allowedOrigins": [ - "https://trusted.com" - ] - } - } - }, - "responses": { - "204": {} - } -} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPut.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPut.json deleted file mode 100644 index 0ee942e8359e..000000000000 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCorsPut.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "parameters": { - "serviceName": "apimService1", - "resourceGroupName": "rg1", - "api-version": "2021-12-01-preview", - "subscriptionId": "subid", - "If-Match": "*", - "parameters": { - "properties": { - "allowedOrigins": [ - "https://trusted.com" - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/cors", - "type": "Microsoft.ApiManagement/service/portalsettings/cors", - "name": "cors", - "properties": { - "allowedOrigins": [ - "https://trusted.com" - ] - } - } - } - } -} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspGet.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspGet.json deleted file mode 100644 index 2bbfbc8f82a0..000000000000 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspGet.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "parameters": { - "serviceName": "apimService1", - "resourceGroupName": "rg1", - "api-version": "2021-12-01-preview", - "subscriptionId": "subid" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/csp", - "type": "Microsoft.ApiManagement/service/portalsettings/csp", - "name": "csp", - "properties": { - "mode": "reportOnly", - "reportUri": "https://report.com", - "allowedSources": [ - "*.trusted.com", - "trusted.com" - ] - } - } - } - } -} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspHead.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspHead.json deleted file mode 100644 index 14c1ada64a9a..000000000000 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspHead.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "parameters": { - "serviceName": "apimService1", - "resourceGroupName": "rg1", - "api-version": "2021-12-01-preview", - "subscriptionId": "subid" - }, - "responses": { - "200": { - "headers": { - "etag": "AAAAAAAAAAa=" - } - } - } -} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPatch.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPatch.json deleted file mode 100644 index 247d0654f674..000000000000 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPatch.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "parameters": { - "serviceName": "apimService1", - "resourceGroupName": "rg1", - "api-version": "2021-12-01-preview", - "subscriptionId": "subid", - "userId": "5931a75ae4bbd512288c680b", - "If-Match": "*", - "parameters": { - "properties": { - "mode": "reportOnly", - "reportUri": "https://report.com", - "allowedSources": [ - "*.trusted.com", - "trusted.com" - ] - } - } - }, - "responses": { - "204": {} - } -} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPut.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPut.json deleted file mode 100644 index 7252b8a56d34..000000000000 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalSettingsCspPut.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "parameters": { - "serviceName": "apimService1", - "resourceGroupName": "rg1", - "api-version": "2021-12-01-preview", - "subscriptionId": "subid", - "userId": "5931a75ae4bbd512288c680b", - "If-Match": "*", - "parameters": { - "properties": { - "mode": "reportOnly", - "reportUri": "https://report.com", - "allowedSources": [ - "*.trusted.com", - "trusted.com" - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/csp", - "type": "Microsoft.ApiManagement/service/portalsettings/csp", - "name": "csp", - "properties": { - "mode": "reportOnly", - "reportUri": "https://report.com", - "allowedSources": [ - "*.trusted.com", - "trusted.com" - ] - } - } - } - } -} From f5abb1d9d83c7180b2e654a800bb8566d1b880f8 Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Wed, 12 Jan 2022 16:30:25 -0800 Subject: [PATCH 13/37] Fixed references. --- .../preview/2021-12-01-preview/apimportalconfig.json | 6 +++--- .../preview/2021-12-01-preview/definitions.json | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json index a896e0cd84fa..44acf3e03062 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json @@ -179,8 +179,8 @@ "operationId": "PortalConfig_Update", "description": "Update the developer portal configuration.", "x-ms-examples": { - "ApiManagementPortalConfigUpdate": { - "$ref": "./examples/ApiManagementPortalConfigUpdate.json" + "ApiManagementPortalConfig": { + "$ref": "./examples/ApiManagementPortalConfig.json" } }, "parameters": [ @@ -231,7 +231,7 @@ "operationId": "PortalConfig_CreateOrUpdate", "description": "Create or update the developer portal configuration.", "x-ms-examples": { - "ApiManagementPortalConfigUpdate": { + "ApiManagementPortalConfig": { "$ref": "./examples/ApiManagementPortalConfig.json" } }, diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json index a484ed5fb10c..a151a2b1e387 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json @@ -4097,6 +4097,7 @@ "description": "Delegation settings contract properties." }, "PortalSettingsCollection": { + "deprecated": true, "properties": { "value": { "type": "array", @@ -4114,6 +4115,7 @@ "description": "Descriptions of APIM policies." }, "PortalSettingsContract": { + "deprecated": true, "properties": { "properties": { "x-ms-client-flatten": true, @@ -4129,6 +4131,7 @@ "description": "Portal Settings for the Developer Portal." }, "PortalSettingsContractProperties": { + "deprecated": true, "properties": { "url": { "type": "string", @@ -4160,6 +4163,7 @@ "description": "Sign-in settings contract properties." }, "PortalSigninSettingProperties": { + "deprecated": true, "properties": { "enabled": { "type": "boolean", @@ -4169,6 +4173,7 @@ "description": "Sign-in settings contract properties." }, "PortalSigninSettings": { + "deprecated": true, "properties": { "properties": { "x-ms-client-flatten": true, @@ -4184,6 +4189,7 @@ "description": "Sign-In settings for the Developer Portal." }, "PortalSignupSettings": { + "deprecated": true, "properties": { "properties": { "x-ms-client-flatten": true, @@ -4199,6 +4205,7 @@ "description": "Sign-Up settings for a developer portal." }, "PortalSignupSettingsProperties": { + "deprecated": true, "properties": { "enabled": { "type": "boolean", From 06861f60ae54c29cb1b39ced7ced16020a10e0ac Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Wed, 12 Jan 2022 16:44:18 -0800 Subject: [PATCH 14/37] Fixed examples --- .../ApiManagementListPortalConfig.json | 37 +++++++----- .../examples/ApiManagementPortalConfig.json | 59 ++++++++++--------- 2 files changed, 54 insertions(+), 42 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json index 9ece84908ccc..95f16f52298a 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json @@ -10,37 +10,44 @@ "body": { "value": [ { - "signin": { + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalconfigs/default", + "type": "Microsoft.ApiManagement/service/portalconfigs", + "name": "default", + "properties": { + "signin": { "require": false - }, - "signup": { + }, + "signup": { "enableBasicAccount": true, "termsOfService": { - "enabled": true, - "text": "I agree to the service terms and conditions.", - "requireConsent": false + "enabled": true, + "text": "I agree to the service terms and conditions.", + "requireConsent": false } - }, - "delegation": { + }, + "delegation": { "delegateRegistration": false, "delegateSubscription": false, "delegationUrl": null, "validationKey": null - }, - "csp": { + }, + "csp": { "mode": "reportOnly", "reportUri": "https://report.contoso.com", "allowedSources": [ - "*.contoso.com" + "*.contoso.com" ] - }, - "cors": { + }, + "cors": { "allowedOrigins": [ - "https://contoso.com" + "https://contoso.com" ] + } } } - ] + ], + "count": 1, + "nextLink": "" } } } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json index 7b6203830f78..f78b872578a3 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json @@ -8,34 +8,39 @@ "responses": { "200": { "body": { - "signin": { - "require": false - }, - "signup": { - "enableBasicAccount": true, - "termsOfService": { - "enabled": true, - "text": "I agree to the service terms and conditions.", - "requireConsent": false + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalconfigs/default", + "type": "Microsoft.ApiManagement/service/portalconfigs", + "name": "default", + "properties": { + "signin": { + "require": false + }, + "signup": { + "enableBasicAccount": true, + "termsOfService": { + "enabled": true, + "text": "I agree to the service terms and conditions.", + "requireConsent": false + } + }, + "delegation": { + "delegateRegistration": false, + "delegateSubscription": false, + "delegationUrl": null, + "validationKey": null + }, + "csp": { + "mode": "reportOnly", + "reportUri": "https://report.contoso.com", + "allowedSources": [ + "*.contoso.com" + ] + }, + "cors": { + "allowedOrigins": [ + "https://contoso.com" + ] } - }, - "delegation": { - "delegateRegistration": false, - "delegateSubscription": false, - "delegationUrl": null, - "validationKey": null - }, - "csp": { - "mode": "reportOnly", - "reportUri": "https://report.contoso.com", - "allowedSources": [ - "*.contoso.com" - ] - }, - "cors": { - "allowedOrigins": [ - "https://contoso.com" - ] } } } From 4a0d15b2e45ee3602bebfa24091db1bae453849d Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Wed, 12 Jan 2022 17:11:28 -0800 Subject: [PATCH 15/37] Fixed version. --- .../preview/2021-12-01-preview/apimportalconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json index 44acf3e03062..188cb15e1e17 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json @@ -3,7 +3,7 @@ "info": { "title": "ApiManagementClient", "description": "Use this REST API to perform operations on the developer portal configuration.", - "version": "2021-04-01-preview" + "version": "2021-12-01-preview" }, "host": "management.azure.com", "schemes": [ From f0534813db2b644ada668601b7f2aa928bb5b32f Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Wed, 12 Jan 2022 17:38:56 -0800 Subject: [PATCH 16/37] Added custom words. Fixed linting. --- custom-words.txt | 1 + .../{apimportalconfig.json => apimportalconfigs.json} | 0 .../2021-12-01-preview/examples/ApiManagementPortalConfig.json | 2 +- 3 files changed, 2 insertions(+), 1 deletion(-) rename specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/{apimportalconfig.json => apimportalconfigs.json} (100%) diff --git a/custom-words.txt b/custom-words.txt index 3d0ba7d587fa..ca793fe0b365 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -1475,6 +1475,7 @@ polyline poolusagemetrics popreceipt portalsettings +portalconfigs postbackup Postgre Postgres diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfigs.json similarity index 100% rename from specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json rename to specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfigs.json diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json index f78b872578a3..cbe265102646 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json @@ -45,4 +45,4 @@ } } } -} \ No newline at end of file +} From 6f2ece753d8216f51362b6f88f2b7304aa717a4c Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Wed, 12 Jan 2022 17:42:50 -0800 Subject: [PATCH 17/37] Fixes. --- specification/apimanagement/resource-manager/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/apimanagement/resource-manager/readme.md b/specification/apimanagement/resource-manager/readme.md index 496f9979e7f8..ffba0eeddfd1 100644 --- a/specification/apimanagement/resource-manager/readme.md +++ b/specification/apimanagement/resource-manager/readme.md @@ -72,7 +72,7 @@ input-file: - Microsoft.ApiManagement/preview/2021-12-01-preview/apimpolicydescriptions.json - Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalrevisions.json - Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalsettings.json - - Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfig.json + - Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfigs.json - Microsoft.ApiManagement/preview/2021-12-01-preview/apimprivatelink.json - Microsoft.ApiManagement/preview/2021-12-01-preview/apimproducts.json - Microsoft.ApiManagement/preview/2021-12-01-preview/apimproductsByTags.json @@ -729,6 +729,6 @@ directive: from: apimportalsettings.json reason: Warning raised to error while PR was being reviewed. SystemData will implement in next preview version. - suppress: R4009 - from: apimportalconfig.json + from: apimportalconfigs.json reason: Warning raised to error while PR was being reviewed. SystemData will implement in next preview version. ``` From 83e6f36573ea642088184b538024bb0adb4fef94 Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Wed, 12 Jan 2022 18:11:24 -0800 Subject: [PATCH 18/37] Fixes. --- .../2021-12-01-preview/apimdeployment.json | 1 + .../2021-12-01-preview/definitions.json | 2 +- .../ApiManagementListPortalConfig.json | 102 +++++++++--------- 3 files changed, 53 insertions(+), 52 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimdeployment.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimdeployment.json index 7432d9a8eb82..10de46dff35b 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimdeployment.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimdeployment.json @@ -1189,6 +1189,7 @@ "description": "Parameters supplied to the Backup/Restore of an API Management service operation." }, "ApiManagementServiceProperties": { + "type": "object", "properties": { "publisherEmail": { "type": "string", diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json index a151a2b1e387..f0e2ff4c275b 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json @@ -7085,4 +7085,4 @@ } }, "parameters": {} -} \ No newline at end of file +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json index 95f16f52298a..8c1814370704 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json @@ -1,54 +1,54 @@ { - "parameters": { - "serviceName": "apimService1", - "resourceGroupName": "rg1", - "api-version": "2021-12-01-preview", - "subscriptionId": "subid" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalconfigs/default", - "type": "Microsoft.ApiManagement/service/portalconfigs", - "name": "default", - "properties": { - "signin": { - "require": false - }, - "signup": { - "enableBasicAccount": true, - "termsOfService": { - "enabled": true, - "text": "I agree to the service terms and conditions.", - "requireConsent": false - } - }, - "delegation": { - "delegateRegistration": false, - "delegateSubscription": false, - "delegationUrl": null, - "validationKey": null - }, - "csp": { - "mode": "reportOnly", - "reportUri": "https://report.contoso.com", - "allowedSources": [ - "*.contoso.com" - ] - }, - "cors": { - "allowedOrigins": [ - "https://contoso.com" - ] - } - } - } - ], - "count": 1, - "nextLink": "" + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2021-12-01-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalconfigs/default", + "type": "Microsoft.ApiManagement/service/portalconfigs", + "name": "default", + "properties": { + "signin": { + "require": false + }, + "signup": { + "enableBasicAccount": true, + "termsOfService": { + "enabled": true, + "text": "I agree to the service terms and conditions.", + "requireConsent": false + } + }, + "delegation": { + "delegateRegistration": false, + "delegateSubscription": false, + "delegationUrl": null, + "validationKey": null + }, + "csp": { + "mode": "reportOnly", + "reportUri": "https://report.contoso.com", + "allowedSources": [ + "*.contoso.com" + ] + }, + "cors": { + "allowedOrigins": [ + "https://contoso.com" + ] + } } - } + } + ], + "count": 1, + "nextLink": "" + } } -} \ No newline at end of file + } +} From 103df6519ac2c5280dbbe5923827d48fec6f743d Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Thu, 13 Jan 2022 17:22:51 -0800 Subject: [PATCH 19/37] Fixes. --- .../preview/2021-12-01-preview/definitions.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json index f0e2ff4c275b..a9eb23281fe8 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json @@ -4058,7 +4058,6 @@ "description": "The developer portal Content Security Policy (CSP) settings." }, "PortalDelegationSettings": { - "deprecated": true, "properties": { "properties": { "x-ms-client-flatten": true, @@ -4074,7 +4073,6 @@ "description": "Delegation settings for a developer portal." }, "PortalDelegationSettingsProperties": { - "deprecated": true, "properties": { "url": { "type": "string", @@ -4097,7 +4095,6 @@ "description": "Delegation settings contract properties." }, "PortalSettingsCollection": { - "deprecated": true, "properties": { "value": { "type": "array", @@ -4115,7 +4112,6 @@ "description": "Descriptions of APIM policies." }, "PortalSettingsContract": { - "deprecated": true, "properties": { "properties": { "x-ms-client-flatten": true, @@ -4131,7 +4127,6 @@ "description": "Portal Settings for the Developer Portal." }, "PortalSettingsContractProperties": { - "deprecated": true, "properties": { "url": { "type": "string", @@ -4163,7 +4158,6 @@ "description": "Sign-in settings contract properties." }, "PortalSigninSettingProperties": { - "deprecated": true, "properties": { "enabled": { "type": "boolean", @@ -4173,7 +4167,6 @@ "description": "Sign-in settings contract properties." }, "PortalSigninSettings": { - "deprecated": true, "properties": { "properties": { "x-ms-client-flatten": true, @@ -4189,7 +4182,6 @@ "description": "Sign-In settings for the Developer Portal." }, "PortalSignupSettings": { - "deprecated": true, "properties": { "properties": { "x-ms-client-flatten": true, @@ -4205,7 +4197,6 @@ "description": "Sign-Up settings for a developer portal." }, "PortalSignupSettingsProperties": { - "deprecated": true, "properties": { "enabled": { "type": "boolean", From ca3772eb7c8918eb014049a00f477c15c7972af9 Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Thu, 13 Jan 2022 17:39:35 -0800 Subject: [PATCH 20/37] Fixes. --- .../preview/2021-12-01-preview/apimdeployment.json | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimdeployment.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimdeployment.json index 10de46dff35b..7432d9a8eb82 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimdeployment.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimdeployment.json @@ -1189,7 +1189,6 @@ "description": "Parameters supplied to the Backup/Restore of an API Management service operation." }, "ApiManagementServiceProperties": { - "type": "object", "properties": { "publisherEmail": { "type": "string", From 88784dc786842628388d778d3ee9a12c55db29b1 Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Thu, 13 Jan 2022 17:46:52 -0800 Subject: [PATCH 21/37] Fixes. --- .../preview/2021-12-01-preview/definitions.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json index a9eb23281fe8..c7628950848c 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json @@ -3941,8 +3941,8 @@ "description": "The developer portal configuration contract." }, "PortalConfigProperties": { + "type": "object", "properties": { - "type": "object", "enableBasicAuth": { "type": "boolean", "description": "Enable or disable Basic authentication method." @@ -4002,6 +4002,7 @@ "description": "The developer portal configuration contract properties." }, "PortalConfigCorsProperties": { + "type": "object", "properties": { "allowedOrigins": { "type": "array", @@ -4014,8 +4015,8 @@ "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings." }, "PortalConfigCspProperties": { + "type": "object", "properties": { - "type": "object", "mode": { "type": "string", "description": "The mode of the developer portal Content Security Policy (CSP).", From 4b26f15fbeacb57e158ec9d3f0422d6b50be6eb8 Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Fri, 14 Jan 2022 15:26:34 -0800 Subject: [PATCH 22/37] Fixes. --- .../preview/2021-12-01-preview/definitions.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json index c7628950848c..ea09c395e823 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json @@ -3921,7 +3921,13 @@ "type": "integer", "format": "int64", "description": "Total record count number across all pages." + }, + "nextLink": { + "type": "string", + "description": "Next page link if any.", + "readOnly": true } + }, "description": "The collection of the developer portal configurations." }, From 9308b87feaeb407fe242554c471e184e603011c5 Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Fri, 14 Jan 2022 15:48:54 -0800 Subject: [PATCH 23/37] Fixes. --- .../2021-12-01-preview/definitions.json | 58 ++++++++++++------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json index ea09c395e823..929b4ea05413 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json @@ -3967,32 +3967,14 @@ "properties": { "termsOfService": { "type": "object", - "$ref": "#/definitions/TermsOfServiceProperties", + "$ref": "#/definitions/PortalConfigTermsOfServiceProperties", "description": "Terms of service contract properties." } } }, "delegation": { "type": "object", - "properties": { - "delegateRegistration": { - "type": "boolean", - "description": "Enable or disable delegation for user registration." - }, - "delegateSubscription": { - "type": "boolean", - "description": "Enable or disable delegation for product subscriptions." - }, - "delegationUrl": { - "type": "string", - "description": "A delegation endpoint URL." - }, - "validationKey": { - "x-ms-secret": true, - "type": "string", - "description": "A base64-encoded validation key to validate, that a request is coming from Azure API Management." - } - } + "$ref": "#/definitions/PortalConfigDelegationProperties" }, "cors": { "type": "object", @@ -4007,6 +3989,42 @@ }, "description": "The developer portal configuration contract properties." }, + "PortalConfigDelegationProperties":{ + "type": "object", + "properties": { + "delegateRegistration": { + "type": "boolean", + "description": "Enable or disable delegation for user registration." + }, + "delegateSubscription": { + "type": "boolean", + "description": "Enable or disable delegation for product subscriptions." + }, + "delegationUrl": { + "type": "string", + "description": "A delegation endpoint URL." + }, + "validationKey": { + "x-ms-secret": true, + "type": "string", + "description": "A base64-encoded validation key to validate, that a request is coming from Azure API Management." + } + } + }, + "PortalConfigTermsOfServiceProperties": { + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "A terms of service text." + }, + "requireConsent": { + "type": "boolean", + "description": "Ask user for consent to the terms of service." + } + }, + "description": "Terms of service contract properties." + }, "PortalConfigCorsProperties": { "type": "object", "properties": { From e37529072ada65e4e785194688b23f2db22e9c36 Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Fri, 14 Jan 2022 17:16:20 -0800 Subject: [PATCH 24/37] Fixes. --- .../examples/ApiManagementHeadPortalConfig.json | 3 ++- .../examples/ApiManagementListPortalConfig.json | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementHeadPortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementHeadPortalConfig.json index 14c1ada64a9a..45b5a04bf2ab 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementHeadPortalConfig.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementHeadPortalConfig.json @@ -3,7 +3,8 @@ "serviceName": "apimService1", "resourceGroupName": "rg1", "api-version": "2021-12-01-preview", - "subscriptionId": "subid" + "subscriptionId": "subid", + "portalConfigId": "default" }, "responses": { "200": { diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json index 8c1814370704..9c2a4817c04b 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json @@ -18,9 +18,8 @@ "require": false }, "signup": { - "enableBasicAccount": true, + "enableBasicAuth": true, "termsOfService": { - "enabled": true, "text": "I agree to the service terms and conditions.", "requireConsent": false } From a6e5898104361bc15de08b0924bbeefe18ed20d1 Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Fri, 14 Jan 2022 17:36:03 -0800 Subject: [PATCH 25/37] Fixes. --- .../2021-12-01-preview/apimportalconfigs.json | 50 +++++++++---------- .../ApiManagementListPortalConfig.json | 2 +- .../examples/ApiManagementPortalConfig.json | 3 +- 3 files changed, 27 insertions(+), 28 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfigs.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfigs.json index 188cb15e1e17..3afb30775d80 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfigs.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfigs.json @@ -89,6 +89,9 @@ } }, "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + }, { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, @@ -100,9 +103,6 @@ }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -135,6 +135,9 @@ } }, "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + }, { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, @@ -146,9 +149,6 @@ }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -184,6 +184,9 @@ } }, "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + }, { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, @@ -193,6 +196,12 @@ { "$ref": "./apimanagement.json#/parameters/PortalConfigIdParameter" }, + { + "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, { "name": "parameters", "in": "body", @@ -201,15 +210,6 @@ "$ref": "./definitions.json#/definitions/PortalConfigContract" }, "description": "Update the developer portal configuration." - }, - { - "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -236,6 +236,9 @@ } }, "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + }, { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, @@ -245,6 +248,12 @@ { "$ref": "./apimanagement.json#/parameters/PortalConfigIdParameter" }, + { + "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, { "name": "parameters", "in": "body", @@ -252,16 +261,7 @@ "schema": { "$ref": "./definitions.json#/definitions/PortalConfigContract" }, - "description": "Create or update parameters." - }, - { - "$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + "description": "Update the developer portal configuration." } ], "responses": { diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json index 9c2a4817c04b..b6c83587accf 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json @@ -14,11 +14,11 @@ "type": "Microsoft.ApiManagement/service/portalconfigs", "name": "default", "properties": { + "enableBasicAuth": true, "signin": { "require": false }, "signup": { - "enableBasicAuth": true, "termsOfService": { "text": "I agree to the service terms and conditions.", "requireConsent": false diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json index cbe265102646..d3bb7a3dc8f1 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json @@ -12,13 +12,12 @@ "type": "Microsoft.ApiManagement/service/portalconfigs", "name": "default", "properties": { + "enableBasicAuth": true, "signin": { "require": false }, "signup": { - "enableBasicAccount": true, "termsOfService": { - "enabled": true, "text": "I agree to the service terms and conditions.", "requireConsent": false } From 8d79686fc495d2b818f9b18edabd0b41c3447500 Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Fri, 14 Jan 2022 17:47:04 -0800 Subject: [PATCH 26/37] Fixes. --- .../preview/2021-12-01-preview/definitions.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json index 929b4ea05413..0bd83de4ddb2 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json @@ -3927,7 +3927,6 @@ "description": "Next page link if any.", "readOnly": true } - }, "description": "The collection of the developer portal configurations." }, @@ -3989,7 +3988,7 @@ }, "description": "The developer portal configuration contract properties." }, - "PortalConfigDelegationProperties":{ + "PortalConfigDelegationProperties": { "type": "object", "properties": { "delegateRegistration": { From d9a4c83a55cbab4eb3250a4fffe0c535fdf02ea5 Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Fri, 14 Jan 2022 17:59:47 -0800 Subject: [PATCH 27/37] Fixes --- .../examples/ApiManagementListPortalConfig.json | 3 ++- .../2021-12-01-preview/examples/ApiManagementPortalConfig.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json index b6c83587accf..8b714c9e32e4 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json @@ -48,6 +48,7 @@ "count": 1, "nextLink": "" } - } + }, + "204": {} } } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json index d3bb7a3dc8f1..4fcefe273848 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementPortalConfig.json @@ -3,7 +3,8 @@ "serviceName": "apimService1", "resourceGroupName": "rg1", "api-version": "2021-12-01-preview", - "subscriptionId": "subid" + "subscriptionId": "subid", + "portalConfigId": "default" }, "responses": { "200": { From 4559542c28e1e6f8116c29e7f9d14f87d123dd8e Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Fri, 14 Jan 2022 18:15:58 -0800 Subject: [PATCH 28/37] Fixes. --- .../preview/2021-12-01-preview/definitions.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json index 0bd83de4ddb2..5fc0b7bc0ea8 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json @@ -3973,7 +3973,8 @@ }, "delegation": { "type": "object", - "$ref": "#/definitions/PortalConfigDelegationProperties" + "$ref": "#/definitions/PortalConfigDelegationProperties", + "description": "The developer portal delegation settings." }, "cors": { "type": "object", From d4f3bc01429a1a39d93200f1fd3db8ed29b83b6a Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Tue, 18 Jan 2022 13:10:46 -0800 Subject: [PATCH 29/37] Fixes. --- .../preview/2021-12-01-preview/definitions.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json index 5fc0b7bc0ea8..c5fe2fa817d0 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json @@ -3967,7 +3967,7 @@ "termsOfService": { "type": "object", "$ref": "#/definitions/PortalConfigTermsOfServiceProperties", - "description": "Terms of service contract properties." + "description": "Terms of service settings." } } }, @@ -4007,7 +4007,7 @@ "validationKey": { "x-ms-secret": true, "type": "string", - "description": "A base64-encoded validation key to validate, that a request is coming from Azure API Management." + "description": "A base64-encoded validation key to ensure requests originate from Azure API Management." } } }, From 54ee82010746b2fcdb850e88c5807eaf62650264 Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Tue, 18 Jan 2022 13:59:56 -0800 Subject: [PATCH 30/37] Fixes --- .../2021-12-01-preview/apimportalconfigs.json | 15 +++--- .../2021-12-01-preview/definitions.json | 2 +- .../ApiManagementListPortalConfig.json | 3 +- .../ApiManagementUpdatePortalConfig.json | 49 +++++++++++++++++++ 4 files changed, 60 insertions(+), 9 deletions(-) create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementUpdatePortalConfig.json diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfigs.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfigs.json index 3afb30775d80..1a0d9ed566de 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfigs.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimportalconfigs.json @@ -179,8 +179,8 @@ "operationId": "PortalConfig_Update", "description": "Update the developer portal configuration.", "x-ms-examples": { - "ApiManagementPortalConfig": { - "$ref": "./examples/ApiManagementPortalConfig.json" + "ApiManagementUpdatePortalConfig": { + "$ref": "./examples/ApiManagementUpdatePortalConfig.json" } }, "parameters": [ @@ -213,8 +213,11 @@ } ], "responses": { - "204": { - "description": "Operation completed successfully." + "200": { + "description": "Operation completed successfully.", + "schema": { + "$ref": "./definitions.json#/definitions/PortalConfigContract" + } }, "default": { "description": "Error response describing why the operation failed.", @@ -231,8 +234,8 @@ "operationId": "PortalConfig_CreateOrUpdate", "description": "Create or update the developer portal configuration.", "x-ms-examples": { - "ApiManagementPortalConfig": { - "$ref": "./examples/ApiManagementPortalConfig.json" + "ApiManagementUpdatePortalConfig": { + "$ref": "./examples/ApiManagementUpdatePortalConfig.json" } }, "parameters": [ diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json index c5fe2fa817d0..64ea7a2aabe9 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json @@ -4007,7 +4007,7 @@ "validationKey": { "x-ms-secret": true, "type": "string", - "description": "A base64-encoded validation key to ensure requests originate from Azure API Management." + "description": "A base64-encoded validation key to ensure requests originate from Azure API Management service." } } }, diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json index 8b714c9e32e4..b6c83587accf 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json @@ -48,7 +48,6 @@ "count": 1, "nextLink": "" } - }, - "204": {} + } } } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementUpdatePortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementUpdatePortalConfig.json new file mode 100644 index 000000000000..456eb7b83918 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementUpdatePortalConfig.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2021-12-01-preview", + "subscriptionId": "subid", + "portalConfigId": "default", + "If-Match": "*" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalconfigs/default", + "type": "Microsoft.ApiManagement/service/portalconfigs", + "name": "default", + "properties": { + "enableBasicAuth": true, + "signin": { + "require": false + }, + "signup": { + "termsOfService": { + "text": "I agree to the service terms and conditions.", + "requireConsent": false + } + }, + "delegation": { + "delegateRegistration": false, + "delegateSubscription": false, + "delegationUrl": null, + "validationKey": null + }, + "csp": { + "mode": "reportOnly", + "reportUri": "https://report.contoso.com", + "allowedSources": [ + "*.contoso.com" + ] + }, + "cors": { + "allowedOrigins": [ + "https://contoso.com" + ] + } + } + } + } + } +} From 750a5bb26427a73d9d438c0c0d3395c84118da0b Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Tue, 18 Jan 2022 14:09:18 -0800 Subject: [PATCH 31/37] Fixes --- .../ApiManagementUpdatePortalConfig.json | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementUpdatePortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementUpdatePortalConfig.json index 456eb7b83918..fd3f4d0c7c6e 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementUpdatePortalConfig.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementUpdatePortalConfig.json @@ -5,7 +5,39 @@ "api-version": "2021-12-01-preview", "subscriptionId": "subid", "portalConfigId": "default", - "If-Match": "*" + "If-Match": "*", + "parameters": { + "properties": { + "enableBasicAuth": true, + "signin": { + "require": false + }, + "signup": { + "termsOfService": { + "text": "I agree to the service terms and conditions.", + "requireConsent": false + } + }, + "delegation": { + "delegateRegistration": false, + "delegateSubscription": false, + "delegationUrl": null, + "validationKey": null + }, + "csp": { + "mode": "reportOnly", + "reportUri": "https://report.contoso.com", + "allowedSources": [ + "*.contoso.com" + ] + }, + "cors": { + "allowedOrigins": [ + "https://contoso.com" + ] + } + } + } }, "responses": { "200": { From b05e209c39b3c486250701343a5ef7491649dfd9 Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Tue, 18 Jan 2022 14:46:49 -0800 Subject: [PATCH 32/37] Removed conflicting constraint. --- .../preview/2021-12-01-preview/apimanagement.json | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json index dfa998dc1f8d..584263e68fbe 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json @@ -615,7 +615,6 @@ "description": "Schema identifier within an API. Must be unique in the current API Management service instance.", "minLength": 1, "maxLength": 80, - "pattern": "^[^*#&+:<>?]+$", "x-ms-parameter-location": "method" }, "ServiceNameParameter": { From 10612ffaa622a07d744fdb7e34e6ebe4b9853f1f Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Wed, 19 Jan 2022 13:39:22 -0800 Subject: [PATCH 33/37] Updated readme.go.md. --- .../apimanagement/resource-manager/readme.go.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/specification/apimanagement/resource-manager/readme.go.md b/specification/apimanagement/resource-manager/readme.go.md index a1b8b3c0b661..1b9d4de0d97e 100644 --- a/specification/apimanagement/resource-manager/readme.go.md +++ b/specification/apimanagement/resource-manager/readme.go.md @@ -11,7 +11,7 @@ go: ``` yaml $(go) && $(track2) license-header: MICROSOFT_MIT_NO_VERSION -module-name: sdk/apimanagement/armapimanagement +module-name: sdk/resourcemanager/apimanagement/armapimanagement module: github.com/Azure/azure-sdk-for-go/$(module-name) output-folder: $(go-sdk-folder)/$(module-name) azure-arm: true @@ -21,6 +21,7 @@ azure-arm: true ``` yaml $(go) && $(multiapi) batch: + - tag: package-2021-08 - tag: package-preview-2021-01 - tag: package-2020-12 - tag: package-2019-12 @@ -33,6 +34,15 @@ batch: - tag: package-2016-07 ``` +### Tag: package-2021-08 and go + +These settings apply only when `--tag=package-2021-08 --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'package-2021-08' && $(go) +output-folder: $(go-sdk-folder)/services/$(namespace)/mgmt/2021-08-01/$(namespace) +``` + ### Tag: package-preview-2021-01 and go These settings apply only when `--tag=package-preview-2021-01 --go` is specified on the command line. From 72d070f6ccc8231e4d4c9f22ac3a9c3090a545aa Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Thu, 20 Jan 2022 17:40:44 -0800 Subject: [PATCH 34/37] Reverted removing the restriction. --- .../preview/2021-12-01-preview/apimanagement.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json index 584263e68fbe..dfa998dc1f8d 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json @@ -615,6 +615,7 @@ "description": "Schema identifier within an API. Must be unique in the current API Management service instance.", "minLength": 1, "maxLength": 80, + "pattern": "^[^*#&+:<>?]+$", "x-ms-parameter-location": "method" }, "ServiceNameParameter": { From 822571da4aa20c22d35caee65ac6d3946579fcbd Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Thu, 20 Jan 2022 17:46:15 -0800 Subject: [PATCH 35/37] Revert "Reverted removing the restriction." This reverts commit 72d070f6ccc8231e4d4c9f22ac3a9c3090a545aa. --- .../preview/2021-12-01-preview/apimanagement.json | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json index dfa998dc1f8d..584263e68fbe 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json @@ -615,7 +615,6 @@ "description": "Schema identifier within an API. Must be unique in the current API Management service instance.", "minLength": 1, "maxLength": 80, - "pattern": "^[^*#&+:<>?]+$", "x-ms-parameter-location": "method" }, "ServiceNameParameter": { From 7d5042ee8ee90f73b87a1495e38fd101fe8923bb Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Wed, 26 Jan 2022 16:29:53 -0800 Subject: [PATCH 36/37] Removed duplicate. --- .../preview/2021-12-01-preview/apimanagement.json | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json index 46d9a5269279..33a6f49bcf98 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/apimanagement.json @@ -645,16 +645,6 @@ "description": "The name of the resource group.", "x-ms-parameter-location": "method" }, - "SchemaIdParameter": { - "name": "schemaId", - "in": "path", - "required": true, - "type": "string", - "description": "Schema identifier within an API. Must be unique in the current API Management service instance.", - "minLength": 1, - "maxLength": 80, - "x-ms-parameter-location": "method" - }, "ServiceNameParameter": { "name": "serviceName", "in": "path", From f06f8afa201bb6e9891d8d0531cce48647a6aa35 Mon Sep 17 00:00:00 2001 From: Alexander Zaslonov Date: Mon, 31 Jan 2022 14:04:50 -0800 Subject: [PATCH 37/37] Addressing PR comments. --- .../2021-12-01-preview/definitions.json | 21 ++++++++++--------- .../ApiManagementListPortalConfig.json | 1 - 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json index 2d05fb74d74d..1e9dc4d54474 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/definitions.json @@ -4019,11 +4019,6 @@ }, "description": "The developer portal configurations." }, - "count": { - "type": "integer", - "format": "int64", - "description": "Total record count number across all pages." - }, "nextLink": { "type": "string", "description": "Next page link if any.", @@ -4052,14 +4047,16 @@ "properties": { "enableBasicAuth": { "type": "boolean", - "description": "Enable or disable Basic authentication method." + "description": "Enable or disable Basic authentication method.", + "default": true }, "signin": { "type": "object", "properties": { "require": { "type": "boolean", - "description": "Redirect anonymous users to the sign-in page." + "description": "Redirect anonymous users to the sign-in page.", + "default": false } } }, @@ -4096,11 +4093,13 @@ "properties": { "delegateRegistration": { "type": "boolean", - "description": "Enable or disable delegation for user registration." + "description": "Enable or disable delegation for user registration.", + "default": false }, "delegateSubscription": { "type": "boolean", - "description": "Enable or disable delegation for product subscriptions." + "description": "Enable or disable delegation for product subscriptions.", + "default": false }, "delegationUrl": { "type": "string", @@ -4122,7 +4121,8 @@ }, "requireConsent": { "type": "boolean", - "description": "Ask user for consent to the terms of service." + "description": "Ask user for consent to the terms of service.", + "default": false } }, "description": "Terms of service contract properties." @@ -4151,6 +4151,7 @@ "disabled", "reportOnly" ], + "default": "disabled", "x-ms-enum": { "modelAsString": true, "name": "PortalSettingsCspMode", diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json index b6c83587accf..4de1e054f853 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-12-01-preview/examples/ApiManagementListPortalConfig.json @@ -45,7 +45,6 @@ } } ], - "count": 1, "nextLink": "" } }