Skip to content

Commit bd1ca57

Browse files
wanyang7LeiWang3
authored andcommitted
[Synapse] Decouple dependencies among Swagger specs (Azure#16616)
* extract workspaceNameParameter to common * move some definitions to common folder * workspaceNameParameter * fix * fix * revert for libraryInfo * fix for breaking change * test for breaking change * test for breaking change
1 parent 8a8fcb5 commit bd1ca57

25 files changed

+408
-495
lines changed

specification/synapse/common/v1/types.json

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,95 @@
137137
"$ref": "#/definitions/ErrorDetail"
138138
}
139139
}
140+
},
141+
"OperationResource": {
142+
"type": "object",
143+
"description": "An operation",
144+
"properties": {
145+
"id": {
146+
"type": "string",
147+
"description": "Operation ID"
148+
},
149+
"name": {
150+
"type": "string",
151+
"description": "Operation name"
152+
},
153+
"status": {
154+
"enum": [
155+
"InProgress",
156+
"Succeeded",
157+
"Failed",
158+
"Canceled"
159+
],
160+
"description": "Operation status",
161+
"type": "string",
162+
"x-ms-enum": {
163+
"name": "OperationStatus",
164+
"modelAsString": true
165+
}
166+
},
167+
"properties": {
168+
"type": "object",
169+
"description": "Operation properties",
170+
"x-ms-client-flatten": true
171+
},
172+
"error": {
173+
"$ref": "../../../common-types/resource-management/v2/types.json#/definitions/ErrorDetail",
174+
"description": "Errors from the operation"
175+
},
176+
"startTime": {
177+
"type": "string",
178+
"format": "date-time",
179+
"description": "Operation start time"
180+
},
181+
"endTime": {
182+
"type": "string",
183+
"format": "date-time",
184+
"description": "Operation start time"
185+
},
186+
"percentComplete": {
187+
"type": "number",
188+
"description": "Completion percentage of the operation"
189+
}
190+
}
191+
},
192+
"LibraryInfo": {
193+
"type": "object",
194+
"description": "Library/package information of a Big Data pool powered by Apache Spark",
195+
"title": "Information about a library/package created at the workspace level.",
196+
"properties": {
197+
"name": {
198+
"type": "string",
199+
"description": "Name of the library."
200+
},
201+
"path": {
202+
"type": "string",
203+
"description": "Storage blob path of library."
204+
},
205+
"containerName": {
206+
"type": "string",
207+
"description": "Storage blob container name."
208+
},
209+
"uploadedTimestamp": {
210+
"type": "string",
211+
"format": "date-time",
212+
"description": "The last update time of the library."
213+
},
214+
"type": {
215+
"type": "string",
216+
"description": "Type of the library."
217+
},
218+
"provisioningStatus": {
219+
"readOnly": true,
220+
"type": "string",
221+
"description": "Provisioning status of the library/package."
222+
},
223+
"creatorId": {
224+
"readOnly": true,
225+
"type": "string",
226+
"description": "Creator Id of the library/package."
227+
}
228+
}
140229
}
141230
},
142231
"parameters": {

specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/azureADOnlyAuthentication.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
4848
},
4949
{
50-
"$ref": "#/parameters/workspaceNameParameter"
50+
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
5151
},
5252
{
5353
"$ref": "#/parameters/azureADOnlyAuthenticationNameParameter"
@@ -92,7 +92,7 @@
9292
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
9393
},
9494
{
95-
"$ref": "#/parameters/workspaceNameParameter"
95+
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
9696
},
9797
{
9898
"$ref": "#/parameters/azureADOnlyAuthenticationNameParameter"
@@ -161,7 +161,7 @@
161161
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
162162
},
163163
{
164-
"$ref": "#/parameters/workspaceNameParameter"
164+
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
165165
}
166166
],
167167
"responses": {

specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/bigDataPool.json

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
4242
},
4343
{
44-
"$ref": "./workspace.json#/parameters/workspaceNameParameter"
44+
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
4545
},
4646
{
4747
"type": "string",
@@ -94,7 +94,7 @@
9494
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
9595
},
9696
{
97-
"$ref": "./workspace.json#/parameters/workspaceNameParameter"
97+
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
9898
},
9999
{
100100
"type": "string",
@@ -158,7 +158,7 @@
158158
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
159159
},
160160
{
161-
"$ref": "./workspace.json#/parameters/workspaceNameParameter"
161+
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
162162
},
163163
{
164164
"type": "string",
@@ -240,7 +240,7 @@
240240
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
241241
},
242242
{
243-
"$ref": "./workspace.json#/parameters/workspaceNameParameter"
243+
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
244244
},
245245
{
246246
"type": "string",
@@ -308,7 +308,7 @@
308308
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
309309
},
310310
{
311-
"$ref": "./workspace.json#/parameters/workspaceNameParameter"
311+
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
312312
}
313313
],
314314
"responses": {
@@ -446,7 +446,7 @@
446446
"description": "List of custom libraries/packages associated with the spark pool.",
447447
"type": "array",
448448
"items": {
449-
"$ref": "#/definitions/LibraryInfo"
449+
"$ref": "../../../../common/v1/types.json#/definitions/LibraryInfo"
450450
}
451451
},
452452
"sparkConfigProperties": {
@@ -547,44 +547,6 @@
547547
}
548548
}
549549
},
550-
"LibraryInfo": {
551-
"type": "object",
552-
"description": "Library/package information of a Big Data pool powered by Apache Spark",
553-
"title": "Information about a library/package created at the workspace level.",
554-
"properties": {
555-
"name": {
556-
"type": "string",
557-
"description": "Name of the library."
558-
},
559-
"path": {
560-
"type": "string",
561-
"description": "Storage blob path of library."
562-
},
563-
"containerName": {
564-
"type": "string",
565-
"description": "Storage blob container name."
566-
},
567-
"uploadedTimestamp": {
568-
"type": "string",
569-
"format": "date-time",
570-
"description": "The last update time of the library."
571-
},
572-
"type": {
573-
"type": "string",
574-
"description": "Type of the library."
575-
},
576-
"provisioningStatus": {
577-
"readOnly": true,
578-
"type": "string",
579-
"description": "Provisioning status of the library/package."
580-
},
581-
"creatorId": {
582-
"readOnly": true,
583-
"type": "string",
584-
"description": "Creator Id of the library/package."
585-
}
586-
}
587-
},
588550
"LibraryRequirements": {
589551
"type": "object",
590552
"description": "Library requirements for a Big Data pool powered by Apache Spark",

specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/firewallRule.json

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
4141
},
4242
{
43-
"$ref": "#/parameters/workspaceNameParameter"
43+
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
4444
}
4545
],
4646
"responses": {
@@ -90,7 +90,7 @@
9090
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
9191
},
9292
{
93-
"$ref": "#/parameters/workspaceNameParameter"
93+
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
9494
},
9595
{
9696
"$ref": "#/parameters/ruleNameParameter"
@@ -160,7 +160,7 @@
160160
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
161161
},
162162
{
163-
"$ref": "#/parameters/workspaceNameParameter"
163+
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
164164
},
165165
{
166166
"$ref": "#/parameters/ruleNameParameter"
@@ -217,7 +217,7 @@
217217
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
218218
},
219219
{
220-
"$ref": "#/parameters/workspaceNameParameter"
220+
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
221221
},
222222
{
223223
"$ref": "#/parameters/ruleNameParameter"
@@ -266,7 +266,7 @@
266266
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
267267
},
268268
{
269-
"$ref": "#/parameters/workspaceNameParameter"
269+
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
270270
},
271271
{
272272
"description": "Replace all IP firewall rules request",
@@ -404,14 +404,6 @@
404404
}
405405
},
406406
"parameters": {
407-
"workspaceNameParameter": {
408-
"name": "workspaceName",
409-
"in": "path",
410-
"required": true,
411-
"type": "string",
412-
"description": "The name of the workspace",
413-
"x-ms-parameter-location": "method"
414-
},
415407
"ruleNameParameter": {
416408
"type": "string",
417409
"in": "path",

specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/keys.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
4141
},
4242
{
43-
"$ref": "./workspace.json#/parameters/workspaceNameParameter"
43+
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
4444
}
4545
],
4646
"responses": {
@@ -90,7 +90,7 @@
9090
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
9191
},
9292
{
93-
"$ref": "./workspace.json#/parameters/workspaceNameParameter"
93+
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
9494
},
9595
{
9696
"$ref": "#/parameters/keyNameParameter"
@@ -138,7 +138,7 @@
138138
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
139139
},
140140
{
141-
"$ref": "./workspace.json#/parameters/workspaceNameParameter"
141+
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
142142
},
143143
{
144144
"$ref": "#/parameters/keyNameParameter"
@@ -197,7 +197,7 @@
197197
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
198198
},
199199
{
200-
"$ref": "./workspace.json#/parameters/workspaceNameParameter"
200+
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
201201
},
202202
{
203203
"$ref": "#/parameters/keyNameParameter"

0 commit comments

Comments
 (0)