Skip to content

Commit be2b34f

Browse files
authored
[Quantum] Addressing swagger completeness and correctness errors (#13150)
* [Quantum] Addressing swagger completeness and correctness errors * Fixing errors in SpellCheck and PrettierCheck
1 parent fbdca24 commit be2b34f

File tree

8 files changed

+157
-3
lines changed

8 files changed

+157
-3
lines changed

specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/offeringsList.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
{
2525
"name": "Standard",
2626
"id": "Standard",
27+
"version": "1.0",
2728
"description": "Provider CPU and FPGA QIO based solver.",
2829
"restrictedAccessUri": "https://endpoint",
2930
"targets": [
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-1111-2222-3333-444444444444",
4+
"api-version": "2019-11-04-preview",
5+
"locationName": "westus2",
6+
"checkNameAvailabilityParameters": {
7+
"name": "sample-workspace-name",
8+
"type": "Microsoft.Quantum/Workspaces"
9+
}
10+
},
11+
"responses": {
12+
"200": {
13+
"body": {
14+
"nameAvailable": true,
15+
"reason": ""
16+
}
17+
}
18+
}
19+
}

specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesGet.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@
5252
"type": "SystemAssigned",
5353
"principalId": "00000000-1111-2222-3333-444444444444",
5454
"tenantId": "00000000-1111-2222-3333-444444444444"
55+
},
56+
"systemData": {
57+
"createdBy": "user1",
58+
"createdByType": "User",
59+
"createdAt": "2020-01-01T17:18:19.1234567Z",
60+
"lastModifiedBy": "user2",
61+
"lastModifiedByType": "User",
62+
"lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
5563
}
5664
}
5765
}

specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListResourceGroup.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@
3737
"type": "SystemAssigned",
3838
"principalId": "00000000-1111-2222-3333-444444444444",
3939
"tenantId": "00000000-1111-2222-3333-444444444444"
40+
},
41+
"systemData": {
42+
"createdBy": "user1",
43+
"createdByType": "User",
44+
"createdAt": "2020-01-01T17:18:19.1234567Z",
45+
"lastModifiedBy": "user2",
46+
"lastModifiedByType": "User",
47+
"lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
4048
}
4149
}
4250
]

specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesListSubscription.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@
3636
"type": "SystemAssigned",
3737
"principalId": "00000000-1111-2222-3333-444444444444",
3838
"tenantId": "00000000-1111-2222-3333-444444444444"
39+
},
40+
"systemData": {
41+
"createdBy": "user1",
42+
"createdByType": "User",
43+
"createdAt": "2020-01-01T17:18:19.1234567Z",
44+
"lastModifiedBy": "user2",
45+
"lastModifiedByType": "User",
46+
"lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
3947
}
4048
}
4149
]

specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPatch.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@
5858
"type": "SystemAssigned",
5959
"principalId": "00000000-1111-2222-3333-444444444444",
6060
"tenantId": "00000000-1111-2222-3333-444444444444"
61+
},
62+
"systemData": {
63+
"createdBy": "user1",
64+
"createdByType": "User",
65+
"createdAt": "2020-01-01T17:18:19.1234567Z",
66+
"lastModifiedBy": "user2",
67+
"lastModifiedByType": "User",
68+
"lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
6169
}
6270
}
6371
}

specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/examples/quantumWorkspacesPut.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@
7272
"type": "SystemAssigned",
7373
"principalId": "00000000-1111-2222-3333-444444444444",
7474
"tenantId": "00000000-1111-2222-3333-444444444444"
75+
},
76+
"systemData": {
77+
"createdBy": "user1",
78+
"createdByType": "User",
79+
"createdAt": "2020-01-01T17:18:19.1234567Z",
80+
"lastModifiedBy": "user2",
81+
"lastModifiedByType": "User",
82+
"lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
7583
}
7684
}
7785
},
@@ -111,6 +119,14 @@
111119
"type": "SystemAssigned",
112120
"principalId": "00000000-1111-2222-3333-444444444444",
113121
"tenantId": "00000000-1111-2222-3333-444444444444"
122+
},
123+
"systemData": {
124+
"createdBy": "user1",
125+
"createdByType": "User",
126+
"createdAt": "2020-01-01T17:18:19.1234567Z",
127+
"lastModifiedBy": "user2",
128+
"lastModifiedByType": "User",
129+
"lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
114130
}
115131
}
116132
}

