From cb64c73468bee59e39e12d3df779d2971b4513c7 Mon Sep 17 00:00:00 2001 From: Zhenyu Zhou Date: Thu, 9 Apr 2020 10:11:15 +0800 Subject: [PATCH 1/2] The APIs in WorkspaceAcl.json have been replaced with the APIs in role.json and roleAssignment.json. --- .../WorkspaceAcl_GetAccessControlInfo.json | 26 -- ...rkspaceAcl_SetWorkspaceAdministrators.json | 30 --- .../2019-11-01-preview/workspaceAcl.json | 247 ------------------ specification/synapse/data-plane/readme.md | 2 - 4 files changed, 305 deletions(-) delete mode 100644 specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/WorkspaceAcl_GetAccessControlInfo.json delete mode 100644 specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/WorkspaceAcl_SetWorkspaceAdministrators.json delete mode 100644 specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/workspaceAcl.json diff --git a/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/WorkspaceAcl_GetAccessControlInfo.json b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/WorkspaceAcl_GetAccessControlInfo.json deleted file mode 100644 index b4eaf8e4be0a..000000000000 --- a/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/WorkspaceAcl_GetAccessControlInfo.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "parameters": { - "workspaceName": "myWorkspace", - "SynapseDnsSuffix": "dev.azuresynapse.net", - "api-version": "2019-11-01-preview", - "resource": { - "artifactType": "Workspace", - "artifactName": "theWorkspaceName" - } - }, - "responses": { - "200": { - "body": { - "administrators": [ - "00000000-0000-0000-0000-000000000000" - ], - "etag": "theEtagValue", - "accessControlList": { - "00000000-0000-0000-0000-000000000000": [ - "readcatalog" - ] - } - } - } - } -} diff --git a/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/WorkspaceAcl_SetWorkspaceAdministrators.json b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/WorkspaceAcl_SetWorkspaceAdministrators.json deleted file mode 100644 index 3e1b79235c8f..000000000000 --- a/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/WorkspaceAcl_SetWorkspaceAdministrators.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "parameters": { - "workspaceName": "myWorkspace", - "SynapseDnsSuffix": "dev.azuresynapse.net", - "api-version": "2019-11-01-preview", - "request": { - "administrators": [ - "00000000-0000-0000-0000-000000000000", - "00000000-1111-0000-2222-000000000000" - ] - } - }, - "responses": { - "200": { - "body": { - "administrators": [ - "00000000-0000-0000-0000-000000000000" - ], - "etag": "theEtagValue", - "accessControlList": { - "00000000-0000-0000-0000-000000000000": [ - "readcatalog", - "createtrigger", - "readmetadata" - ] - } - } - } - } -} diff --git a/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/workspaceAcl.json b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/workspaceAcl.json deleted file mode 100644 index e5483995189c..000000000000 --- a/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/workspaceAcl.json +++ /dev/null @@ -1,247 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2019-11-01-preview", - "title": "SynapseClient" - }, - "x-ms-parameterized-host": { - "hostTemplate": "{workspaceName}.{SynapseDnsSuffix}", - "parameters": [ - { - "name": "workspaceName", - "description": "The name of the workspace to execute operations on.", - "required": true, - "type": "string", - "in": "path", - "x-ms-skip-url-encoding": true - }, - { - "$ref": "#/parameters/SynapseDnsSuffixInPath" - } - ] - }, - "schemes": [ - "https" - ], - "paths": { - "/getAccessControl": { - "post": { - "tags": [ - "WorkspaceAcl" - ], - "operationId": "WorkspaceAcl_GetAccessControlInfo", - "description": "Get access control info.", - "x-ms-examples": { - "Get access control information": { - "$ref": "./examples/WorkspaceAcl_GetAccessControlInfo.json" - } - }, - "consumes": [ - "application/json", - "text/json" - ], - "produces": [ - "application/json", - "text/json" - ], - "parameters": [ - { - "name": "resource", - "in": "body", - "required": true, - "description": "The resource to get the access control info for.", - "schema": { - "$ref": "#/definitions/GetAccessControlInfoRequest" - } - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Success response.", - "schema": { - "$ref": "#/definitions/WorkspaceAccessControlResponse" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/setWorkspaceAdmins": { - "post": { - "tags": [ - "WorkspaceAcl" - ], - "operationId": "WorkspaceAcl_SetWorkspaceAdministrators", - "description": "Replace Admins of the Workspace.", - "x-ms-examples": { - "Set workspace admins": { - "$ref": "./examples/WorkspaceAcl_SetWorkspaceAdministrators.json" - } - }, - "consumes": [ - "application/json", - "text/json" - ], - "produces": [ - "application/json", - "text/json" - ], - "parameters": [ - { - "name": "request", - "in": "body", - "required": true, - "description": "Details of administrators object-ids.", - "schema": { - "$ref": "#/definitions/SetWorkspaceAdministratorsRequest" - } - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Admin list set succeeded.", - "schema": { - "$ref": "#/definitions/WorkspaceAccessControlResponse" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - } - }, - "definitions": { - "GetAccessControlInfoRequest": { - "type": "object", - "properties": { - "artifactType": { - "enum": [ - "Workspace" - ], - "x-ms-enum": { - "name": "artifactType", - "modelAsString": true - }, - "type": "string" - }, - "artifactName": { - "type": "string" - } - } - }, - "WorkspaceAccessControlResponse": { - "type": "object", - "properties": { - "administrators": { - "type": "array", - "items": { - "format": "uuid", - "type": "string", - "example": "00000000-0000-0000-0000-000000000000" - } - }, - "etag": { - "type": "string" - }, - "accessControlList": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - }, - "ErrorResponse": { - "required": [ - "code", - "message" - ], - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "target": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorDetail" - } - } - } - }, - "ErrorDetail": { - "required": [ - "code", - "message" - ], - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "target": { - "type": "string" - } - } - }, - "SetWorkspaceAdministratorsRequest": { - "type": "object", - "properties": { - "administrators": { - "type": "array", - "items": { - "format": "uuid", - "type": "string", - "example": "00000000-0000-0000-0000-000000000000" - } - } - } - } - }, - "parameters": { - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The Synapse client API Version." - }, - "SynapseDnsSuffixInPath": { - "name": "SynapseDnsSuffix", - "in": "path", - "required": true, - "type": "string", - "default": "dev.azuresynapse.net", - "x-ms-skip-url-encoding": true, - "description": "Gets the DNS suffix used as the base for all Synapse service requests.", - "x-ms-parameter-location": "client" - } - } -} diff --git a/specification/synapse/data-plane/readme.md b/specification/synapse/data-plane/readme.md index 63886203e58d..f2f3be08766f 100644 --- a/specification/synapse/data-plane/readme.md +++ b/specification/synapse/data-plane/readme.md @@ -61,7 +61,6 @@ These settings apply only when `--tag=package-2019-11-01-preview` is specified o input-file: - Microsoft.Synapse/preview/2019-11-01-preview/monitoring.json - Microsoft.Synapse/preview/2019-11-01-preview/sparkFrontend.json -- Microsoft.Synapse/preview/2019-11-01-preview/workspaceAcl.json - Microsoft.Synapse/preview/2019-11-01-preview/roles.json - Microsoft.Synapse/preview/2019-11-01-preview/roleAssignments.json - Microsoft.Synapse/preview/2019-11-01-preview/adf/datafactory.json @@ -106,7 +105,6 @@ require: $(this-folder)/../../../profiles/readme.md input-file: - $(this-folder)/Microsoft.Synapse/preview/2019-11-01-preview/monitoring.json - $(this-folder)/Microsoft.Synapse/preview/2019-11-01-preview/sparkFrontend.json - - $(this-folder)/Microsoft.Synapse/preview/2019-11-01-preview/workspaceAcl.json - $(this-folder)/Microsoft.Synapse/preview/2019-11-01-preview/roles.json - $(this-folder)/Microsoft.Synapse/preview/2019-11-01-preview/roleAssignments.json - $(this-folder)/Microsoft.Synapse/preview/2019-11-01-preview/adf/datafactory.json From 9a4ac1cdddb5c6f5b578b3505c2d645f22a449dc Mon Sep 17 00:00:00 2001 From: Zhenyu Zhou Date: Thu, 9 Apr 2020 12:59:38 +0800 Subject: [PATCH 2/2] Change roleAssignment to remove the dependency of workspaceAcl.json --- .../2019-11-01-preview/roleAssignments.json | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/roleAssignments.json b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/roleAssignments.json index d39a8e501db0..922d6074a432 100644 --- a/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/roleAssignments.json +++ b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/roleAssignments.json @@ -245,7 +245,49 @@ "properties": { "error": { "description": "The error details.", - "$ref": "./workspaceAcl.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "ErrorResponse": { + "required": [ + "code", + "message" + ], + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "target": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDetail" + } + } + } + }, + "ErrorDetail": { + "required": [ + "code", + "message" + ], + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "target": { + "type": "string" } } },