Skip to content

Commit

Permalink
[Api Management] Missing Examples for Operation and Refresh the older…
Browse files Browse the repository at this point in the history
… Ones (Azure#1945)
  • Loading branch information
solankisamir authored and dsgouda committed Oct 31, 2017
1 parent 8844dc8 commit 4cd0679
Show file tree
Hide file tree
Showing 27 changed files with 513 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"location": "West US",
"etag": "AAAAAAAV8Yo=",
"properties": {
"publisherEmail": "sasolank@microsoft.com",
"publisherName": "sasolank@microsoft.com",
"publisherEmail": "admin@contoso.com",
"publisherName": "Contoso",
"provisioningState": "Created",
"targetProvisioningState": "Activating",
"createdAtUtc": "2017-03-19T21:55:27.7443915Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@
"ApiManagementCreateApiUsingWadlImport": {
"$ref": "./examples/ApiManagementCreateApiUsingWadlImport.json"
},
"ApiManagementCreateApiUsingWsdlImport": {
"$ref": "./examples/ApiManagementCreateApiUsingWsdlImport.json"
},
"ApiManagementCreateApi": {
"$ref": "./examples/ApiManagementCreateApi.json"
}
Expand Down Expand Up @@ -235,6 +238,11 @@
],
"operationId": "Api_Update",
"description": "Updates the specified API of the API Management service instance.",
"x-ms-examples": {
"ApiManagementUpdateApi.json": {
"$ref": "./examples/ApiManagementUpdateApi.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
Expand Down Expand Up @@ -286,6 +294,11 @@
],
"operationId": "Api_Delete",
"description": "Deletes the specified API of the API Management service instance.",
"x-ms-examples": {
"ApiManagementDeleteApi.json": {
"$ref": "./examples/ApiManagementDeleteApi.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
Expand Down Expand Up @@ -505,6 +518,11 @@
],
"operationId": "ApiOperation_Update",
"description": "Updates the details of the operation in the API specified by its identifier.",
"x-ms-examples": {
"ApiManagementUpdateApiOperation": {
"$ref": "./examples/ApiManagementUpdateApiOperation.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
Expand Down Expand Up @@ -714,6 +732,11 @@
],
"operationId": "ApiOperationPolicy_CreateOrUpdate",
"description": "Creates or updates policy configuration for the API Operation level.",
"x-ms-examples": {
"ApiManagementCreateApiOperationPolicy": {
"$ref": "./examples/ApiManagementCreateApiOperationPolicy.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
Expand Down Expand Up @@ -1000,6 +1023,11 @@
],
"operationId": "ApiPolicy_CreateOrUpdate",
"description": "Creates or updates policy configuration for the API.",
"x-ms-examples": {
"ApiManagementCreateApiPolicy": {
"$ref": "./examples/ApiManagementCreateApiPolicy.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
Expand Down Expand Up @@ -1063,6 +1091,11 @@
],
"operationId": "ApiPolicy_Delete",
"description": "Deletes the policy configuration at the Api.",
"x-ms-examples": {
"ApiManagementDeleteApiPolicy": {
"$ref": "./examples/ApiManagementDeleteApiPolicy.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@
],
"operationId": "Backend_Update",
"description": "Updates an existing backend.",
"x-ms-examples": {
"ApiManagementUpdateBackend": {
"$ref": "./examples/ApiManagementUpdateBackend.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
Expand Down Expand Up @@ -260,6 +265,11 @@
"Backends"
],
"operationId": "Backend_Delete",
"x-ms-examples": {
"ApiManagementDeleteBackend": {
"$ref": "./examples/ApiManagementDeleteBackend.json"
}
},
"description": "Deletes the specified backend.",
"parameters": [
{
Expand Down Expand Up @@ -566,6 +576,16 @@
"description": "Details of the Backend WebProxy Server to use in the Request to Backend."
},
"BackendUpdateParameters": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/BackendUpdateParameterProperties",
"description": "Backend entity update contract properties."
}
},
"description": "Backend update parameters."
},
"BackendUpdateParameterProperties": {
"properties": {
"url": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@
],
"operationId": "Group_Update",
"description": "Updates the details of the group specified by its identifier.",
"x-ms-examples": {
"ApiManagementUpdateGroup": {
"$ref": "./examples/ApiManagementUpdateGroup.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@
],
"operationId": "Logger_Update",
"description": "Updates an existing logger.",
"x-ms-examples": {
"ApiManagementUpdateLogger": {
"$ref": "./examples/ApiManagementUpdateLogger.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@
],
"operationId": "Product_Update",
"description": "Update product.",
"x-ms-examples": {
"ApiManagementUpdateProductBasic": {
"$ref": "./examples/ApiManagementUpdateProductBasic.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
Expand Down Expand Up @@ -1014,7 +1019,7 @@
},
"ProductUpdateProperties": {
"properties": {
"name": {
"displayName": {
"type": "string",
"description": "Product name.",
"maxLength": 300,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@
],
"operationId": "Subscription_Update",
"description": "Updates the details of a subscription specificied by its identifier.",
"x-ms-examples": {
"ApiManagementUpdateSubscription": {
"$ref": "./examples/ApiManagementUpdateSubscription.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@
],
"operationId": "User_Update",
"description": "Updates the details of the user specified by its identifier.",
"x-ms-examples": {
"ApiManagementUpdateUserBasic": {
"$ref": "./examples/ApiManagementUpdateUserBasic.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
Expand Down Expand Up @@ -244,14 +249,8 @@
"204": {
"description": "The user details were successfully updated."
},
"405": {
"description": "Administrator user cannot be modified.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"description": "*** Error Responses: ***\n\n * 405 Administrator user cannot be modified\n\n * 4XX Error response giving details why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"parameters": {
"serviceName": "apimService1",
"resourceGroupName": "rg1",
"api-version": "2017-03-01",
"subscriptionId": "subid",
"apiId": "5600b57e7e8880006a040001",
"operationId": "5600b57e7e8880006a080001",
"policyId": "policy",
"If-Match": "*",
"parameters": {
"properties": {
"policyContent": "<policies> <inbound /> <backend> <forward-request /> </backend> <outbound /></policies>"
}
}
},
"responses": {
"201": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5600b57e7e8880006a040001/operations/5600b57e7e8880006a080001/policies/policy",
"type": "Microsoft.ApiManagement/service/apis/operations/policies",
"name": "policy",
"properties": {
"policyContent": "<policies>\r\n <inbound />\r\n <backend>\r\n <forward-request />\r\n </backend>\r\n <outbound />\r\n</policies>"
}
}
},
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5600b57e7e8880006a040001/operations/5600b57e7e8880006a080001/policies/policy",
"type": "Microsoft.ApiManagement/service/apis/operations/policies",
"name": "policy",
"properties": {
"policyContent": "<policies>\r\n <inbound />\r\n <backend>\r\n <forward-request />\r\n </backend>\r\n <outbound />\r\n</policies>"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"parameters": {
"serviceName": "apimService1",
"resourceGroupName": "rg1",
"api-version": "2017-03-01",
"subscriptionId": "subid",
"apiId": "5600b57e7e8880006a040001",
"policyId": "policy",
"If-Match":"*",
"parameters": {
"properties": {
"policyContent": "<policies> <inbound /> <backend> <forward-request /> </backend> <outbound /></policies>"
}
}
},
"responses": {
"201": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5600b57e7e8880006a040001/policies/policy",
"type": "Microsoft.ApiManagement/service/apis/policies",
"name": "policy",
"properties": {
"policyContent": "<policies>\r\n <inbound />\r\n <backend>\r\n <forward-request />\r\n </backend>\r\n <outbound />\r\n</policies>"
}
}
},
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5600b57e7e8880006a040001/policies/policy",
"type": "Microsoft.ApiManagement/service/apis/policies",
"name": "policy",
"properties": {
"policyContent": "<policies>\r\n <inbound />\r\n <backend>\r\n <forward-request />\r\n </backend>\r\n <outbound />\r\n</policies>"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"parameters": {
"serviceName": "apimService1",
"resourceGroupName": "rg1",
"api-version": "2017-03-01",
"subscriptionId": "subid",
"apiId": "soapApi",
"parameters": {
"properties": {
"contentFormat": "wsdl-link",
"contentValue": "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL",
"path": "currency",
"wsdlSelector": {
"wsdlServiceName": "CurrencyConvertor",
"wsdlEndpointName": "CurrencyConvertorSoap"
}
}
}
},
"responses": {
"201": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/soapApi",
"type": "Microsoft.ApiManagement/service/apis",
"name": "soapApi",
"properties": {
"displayName": "CurrencyConvertor",
"apiRevision": "1",
"serviceUrl": "http://www.webservicex.net",
"path": "currency",
"protocols": [
"https"
],
"subscriptionKeyParameterNames": {
"header": "Ocp-Apim-Subscription-Key",
"query": "subscription-key"
},
"isCurrent": true
}
}
},
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/soapApi",
"type": "Microsoft.ApiManagement/service/apis",
"name": "soapApi",
"properties": {
"displayName": "CurrencyConvertor",
"apiRevision": "1",
"serviceUrl": "http://www.webservicex.net",
"path": "currency",
"protocols": [
"https"
],
"subscriptionKeyParameterNames": {
"header": "Ocp-Apim-Subscription-Key",
"query": "subscription-key"
},
"isCurrent": true
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"serviceName": "apimService1",
"resourceGroupName": "rg1",
"api-version": "2017-03-01",
"subscriptionId": "subid",
"apiId": "echo-api",
"If-Match": "*"
},
"responses": {
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"parameters": {
"serviceName": "apimService1",
"resourceGroupName": "rg1",
"api-version": "2017-03-01",
"subscriptionId": "subid",
"apiId": "loggerId",
"policyId": "policy",
"If-Match": "*"
},
"responses": {
"204": {}
}
}
Loading

0 comments on commit 4cd0679

Please sign in to comment.