Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 894d0d8

Browse files
brjohnstmsftjianghaolu
authored andcommitted
[Azure Search] Resolve Swagger linter errors for management API (Azure#2242)
* [Azure Search] Adding PATCH Services to Swagger Support for PATCH was added to the Azure Search RP. This change adds it to the Swagger spec so it will be documented and included in generated SDK code. * [Azure Search] Adding x-ms-examples to Management plane Swagger spec * [Azure Search] Removing required properties to resolve PATCH linter errors * [Azure Search] Removing x-ms-long-running-operation from PATCH It doesn't seem to be supported by the .NET ClientRuntime for resource-based polling. * [Azure Search] Fixing a few Swagger linter warnings * [Azure Search] Adding Operations API to management plane Swagger * [Azure Search] Fixing validation error in Management API example * [Azure Search] Fixing broken delete query key example * [Azure Search] Clarifying in spec that location and sku are required on Create
1 parent 21ecc34 commit 894d0d8

12 files changed

+492
-186
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"parameters": {
3+
"api-version": "2015-08-19",
4+
"subscriptionId": "subid",
5+
"checkNameAvailabilityInput": {
6+
"name": "mysearchservice",
7+
"type": "searchServices"
8+
}
9+
},
10+
"responses": {
11+
"200": {
12+
"body": {
13+
"nameAvailable": false,
14+
"reason": "AlreadyExists",
15+
"message": ""
16+
}
17+
}
18+
}
19+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"parameters": {
3+
"searchServiceName": "mysearchservice",
4+
"resourceGroupName": "rg1",
5+
"api-version": "2015-08-19",
6+
"subscriptionId": "subid",
7+
"service": {
8+
"location": "westus",
9+
"tags": {
10+
"app-name": "My e-commerce app"
11+
},
12+
"sku": {
13+
"name": "standard"
14+
},
15+
"properties": {
16+
"replicaCount": 3,
17+
"partitionCount": 1,
18+
"hostingMode": "default"
19+
}
20+
}
21+
},
22+
"responses": {
23+
"200": {
24+
"body": {
25+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
26+
"name": "mysearchservice",
27+
"location": "westus",
28+
"type": "Microsoft.Search/searchServices",
29+
"tags": {
30+
"app-name": "My e-commerce app"
31+
},
32+
"sku": {
33+
"name": "standard"
34+
},
35+
"properties":{
36+
"replicaCount": 3,
37+
"partitionCount": 1,
38+
"status": "provisioning",
39+
"statusDetails": "",
40+
"hostingMode": "default",
41+
"provisioningState": "provisioning"
42+
}
43+
}
44+
},
45+
"201": {
46+
"body": {
47+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
48+
"name": "mysearchservice",
49+
"location": "westus",
50+
"type": "Microsoft.Search/searchServices",
51+
"tags": {
52+
"app-name": "My e-commerce app"
53+
},
54+
"sku": {
55+
"name": "standard"
56+
},
57+
"properties":{
58+
"replicaCount": 3,
59+
"partitionCount": 1,
60+
"status": "provisioning",
61+
"statusDetails": "",
62+
"hostingMode": "default",
63+
"provisioningState": "provisioning"
64+
}
65+
}
66+
}
67+
}
68+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"parameters": {
3+
"searchServiceName": "mysearchservice",
4+
"resourceGroupName": "rg1",
5+
"name": "Query key for browser-based clients",
6+
"api-version": "2015-08-19",
7+
"subscriptionId": "subid"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"name": "Query key for browser-based clients",
13+
"key": "<a query API key>"
14+
}
15+
}
16+
}
17+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"parameters": {
3+
"searchServiceName": "mysearchservice",
4+
"resourceGroupName": "rg1",
5+
"key": "<a query API key>",
6+
"api-version": "2015-08-19",
7+
"subscriptionId": "subid"
8+
},
9+
"responses": {
10+
"200": { },
11+
"204": { },
12+
"404": { }
13+
}
14+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"parameters": {
3+
"searchServiceName": "mysearchservice",
4+
"resourceGroupName": "rg1",
5+
"api-version": "2015-08-19",
6+
"subscriptionId": "subid"
7+
},
8+
"responses": {
9+
"200": { },
10+
"204": { },
11+
"404": { }
12+
}
13+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"parameters": {
3+
"searchServiceName": "mysearchservice",
4+
"resourceGroupName": "rg1",
5+
"api-version": "2015-08-19",
6+
"subscriptionId": "subid"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"primaryKey": "<your primary admin API key>",
12+
"secondaryKey": "<your secondary admin API key>"
13+
}
14+
}
15+
}
16+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"parameters": {
3+
"searchServiceName": "mysearchservice",
4+
"resourceGroupName": "rg1",
5+
"api-version": "2015-08-19",
6+
"subscriptionId": "subid"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
12+
"name": "mysearchservice",
13+
"location": "westus",
14+
"type": "Microsoft.Search/searchServices",
15+
"tags": {
16+
"app-name": "My e-commerce app"
17+
},
18+
"sku": {
19+
"name": "standard"
20+
},
21+
"properties":{
22+
"replicaCount": 3,
23+
"partitionCount": 1,
24+
"status": "running",
25+
"statusDetails": "",
26+
"hostingMode": "default",
27+
"provisioningState": "succeeded"
28+
}
29+
}
30+
}
31+
}
32+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"parameters": {
3+
"searchServiceName": "mysearchservice",
4+
"resourceGroupName": "rg1",
5+
"api-version": "2015-08-19",
6+
"subscriptionId": "subid"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"value": [
12+
{
13+
"name": "Query key for browser-based clients",
14+
"key": "<a query API key>"
15+
},
16+
{
17+
"name": "Query key for mobile clients",
18+
"key": "<another query API key>"
19+
}
20+
]
21+
}
22+
}
23+
}
24+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"parameters": {
3+
"resourceGroupName": "rg1",
4+
"api-version": "2015-08-19",
5+
"subscriptionId": "subid"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"value": [
11+
{
12+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
13+
"name": "mysearchservice",
14+
"location": "westus",
15+
"type": "Microsoft.Search/searchServices",
16+
"tags": {
17+
"app-name": "My e-commerce app"
18+
},
19+
"sku": {
20+
"name": "standard"
21+
},
22+
"properties":{
23+
"replicaCount": 3,
24+
"partitionCount": 1,
25+
"status": "running",
26+
"statusDetails": "",
27+
"hostingMode": "default",
28+
"provisioningState": "succeeded"
29+
}
30+
},
31+
{
32+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice2",
33+
"name": "mysearchservice2",
34+
"location": "eastus",
35+
"type": "Microsoft.Search/searchServices",
36+
"tags": {
37+
"app-name": "My e-commerce app"
38+
},
39+
"sku": {
40+
"name": "basic"
41+
},
42+
"properties":{
43+
"replicaCount": 1,
44+
"partitionCount": 1,
45+
"status": "running",
46+
"statusDetails": "",
47+
"hostingMode": "default",
48+
"provisioningState": "succeeded"
49+
}
50+
}
51+
]
52+
}
53+
}
54+
}
55+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"parameters": {
3+
"searchServiceName": "mysearchservice",
4+
"resourceGroupName": "rg1",
5+
"keyKind": "primary",
6+
"api-version": "2015-08-19",
7+
"subscriptionId": "subid"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"primaryKey": "<your primary admin API key>",
13+
"secondaryKey": "<your secondary admin API key>"
14+
}
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)