specification/quantum/resource-manager/Microsoft.Quantum/preview/2019-11-04-preview/quantum.json

Lines changed: 89 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,52 @@
361361
"nextLinkName": "nextLink"
362362
}
363363
}
364+
},
365+
"/subscriptions/{subscriptionId}/providers/Microsoft.Quantum/locations/{locationName}/checkNameAvailability": {
366+
"post": {
367+
"description": "Check the availability of the resource name.",
368+
"operationId": "Workspace_CheckNameAvailability",
369+
"x-ms-examples": {
370+
"QuantumWorkspacesCheckNameAvailability": {
371+
"$ref": "./examples/quantumWorkspacesCheckNameAvailability.json"
372+
}
373+
},
374+
"parameters": [
375+
{
376+
"$ref": "#/parameters/SubscriptionIdParameter"
377+
},
378+
{
379+
"$ref": "#/parameters/ApiVersionParameter"
380+
},
381+
{
382+
"$ref": "#/parameters/LocationParameter"
383+
},
384+
{
385+
"name": "checkNameAvailabilityParameters",
386+
"in": "body",
387+
"required": true,
388+
"schema": {
389+
"$ref": "#/definitions/CheckNameAvailabilityParameters"
390+
},
391+
"description": "The name and type of the resource."
392+
}
393+
],
394+
"responses": {
395+
"200": {
396+
"description": "OK. The request has succeeded.",
397+
"schema": {
398+
"$ref": "#/definitions/CheckNameAvailabilityResult"
399+
}
400+
},
401+
"default": {
402+
"description": "Error response describing why the operation failed.",
403+
"schema": {
404+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
405+
}
406+
}
407+
},
408+
"deprecated": false
409+
}
364410
}
365411
},
366412
"definitions": {
@@ -402,7 +448,7 @@
402448
"properties": {
403449
"properties": {
404450
"x-ms-client-flatten": true,
405-
"description": "Gets or sets the properties. Define quantum space's specific properties.",
451+
"description": "Gets or sets the properties. Define quantum workspace's specific properties.",
406452
"$ref": "#/definitions/WorkspaceResourceProperties"
407453
},
408454
"identity": {
@@ -432,6 +478,11 @@
432478
}
433479
}
434480
}
481+
},
482+
"systemData": {
483+
"description": "System metadata",
484+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData",
485+
"readOnly": true
435486
}
436487
},
437488
"allOf": [
@@ -654,6 +705,10 @@
654705
"type": "string",
655706
"description": "Display name of this sku."
656707
},
708+
"version": {
709+
"type": "string",
710+
"description": "Display name of this sku."
711+
},
657712
"description": {
658713
"type": "string",
659714
"description": "Description about this sku."
@@ -769,7 +824,8 @@
769824
},
770825
"applicationName": {
771826
"type": "string",
772-
"description": "The provider's marketplace application display name."
827+
"description": "The provider's marketplace application display name.",
828+
"readOnly": true
773829
},
774830
"provisioningState": {
775831
"type": "string",
@@ -789,7 +845,8 @@
789845
},
790846
"resourceUsageId": {
791847
"type": "string",
792-
"description": "Id to track resource usage for the provider."
848+
"description": "Id to track resource usage for the provider.",
849+
"readOnly": true
793850
}
794851
}
795852
},
@@ -848,6 +905,35 @@
848905
"required": [
849906
"value"
850907
]
908+
},
909+
"CheckNameAvailabilityParameters": {
910+
"description": "Details of check name availability request body.",
911+
"type": "object",
912+
"properties": {
913+
"name": {
914+
"type": "string",
915+
"description": "Name for checking availability."
916+
},
917+
"type": {
918+
"type": "string",
919+
"default": "Microsoft.Quantum/Workspaces",
920+
"description": "The resource type of Quantum Workspace."
921+
}
922+
}
923+
},
924+
"CheckNameAvailabilityResult": {
925+
"description": "Result of check name availability.",
926+
"type": "object",
927+
"properties": {
928+
"nameAvailable": {
929+
"type": "boolean",
930+
"description": "Indicator of availability of the Quantum Workspace resource name."
931+
},
932+
"reason": {
933+
"type": "string",
934+
"description": "The reason of unavailability."
935+
}
936+
}
851937
}
852938
},
853939
"parameters": {

0 commit comments

Comments
 (0)