Skip to content

Commit eb03a12

Browse files
navneet35Navneet Singh
andauthored
Adding list library and custom library referred schema changed (#12667)
* List Libraries in Workspace API specs * LibraryArtifacts changed to Libraries * create and append library api separated using x-ms-paths to resolve SDK issue * supressing R4009 systemData violation Co-authored-by: Navneet Singh <[email protected]>
1 parent 24b5c0f commit eb03a12

File tree

13 files changed

+360
-54
lines changed

13 files changed

+360
-54
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"parameters": {
3+
"endpoint": "exampleWorkspace.dev.azuresynapse.net",
4+
"libraryName": "exampleLibraryName.jar",
5+
"api-version": "2019-06-01-preview",
6+
"content": "file binary chunk",
7+
"x-ms-blob-condition-appendpos": 12324
8+
},
9+
"responses": {
10+
"201": {
11+
"headers": {
12+
"Date": "Fri, 23 Oct 2020 08:28:16 GMT",
13+
"X-Content-Type-Options": "nosniff",
14+
"x-ms-ratelimit-remaining-subscription-writes": "1192",
15+
"x-ms-request-id": "e4c589b7-a9fe-4c28-981c-3855ec27d264",
16+
"x-ms-correlation-request-id": "e4c589b7-a9fe-4c28-981c-3855ec27d264"
17+
}
18+
}
19+
}
20+
}
Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,10 @@
22
"parameters": {
33
"endpoint": "exampleWorkspace.dev.azuresynapse.net",
44
"libraryName": "exampleLibraryName.jar",
5-
"api-version": "2019-06-01-preview",
6-
"comp": "appendblock",
7-
"content": "file binary chunk"
5+
"api-version": "2019-06-01-preview"
86
},
97
"responses": {
108
"200": {},
11-
"201": {
12-
"headers": {
13-
"Date": "Fri, 23 Oct 2020 08:28:16 GMT",
14-
"X-Content-Type-Options": "nosniff",
15-
"x-ms-ratelimit-remaining-subscription-writes": "1192",
16-
"x-ms-request-id": "e4c589b7-a9fe-4c28-981c-3855ec27d264",
17-
"x-ms-correlation-request-id": "e4c589b7-a9fe-4c28-981c-3855ec27d264"
18-
}
19-
},
209
"202": {
2110
"headers": {
2211
"Date": "Fri, 23 Oct 2020 08:28:16 GMT",
@@ -26,7 +15,7 @@
2615
"x-ms-correlation-request-id": "e4c589b7-a9fe-4c28-981c-3855ec27d264"
2716
},
2817
"body": {
29-
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspaceName/libraryartifacts/exampleLibraryName.jar",
18+
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspaceName/libraries/exampleLibraryName.jar",
3019
"recordId": 1234,
3120
"state": "Creating",
3221
"created": "2020-10-23T07:59:29.1573546+00:00",
@@ -36,7 +25,6 @@
3625
"operationId": "1500474f-0000-0200-0000-5cbe090d0000",
3726
"artifactId": "2222222e-222d-222f-2222-22a2f222d2f2"
3827
}
39-
},
40-
"412": {}
28+
}
4129
}
4230
}

