Skip to content

Commit

Permalink
Bring back default responses and fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
solankisamir committed Mar 2, 2018
1 parent 9298f56 commit 3b3a12f
Show file tree
Hide file tree
Showing 17 changed files with 90 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,29 @@
"policyContent": {
"type": "string",
"description": "Json escaped Xml Encoded contents of the Policy."
},
"contentFormat": {
"type": "string",
"description": "Format of the policyContent.",
"enum": [
"xml",
"xml-link"
],
"x-ms-enum": {
"name": "PolicyContentFormat",
"modelAsString": true,
"values": [
{
"value": "xml",
"description": "The contents are inline and Content type is an XML document."
},
{
"value": "xml-link",
"description": "The policy XML document is hosted on a http endpoint accessible from the API Management service."
}
]
},
"default": "xml"
}
},
"required": [
Expand Down Expand Up @@ -584,7 +607,7 @@
"name": "PolicyIdName"
},
"x-ms-parameter-location": "method"
},
},
"IfMatchRequiredParameter": {
"name": "If-Match",
"in": "header",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,13 @@
{
"$ref": "#/parameters/ApiIdRevParameter"
},
{
"name": "deleteRevisions",
"in": "query",
"required": false,
"type": "boolean",
"description": "Delete all revisions of the Api."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,12 @@
},
"404" : {
"description": "The logger is not associated with the diagnostic entity."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,12 @@
},
"404" : {
"description": "Entity does not exists."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,12 @@
},
"404" : {
"description": "Entity does not exists."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
Expand Down Expand Up @@ -438,6 +444,12 @@
},
"404" : {
"description": "The Users is not subscribed to receive the notification."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,12 @@
},
"404" : {
"description": "API is not associated with the product."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
Expand Down Expand Up @@ -665,6 +671,12 @@
},
"404" : {
"description": "The Group entity is not associated with the Product."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
"nextLinkName": null
},
"x-ms-odata": "#/definitions/RequestReportRecordContract"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"If-Match": "*",
"parameters": {
"properties": {
"contentFormat": "xml",
"policyContent": "<policies> <inbound /> <backend> <forward-request /> </backend> <outbound /></policies>"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"If-Match":"*",
"parameters": {
"properties": {
"contentFormat": "xml",
"policyContent": "<policies> <inbound /> <backend> <forward-request /> </backend> <outbound /></policies>"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"policyId": "policy",
"parameters": {
"properties": {
"contentFormat": "xml",
"policyContent": "<policies>\r\n <inbound />\r\n <backend>\r\n <forward-request />\r\n </backend>\r\n <outbound />\r\n</policies>"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"policyId": "policy",
"parameters": {
"properties": {
"contentFormat": "xml",
"policyContent": "<policies>\r\n <inbound>\r\n <rate-limit calls=\"{{call-count}}\" renewal-period=\"15\"></rate-limit>\r\n <log-to-eventhub logger-id=\"16\">\r\n @( string.Join(\",\", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n </log-to-eventhub>\r\n <quota-by-key calls=\"40\" counter-key=\"cc\" renewal-period=\"3600\" increment-count=\"@(context.Request.Method == &quot;POST&quot; ? 1:2)\" />\r\n <base />\r\n </inbound>\r\n <backend>\r\n <base />\r\n </backend>\r\n <outbound>\r\n <base />\r\n </outbound>\r\n</policies>"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
},
"responses": {
"204": {
}
},
"404":{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"resourceGroupName": "rg1",
"api-version": "2018-01-01",
"subscriptionId": "subid",
"groupId": "59306a29e4bbd510dc24e5f9",
"groupId": "59306a29e4bbd510dc24e5f9",
"uid": "5931a75ae4bbd512a88c680b"
},
"responses": {
"204": {
}
}
"204": {},
"404": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"email": "contoso@live.com"
},
"responses": {
"204": {
}
"204": {},
"404": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"uid": "576823d0a40f7e74ec07d642"
},
"responses": {
"204": {
}
"204": {},
"404": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"resourceGroupName": "rg1",
"api-version": "2017-03-01",
"subscriptionId": "subid",
"productId": "5931a75ae4bbd512a88c680b",
"apiId": "59306a29e4bbd510dc24e5f9"
"productId": "5931a75ae4bbd512a88c680b",
"apiId": "59306a29e4bbd510dc24e5f9"
},
"responses": {
"204": {
}
}
"204": {},
"404": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"groupId": "59306a29e4bbd510dc24e5f9"
},
"responses": {
"204": {
}
"204": {},
"404": {}
}
}

0 comments on commit 3b3a12f

Please sign in to comment.