Skip to content

Commit

Permalink
[Synapse] Decouple dependencies among Swagger specs (Azure#16616)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
wanyang7 authored and LeiWang3 committed Mar 31, 2022
1 parent 8a8fcb5 commit bd1ca57
Show file tree
Hide file tree
Showing 25 changed files with 408 additions and 495 deletions.
89 changes: 89 additions & 0 deletions specification/synapse/common/v1/types.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,95 @@
"$ref": "#/definitions/ErrorDetail"
}
}
},
"OperationResource": {
"type": "object",
"description": "An operation",
"properties": {
"id": {
"type": "string",
"description": "Operation ID"
},
"name": {
"type": "string",
"description": "Operation name"
},
"status": {
"enum": [
"InProgress",
"Succeeded",
"Failed",
"Canceled"
],
"description": "Operation status",
"type": "string",
"x-ms-enum": {
"name": "OperationStatus",
"modelAsString": true
}
},
"properties": {
"type": "object",
"description": "Operation properties",
"x-ms-client-flatten": true
},
"error": {
"$ref": "../../../common-types/resource-management/v2/types.json#/definitions/ErrorDetail",
"description": "Errors from the operation"
},
"startTime": {
"type": "string",
"format": "date-time",
"description": "Operation start time"
},
"endTime": {
"type": "string",
"format": "date-time",
"description": "Operation start time"
},
"percentComplete": {
"type": "number",
"description": "Completion percentage of the operation"
}
}
},
"LibraryInfo": {
"type": "object",
"description": "Library/package information of a Big Data pool powered by Apache Spark",
"title": "Information about a library/package created at the workspace level.",
"properties": {
"name": {
"type": "string",
"description": "Name of the library."
},
"path": {
"type": "string",
"description": "Storage blob path of library."
},
"containerName": {
"type": "string",
"description": "Storage blob container name."
},
"uploadedTimestamp": {
"type": "string",
"format": "date-time",
"description": "The last update time of the library."
},
"type": {
"type": "string",
"description": "Type of the library."
},
"provisioningStatus": {
"readOnly": true,
"type": "string",
"description": "Provisioning status of the library/package."
},
"creatorId": {
"readOnly": true,
"type": "string",
"description": "Creator Id of the library/package."
}
}
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/workspaceNameParameter"
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"$ref": "#/parameters/azureADOnlyAuthenticationNameParameter"
Expand Down Expand Up @@ -92,7 +92,7 @@
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/workspaceNameParameter"
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"$ref": "#/parameters/azureADOnlyAuthenticationNameParameter"
Expand Down Expand Up @@ -161,7 +161,7 @@
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/workspaceNameParameter"
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
}
],
"responses": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./workspace.json#/parameters/workspaceNameParameter"
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"type": "string",
Expand Down Expand Up @@ -94,7 +94,7 @@
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./workspace.json#/parameters/workspaceNameParameter"
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"type": "string",
Expand Down Expand Up @@ -158,7 +158,7 @@
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./workspace.json#/parameters/workspaceNameParameter"
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"type": "string",
Expand Down Expand Up @@ -240,7 +240,7 @@
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./workspace.json#/parameters/workspaceNameParameter"
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"type": "string",
Expand Down Expand Up @@ -308,7 +308,7 @@
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./workspace.json#/parameters/workspaceNameParameter"
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
}
],
"responses": {
Expand Down Expand Up @@ -446,7 +446,7 @@
"description": "List of custom libraries/packages associated with the spark pool.",
"type": "array",
"items": {
"$ref": "#/definitions/LibraryInfo"
"$ref": "../../../../common/v1/types.json#/definitions/LibraryInfo"
}
},
"sparkConfigProperties": {
Expand Down Expand Up @@ -547,44 +547,6 @@
}
}
},
"LibraryInfo": {
"type": "object",
"description": "Library/package information of a Big Data pool powered by Apache Spark",
"title": "Information about a library/package created at the workspace level.",
"properties": {
"name": {
"type": "string",
"description": "Name of the library."
},
"path": {
"type": "string",
"description": "Storage blob path of library."
},
"containerName": {
"type": "string",
"description": "Storage blob container name."
},
"uploadedTimestamp": {
"type": "string",
"format": "date-time",
"description": "The last update time of the library."
},
"type": {
"type": "string",
"description": "Type of the library."
},
"provisioningStatus": {
"readOnly": true,
"type": "string",
"description": "Provisioning status of the library/package."
},
"creatorId": {
"readOnly": true,
"type": "string",
"description": "Creator Id of the library/package."
}
}
},
"LibraryRequirements": {
"type": "object",
"description": "Library requirements for a Big Data pool powered by Apache Spark",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/workspaceNameParameter"
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
}
],
"responses": {
Expand Down Expand Up @@ -90,7 +90,7 @@
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/workspaceNameParameter"
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"$ref": "#/parameters/ruleNameParameter"
Expand Down Expand Up @@ -160,7 +160,7 @@
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/workspaceNameParameter"
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"$ref": "#/parameters/ruleNameParameter"
Expand Down Expand Up @@ -217,7 +217,7 @@
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/workspaceNameParameter"
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"$ref": "#/parameters/ruleNameParameter"
Expand Down Expand Up @@ -266,7 +266,7 @@
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/workspaceNameParameter"
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"description": "Replace all IP firewall rules request",
Expand Down Expand Up @@ -404,14 +404,6 @@
}
},
"parameters": {
"workspaceNameParameter": {
"name": "workspaceName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the workspace",
"x-ms-parameter-location": "method"
},
"ruleNameParameter": {
"type": "string",
"in": "path",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./workspace.json#/parameters/workspaceNameParameter"
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
}
],
"responses": {
Expand Down Expand Up @@ -90,7 +90,7 @@
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./workspace.json#/parameters/workspaceNameParameter"
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"$ref": "#/parameters/keyNameParameter"
Expand Down Expand Up @@ -138,7 +138,7 @@
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./workspace.json#/parameters/workspaceNameParameter"
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"$ref": "#/parameters/keyNameParameter"
Expand Down Expand Up @@ -197,7 +197,7 @@
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./workspace.json#/parameters/workspaceNameParameter"
"$ref": "../../../../common/v1/types.json#/parameters/WorkspaceNameParameter"
},
{
"$ref": "#/parameters/keyNameParameter"
Expand Down
Loading

0 comments on commit bd1ca57

Please sign in to comment.