Skip to content

Commit

Permalink
[Azure Search] Resolve Swagger linter errors for management API (Azur…
Browse files Browse the repository at this point in the history
…e#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
  • Loading branch information
brjohnstmsft authored and jianghaolu committed Jan 10, 2018
1 parent 21ecc34 commit 894d0d8
Show file tree
Hide file tree
Showing 12 changed files with 492 additions and 186 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parameters": {
"api-version": "2015-08-19",
"subscriptionId": "subid",
"checkNameAvailabilityInput": {
"name": "mysearchservice",
"type": "searchServices"
}
},
"responses": {
"200": {
"body": {
"nameAvailable": false,
"reason": "AlreadyExists",
"message": ""
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"parameters": {
"searchServiceName": "mysearchservice",
"resourceGroupName": "rg1",
"api-version": "2015-08-19",
"subscriptionId": "subid",
"service": {
"location": "westus",
"tags": {
"app-name": "My e-commerce app"
},
"sku": {
"name": "standard"
},
"properties": {
"replicaCount": 3,
"partitionCount": 1,
"hostingMode": "default"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app"
},
"sku": {
"name": "standard"
},
"properties":{
"replicaCount": 3,
"partitionCount": 1,
"status": "provisioning",
"statusDetails": "",
"hostingMode": "default",
"provisioningState": "provisioning"
}
}
},
"201": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app"
},
"sku": {
"name": "standard"
},
"properties":{
"replicaCount": 3,
"partitionCount": 1,
"status": "provisioning",
"statusDetails": "",
"hostingMode": "default",
"provisioningState": "provisioning"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parameters": {
"searchServiceName": "mysearchservice",
"resourceGroupName": "rg1",
"name": "Query key for browser-based clients",
"api-version": "2015-08-19",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"name": "Query key for browser-based clients",
"key": "<a query API key>"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"parameters": {
"searchServiceName": "mysearchservice",
"resourceGroupName": "rg1",
"key": "<a query API key>",
"api-version": "2015-08-19",
"subscriptionId": "subid"
},
"responses": {
"200": { },
"204": { },
"404": { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"searchServiceName": "mysearchservice",
"resourceGroupName": "rg1",
"api-version": "2015-08-19",
"subscriptionId": "subid"
},
"responses": {
"200": { },
"204": { },
"404": { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"searchServiceName": "mysearchservice",
"resourceGroupName": "rg1",
"api-version": "2015-08-19",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"primaryKey": "<your primary admin API key>",
"secondaryKey": "<your secondary admin API key>"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parameters": {
"searchServiceName": "mysearchservice",
"resourceGroupName": "rg1",
"api-version": "2015-08-19",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app"
},
"sku": {
"name": "standard"
},
"properties":{
"replicaCount": 3,
"partitionCount": 1,
"status": "running",
"statusDetails": "",
"hostingMode": "default",
"provisioningState": "succeeded"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"parameters": {
"searchServiceName": "mysearchservice",
"resourceGroupName": "rg1",
"api-version": "2015-08-19",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "Query key for browser-based clients",
"key": "<a query API key>"
},
{
"name": "Query key for mobile clients",
"key": "<another query API key>"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"parameters": {
"resourceGroupName": "rg1",
"api-version": "2015-08-19",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app"
},
"sku": {
"name": "standard"
},
"properties":{
"replicaCount": 3,
"partitionCount": 1,
"status": "running",
"statusDetails": "",
"hostingMode": "default",
"provisioningState": "succeeded"
}
},
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice2",
"name": "mysearchservice2",
"location": "eastus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app"
},
"sku": {
"name": "basic"
},
"properties":{
"replicaCount": 1,
"partitionCount": 1,
"status": "running",
"statusDetails": "",
"hostingMode": "default",
"provisioningState": "succeeded"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parameters": {
"searchServiceName": "mysearchservice",
"resourceGroupName": "rg1",
"keyKind": "primary",
"api-version": "2015-08-19",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"primaryKey": "<your primary admin API key>",
"secondaryKey": "<your secondary admin API key>"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"parameters": {
"searchServiceName": "mysearchservice",
"resourceGroupName": "rg1",
"api-version": "2015-08-19",
"subscriptionId": "subid",
"service": {
"tags": {
"app-name": "My e-commerce app",
"new-tag": "Adding a new tag"
},
"properties": {
"replicaCount": 2
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Search/searchServices/mysearchservice",
"name": "mysearchservice",
"location": "westus",
"type": "Microsoft.Search/searchServices",
"tags": {
"app-name": "My e-commerce app"
},
"sku": {
"name": "standard"
},
"properties":{
"replicaCount": 3,
"partitionCount": 1,
"status": "provisioning",
"statusDetails": "",
"hostingMode": "default",
"provisioningState": "provisioning"
}
}
}
}
}
Loading

0 comments on commit 894d0d8

Please sign in to comment.