specification/synapse/data-plane/Microsoft.Synapse/preview/2019-06-01-preview/examples/Library_Delete.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"x-ms-correlation-request-id": "e4c589b7-a9fe-4c28-981c-3855ec27d264"
1616
},
1717
"body": {
18-
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspaceName/libraryartifacts/exampleLibraryName.jar",
18+
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspaceName/libraries/exampleLibraryName.jar",
1919
"recordId": 1234,
2020
"state": "Creating",
2121
"created": "2020-10-23T07:59:29.1573546+00:00",

specification/synapse/data-plane/Microsoft.Synapse/preview/2019-06-01-preview/examples/Library_Flush.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"x-ms-correlation-request-id": "e4c589b7-a9fe-4c28-981c-3855ec27d264"
1616
},
1717
"body": {
18-
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspaceName/libraryartifacts/exampleLibraryName.jar",
18+
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspaceName/libraries/exampleLibraryName.jar",
1919
"recordId": 1234,
2020
"state": "Creating",
2121
"created": "2020-10-23T07:59:29.1573546+00:00",

specification/synapse/data-plane/Microsoft.Synapse/preview/2019-06-01-preview/examples/Library_Get.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
"x-ms-correlation-request-id": "99e5d0d9-55e6-45a0-8bd2-cf39210f317c"
1717
},
1818
"body": {
19-
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspaceName/libraryartifacts/exampleLibraryName.jar",
19+
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspaceName/libraries/exampleLibraryName.jar",
2020
"name": "exampleLibraryName.jar",
21-
"type": "Microsoft.Synapse/workspaces/libraryartifacts",
21+
"type": "Microsoft.Synapse/workspaces/libraries",
2222
"properties": {
2323
"name": "exampleLibraryName.jar",
2424
"path": "exampleWorkspace/libraries/exampleLibraryName.jar",

specification/synapse/data-plane/Microsoft.Synapse/preview/2019-06-01-preview/examples/Library_GetOperationResult.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
"x-ms-correlation-request-id": "e4c589b7-a9fe-4c28-981c-3855ec27d264"
1515
},
1616
"body": {
17-
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspaceName/libraryartifacts/exampleLibraryName.jar",
17+
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspaceName/libraries/exampleLibraryName.jar",
1818
"name": "exampleLibraryName.jar",
19-
"type": "Microsoft.Synapse/workspaces/libraryartifacts",
19+
"type": "Microsoft.Synapse/workspaces/libraries",
2020
"properties": {
2121
"name": "exampleLibraryName.jar",
2222
"path": "exampleWorkspace/libraries/exampleLibraryName.jar",

specification/synapse/data-plane/Microsoft.Synapse/preview/2019-06-01-preview/examples/Library_ListByWorkspace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
"body": {
1616
"value": [
1717
{
18-
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspaceName/libraryartifacts/exampleLibraryName.jar",
18+
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspaceName/libraries/exampleLibraryName.jar",
1919
"name": "exampleLibraryName.jar",
20-
"type": "Microsoft.Synapse/workspaces/libraryartifacts",
20+
"type": "Microsoft.Synapse/workspaces/libraries",
2121
"properties": {
2222
"name": "exampleLibraryName.jar",
2323
"path": "exampleWorkspace/libraries/exampleLibraryName.jar",

specification/synapse/data-plane/Microsoft.Synapse/preview/2019-06-01-preview/library.json

Lines changed: 48 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,55 @@
224224
"tags": [
225225
"Library"
226226
],
227-
"operationId": "Library_CreateOrAppend",
227+
"operationId": "Library_Create",
228228
"x-ms-examples": {
229229
"Create Library": {
230-
"$ref": "./examples/Library_CreateOrAppend.json"
230+
"$ref": "./examples/Library_Create.json"
231231
}
232232
},
233-
"description": "Creates a library with the library name. Use query param 'comp=appendblock' to append the data to the library resource created using the create operation.",
233+
"description": "Creates a library with the library name.",
234234
"x-ms-long-running-operation": true,
235+
"parameters": [
236+
{
237+
"$ref": "#/parameters/ApiVersionParameter"
238+
},
239+
{
240+
"$ref": "#/parameters/LibraryNameParameter"
241+
}
242+
],
243+
"responses": {
244+
"200": {
245+
"description": "Ok."
246+
},
247+
"202": {
248+
"description": "In case of create operation, library resource information will be returned.",
249+
"schema": {
250+
"$ref": "#/definitions/LibraryResourceInfo"
251+
}
252+
},
253+
"default": {
254+
"description": "An error response received from the Azure Synapse service.",
255+
"schema": {
256+
"$ref": "#/definitions/CloudError"
257+
}
258+
}
259+
}
260+
}
261+
}
262+
},
263+
"x-ms-paths": {
264+
"/libraries/{libraryName}?comp=appendblock": {
265+
"put": {
266+
"tags": [
267+
"Library"
268+
],
269+
"operationId": "Library_Append",
270+
"x-ms-examples": {
271+
"Append Library": {
272+
"$ref": "./examples/Library_Append.json"
273+
}
274+
},
275+
"description": "Append the content to the library resource created using the create operation. The maximum content size is 4MiB. Content larger than 4MiB must be appended in 4MiB chunks",
235276
"consumes": [
236277
"application/octet-stream"
237278
],
@@ -242,14 +283,11 @@
242283
{
243284
"$ref": "#/parameters/LibraryNameParameter"
244285
},
245-
{
246-
"$ref": "#/parameters/Component"
247-
},
248286
{
249287
"name": "content",
250288
"in": "body",
251-
"description": "Library file chunk. Use this content in with append operation.",
252-
"required": false,
289+
"description": "Library file chunk.",
290+
"required": true,
253291
"schema": {
254292
"format": "binary",
255293
"type": "string"
@@ -259,26 +297,14 @@
259297
"name": "x-ms-blob-condition-appendpos",
260298
"in": "header",
261299
"description": "Set this header to a byte offset at which the block is expected to be appended. The request succeeds only if the current offset matches this value. Otherwise, the request fails with the AppendPositionConditionNotMet error (HTTP status code 412 – Precondition Failed)",
262-
"required": false,
300+
"required": true,
263301
"type": "integer",
264302
"format": "int64"
265303
}
266304
],
267305
"responses": {
268-
"200": {
269-
"description": "Ok."
270-
},
271306
"201": {
272-
"description": "This will be returned in case of append operation."
273-
},
274-
"202": {
275-
"description": "In case of create operation, library resource information will be returned.",
276-
"schema": {
277-
"$ref": "#/definitions/LibraryResourceInfo"
278-
}
279-
},
280-
"412": {
281-
"description": "This will happen in case the offset value provided in x-ms-blob-condition-appendpos doesn't match with the current offset value."
307+
"description": "Created."
282308
},
283309
"default": {
284310
"description": "An error response received from the Azure Synapse service.",
@@ -515,14 +541,6 @@
515541
"type": "string",
516542
"description": "The Synapse client API Version."
517543
},
518-
"Component": {
519-
"name": "comp",
520-
"in": "query",
521-
"required": false,
522-
"type": "string",
523-
"description": "If this param is specified with value appendblock, the api will append the data chunk provided in body to the library created.",
524-
"x-ms-parameter-location": "method"
525-
},
526544
"Endpoint": {
527545
"name": "endpoint",
528546
"description": "The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net.",
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "12345678-1234-1234-1234-12345678abc",
4+
"resourceGroupName": "exampleResourceGroup",
5+
"workspaceName": "exampleWorkspace",
6+
"ifNoneMatch": null,
7+
"api-version": "2020-12-01"
8+
},
9+
"responses": {
10+
"200": {
11+
"headers": {
12+
"Date": "Wed, 23 Oct 2020 21:33:05 GMT",
13+
"X-Content-Type-Options": "nosniff",
14+
"x-ms-ratelimit-remaining-subscription-reads": "14909",
15+
"x-ms-request-id": "f632df92-1140-4e19-9e19-0b1c8cbe393b",
16+
"x-ms-correlation-request-id": "f632df92-1140-4e19-9e19-0b1c8cbe393b"
17+
},
18+
"body": {
19+
"value": [
20+
{
21+
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspace/libraries/exampleLibraryName1.jar",
22+
"name": "exampleLibraryName1.jar",
23+
"type": "Microsoft.Synapse/workspaces/libraries",
24+
"properties": {
25+
"name": "exampleLibraryName1.jar",
26+
"path": "exampleWorkspace/libraries/exampleLibraryName1.jar",
27+
"containerName": "exampleContainer",
28+
"type": "jar",
29+
"uploadedTimestamp": "2020-10-23T07:59:29.1573546+00:00",
30+
"provisioningStatus": "Succeeded",
31+
"creatorId": "2222222e-222d-222f-2222-22a2f222d2f2"
32+
},
33+
"etag": "1500474f-0000-0200-0000-5cbe090d0000"
34+
},
35+
{
36+
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspace/libraries/exampleLibraryName2.jar",
37+
"name": "exampleLibraryName2.jar",
38+
"type": "Microsoft.Synapse/workspaces/libraries",
39+
"properties": {
40+
"name": "exampleLibraryName2.jar",
41+
"path": "exampleWorkspace/libraries/exampleLibraryName2.jar",
42+
"containerName": "exampleContainer",
43+
"type": "jar",
44+
"uploadedTimestamp": "2020-10-23T07:59:29.1573546+00:00",
45+
"provisioningStatus": "Succeeded",
46+
"creatorId": "2222222e-222d-222f-2222-22a2f222d2f2"
47+
},
48+
"etag": "1500474f-0000-0200-0000-5cbe090d0000"
49+
}
50+
],
51+
"nextLink": ""
52+
}
53+
}
54+
}
55+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "12345678-1234-1234-1234-12345678abc",
4+
"resourceGroupName": "exampleResourceGroup",
5+
"workspaceName": "exampleWorkspace",
6+
"ifNoneMatch": null,
7+
"libraryName": "exampleLibraryName.jar",
8+
"api-version": "2020-12-01"
9+
},
10+
"responses": {
11+
"200": {
12+
"headers": {
13+
"Date": "Wed, 23 Oct 2020 21:33:05 GMT",
14+
"X-Content-Type-Options": "nosniff",
15+
"x-ms-ratelimit-remaining-subscription-reads": "14909",
16+
"x-ms-request-id": "f632df92-1140-4e19-9e19-0b1c8cbe393b",
17+
"x-ms-correlation-request-id": "f632df92-1140-4e19-9e19-0b1c8cbe393b"
18+
},
19+
"body": {
20+
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.Synapse/workspaces/exampleWorkspace/libraries/exampleLibraryName.jar",
21+
"name": "exampleLibraryName.jar",
22+
"type": "Microsoft.Synapse/workspaces/libraries",
23+
"properties": {
24+
"name": "exampleLibraryName.jar",
25+
"path": "exampleWorkspace/libraries/exampleLibraryName.jar",
26+
"containerName": "exampleContainer",
27+
"type": "jar",
28+
"uploadedTimestamp": "2020-10-23T07:59:29.1573546+00:00",
29+
"provisioningStatus": "Succeeded",
30+
"creatorId": "2222222e-222d-222f-2222-22a2f222d2f2"
31+
},
32+
"etag": "1500474f-0000-0200-0000-5cbe090d0000"
33+
}
34+
}
35+
}
36+
}

0 commit comments

Comments
 (0)