Skip to content

Commit 1a81dfb

Browse files
idear1203Dongwei WangJonathan Turner
authored andcommitted
[Synapse] - Add missing API version parameter (Azure#11751)
* [Synapse] - Add missing API version parameter and pageable * Fix lint * Fix recent found issues * Fix lint error * Fix model validation errors * Remove x-ms-pageable * Rename Action to RequiredAction * Revert x-ms-pageable and AccessDecisions * Update description for AccessDecisions * Update checkAccessSynapseRbac.json Slight wording fix Co-authored-by: Dongwei Wang <dongwwa@microsoft.com> Co-authored-by: Jonathan Turner <jonathandturner@users.noreply.github.com>
1 parent 1909492 commit 1a81dfb

File tree

4 files changed

+43
-29
lines changed

4 files changed

+43
-29
lines changed

specification/synapse/data-plane/Microsoft.Synapse/preview/2020-08-01-preview/checkAccessSynapseRbac.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"tags": [
2323
"CheckPrincipalAccess"
2424
],
25-
"operationId": "CheckPrincipalAccess",
25+
"operationId": "RoleAssignments_CheckPrincipalAccess",
2626
"description": "Check if the given principalId has access to perform list of actions at a given scope.",
2727
"x-ms-examples": {
2828
"Check access": {
@@ -141,7 +141,7 @@
141141
"description": "List of actions.",
142142
"type": "array",
143143
"items": {
144-
"$ref": "#/definitions/Action"
144+
"$ref": "#/definitions/RequiredAction"
145145
}
146146
},
147147
"scope": {
@@ -150,7 +150,7 @@
150150
}
151151
}
152152
},
153-
"Action": {
153+
"RequiredAction": {
154154
"description": "Action Info",
155155
"type": "object",
156156
"required": [
@@ -170,9 +170,15 @@
170170
},
171171
"CheckPrincipalAccessResponse": {
172172
"description": "Check access response details",
173-
"type": "array",
174-
"items": {
175-
"$ref": "#/definitions/CheckAccessDecision"
173+
"type": "object",
174+
"properties": {
175+
"AccessDecisions": {
176+
"description": "To check if the current user, group, or service principal has permission to read artifacts in the specified workspace.",
177+
"type": "array",
178+
"items": {
179+
"$ref": "#/definitions/CheckAccessDecision"
180+
}
181+
}
176182
}
177183
},
178184
"SubjectInfo": {

specification/synapse/data-plane/Microsoft.Synapse/preview/2020-08-01-preview/examples/CheckAccessSynapseRbac.json

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,32 @@
2525
},
2626
"responses": {
2727
"200": {
28-
"body": [
29-
{
30-
"accessDecision": "Allowed || NotAllowed",
31-
"actionId": "Action 1",
32-
"roleAssignment": {
33-
"id": "00000000-0000-0000-0000-000000000000",
34-
"roleDefinitionId": "00000000-0000-0000-0000-000000000000",
35-
"principalId": "00000000-0000-0000-0000-000000000000",
36-
"scope": "workspaces/exampleWorkspace",
37-
"principalType": "User || Group || ServicePrincipal"
38-
}
39-
},
40-
{
41-
"accessDecision": "Allowed || NotAllowed",
42-
"actionId": "Action 1",
43-
"roleAssignment": {
44-
"id": "00000000-0000-0000-0000-000000000000",
45-
"roleDefinitionId": "00000000-0000-0000-0000-000000000000",
46-
"principalId": "00000000-0000-0000-0000-000000000000",
47-
"scope": "workspaces/exampleWorkspace",
48-
"principalType": "User || Group || ServicePrincipal"
28+
"body": {
29+
"accessDecisions": [
30+
{
31+
"accessDecision": "Allowed || NotAllowed",
32+
"actionId": "Action 1",
33+
"roleAssignment": {
34+
"id": "00000000-0000-0000-0000-000000000000",
35+
"roleDefinitionId": "00000000-0000-0000-0000-000000000000",
36+
"principalId": "00000000-0000-0000-0000-000000000000",
37+
"scope": "workspaces/exampleWorkspace",
38+
"principalType": "User || Group || ServicePrincipal"
39+
}
40+
},
41+
{
42+
"accessDecision": "Allowed || NotAllowed",
43+
"actionId": "Action 1",
44+
"roleAssignment": {
45+
"id": "00000000-0000-0000-0000-000000000000",
46+
"roleDefinitionId": "00000000-0000-0000-0000-000000000000",
47+
"principalId": "00000000-0000-0000-0000-000000000000",
48+
"scope": "workspaces/exampleWorkspace",
49+
"principalType": "User || Group || ServicePrincipal"
50+
}
4951
}
50-
}
51-
]
52+
]
53+
}
5254
},
5355
"default": {
5456
"body": {

specification/synapse/data-plane/Microsoft.Synapse/preview/2020-08-01-preview/roleAssignments.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@
187187
},
188188
{
189189
"$ref": "#/parameters/RoleAssignmentIdParameter"
190+
},
191+
{
192+
"$ref": "#/parameters/ScopeParameter"
190193
}
191194
],
192195
"responses": {

specification/synapse/data-plane/Microsoft.Synapse/preview/2020-08-01-preview/roleDefinitions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@
7979
"text/json"
8080
],
8181
"parameters": [
82+
{
83+
"$ref": "#/parameters/ApiVersionParameter"
84+
},
8285
{
8386
"$ref": "#/parameters/RoleDefinitionIdParameter"
8487
}

0 commit comments

Comments
 (0)