Skip to content

Commit

Permalink
Fixes for CI from Versions and revisions checkin (Azure#2451)
Browse files Browse the repository at this point in the history
* Fixes for CI from Versions and revisions checkin

* Remove unnecessary x-ms-odata attribute in get

* if match fixes and contract fixes

* Fixing the revision contract to have ARM envelope
  • Loading branch information
solankisamir authored and fearthecowboy committed Feb 9, 2018
1 parent 2c6f018 commit 3b026b5
Show file tree
Hide file tree
Showing 8 changed files with 150 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,7 @@
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-odata": "#/definitions/ApiReleaseContract"
}
},
"put": {
"tags": [
Expand Down Expand Up @@ -2342,6 +2341,21 @@
"description": "Paged Api Revision list representation."
},
"ApiRevisionContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/ApiRevisionContractProperties",
"description": "Properties of the Api Revision Contract."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "Api Revision details."
},
"ApiRevisionContractProperties": {
"properties": {
"apiId": {
"type":"string",
Expand Down Expand Up @@ -2409,6 +2423,7 @@
"description": "Description of new API Revision."
},
"apiVersionSet" : {
"description": "Version set details",
"$ref" : "#/definitions/ApiVersionSetContract"
}
}
Expand Down Expand Up @@ -2458,7 +2473,7 @@
"description": "Paged Api Revision list representation."
},
"ApiReleaseContract": {
"properties": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/ApiReleaseContractProperties",
Expand All @@ -2479,13 +2494,13 @@
"type": "string",
"description": "Identifier of the API the release belongs to."
},
"createdDate": {
"createdDateTime": {
"type":"string",
"readOnly": true,
"format": "date-time",
"description": "The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard."
},
"updatedDate": {
"updatedDateTime": {
"type":"string",
"readOnly": true,
"format": "date-time",
Expand Down Expand Up @@ -2901,7 +2916,8 @@
"in": "header",
"required": true,
"description": "ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.",
"type": "string"
"type": "string",
"x-ms-parameter-location": "method"
},
"SchemaIdParameter": {
"name": "schemaId",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,41 @@
"resourceGroupName": "rg1",
"api-version": "2017-03-01",
"subscriptionId": "subid",
"apiId": "5a5fcc09124a7fa9b89f2f1d"
"apiId": "a1",
"releaseId": "testrev",
"parameters": {
"properties": {
"apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1",
"notes": "yahooagain"
}
}
},
"responses": {
"201": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/releases/testrev",
"type": "Microsoft.ApiManagement/service/apis/releases",
"name": "testrev",
"properties": {
"apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1",
"createdDateTime": "2018-02-08T20:52:00.65Z",
"updatedDateTime": "2018-02-08T20:52:00.65Z",
"notes": "yahooagain"
}
}
},
"200": {
"body": {
"apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5a5fcc09124a7fa9b89f2f1d",
"notes": "This is the latest revision"
}
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/releases/testrev",
"type": "Microsoft.ApiManagement/service/apis/releases",
"name": "testrev",
"properties": {
"apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1",
"createdDateTime": "2018-02-08T20:52:00.65Z",
"updatedDateTime": "2018-02-08T20:52:00.65Z",
"notes": "yahooagain"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
"resourceGroupName": "rg1",
"api-version": "2017-03-01",
"subscriptionId": "subid",
"apiId": "5a5fcc09124a7fa9b89f2f1d"
"apiId": "5a5fcc09124a7fa9b89f2f1d",
"releaseId": "testrev",
"If-Match": "*"
},
"responses": {
"204": {
}
"204": { }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,22 @@
"resourceGroupName": "rg1",
"api-version": "2017-03-01",
"subscriptionId": "subid",
"apiId": "5a5fcc09124a7fa9b89f2f1d"
"apiId": "a1",
"releaseId": "5a7cb545298324c53224a799"
},
"responses": {
"200": {
"body": {
"apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5a5fcc09124a7fa9b89f2f1d",
"notes": "This is the latest release"
}
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/releases/5a7cb545298324c53224a799",
"type": "Microsoft.ApiManagement/service/apis/releases",
"name": "5a7cb545298324c53224a799",
"properties": {
"apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1",
"createdDateTime": "2018-02-08T20:38:29.173Z",
"updatedDateTime": "2018-02-08T20:38:29.173Z",
"notes": "yahoo"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@
"resourceGroupName": "rg1",
"api-version": "2017-03-01",
"subscriptionId": "subid",
"apiId": "57d2ef278aa04f0888cba3f3"
"apiId": "a1"
},
"responses": {
"200": {
"description": "",
"body": {
"value": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5a5fcc09124a7fa9b89f2f1d/releases/5a610b3175c67153d14c6489",
"createdDateTime": "2018-01-18T16:01:38.83Z",
"updatedDateTime": "2018-01-18T16:01:38.83Z",
"notes": "This is the latest release"
}
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/releases/5a7cb545298324c53224a799",
"type": "Microsoft.ApiManagement/service/apis/releases",
"name": "5a7cb545298324c53224a799",
"properties": {
"createdDateTime": "2018-02-08T20:38:29.173Z",
"updatedDateTime": "2018-02-08T20:38:29.173Z",
"notes": "yahoo"
}
}
],
"count": 1,
"nextLink": null
}
"nextLink": ""
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,28 @@
"resourceGroupName": "rg1",
"api-version": "2017-03-01",
"subscriptionId": "subid",
"apiId": "57d2ef278aa04f0888cba3f3"
"apiId": "57d2ef278aa04f0888cba3f3"
},
"responses": {
"200": {
"description": "",
"body": {
"value": [
{
"apiId": "/apis/5a5fcc09124a7fa9b89f2f1d;rev=2",
"apiRevision": "2",
"createdDateTime": "2018-01-18T20:20:20.447Z",
"updatedDateTime": "2018-01-18T20:20:20.447Z",
"description": "Test",
"privateUrl": "/echo/v2;rev=2",
"isOnline": true,
"isCurrent": false
},
{
"apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5a5fcc09124a7fa9b89f2f1d;rev=1",
"apiRevision": "1",
"createdDateTime": "2018-01-17T22:20:02.313Z",
"updatedDateTime": "2018-01-17T23:32:10.32Z",
"description": null,
"privateUrl": "/echo/v2",
"isOnline": true,
"isCurrent": true
}
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/revisions/5a7cb545298324c53224a799",
"type": "Microsoft.ApiManagement/service/apis/revisions",
"name": "5a7cb545298324c53224a799",
"properties": {
"apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1;rev=1",
"apiRevision": "1",
"createdDateTime": "2018-02-01T22:21:20.467Z",
"updatedDateTime": "2018-02-01T22:21:20.467Z",
"isOnline": true,
"isCurrent": true
}
}
],
"count": 2,
"nextLink": null
}
"nextLink": ""
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,39 @@
"200": {
"body": {
"value": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1",
"type": "Microsoft.ApiManagement/service/apis",
"name": "a1",
"properties": {
"displayName": "api1",
"apiRevision": "1",
"serviceUrl": "http://echoapi.cloudapp.net/api",
"path": "api1",
"protocols": [
"https"
],
"isCurrent": true,
"apiVersionSetId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/api-version-sets/c48f96c9-1385-4e2d-b410-5ab591ce0fc4"
}
},
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5a73933b8f27f7cc82a2d533",
"type": "Microsoft.ApiManagement/service/apis",
"name": "5a73933b8f27f7cc82a2d533",
"properties": {
"displayName": "api1",
"apiRevision": "1",
"serviceUrl": "http://echoapi.cloudapp.net/api",
"path": "api1",
"protocols": [
"https"
],
"isCurrent": true,
"apiVersion": "v1",
"apiVersionSetId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/api-version-sets/c48f96c9-1385-4e2d-b410-5ab591ce0fc4"
}
},
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api",
"type": "Microsoft.ApiManagement/service/apis",
Expand All @@ -21,25 +54,23 @@
"protocols": [
"https"
],
"isCurrent": true,
"isOnline": true
"isCurrent": true
}
},
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/PetStoreTemplate2",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5a7390baa5816a110435aee0",
"type": "Microsoft.ApiManagement/service/apis",
"name": "PetStoreTemplate2",
"name": "5a7390baa5816a110435aee0",
"properties": {
"displayName": "Swagger Petstore",
"displayName": "Swagger Petstore Extensive",
"apiRevision": "1",
"description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",
"serviceUrl": "http://petstore.swagger.io/v2",
"path": "petstore2",
"description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
"serviceUrl": "http://petstore.swagger.wordnik.com/api",
"path": "vvv",
"protocols": [
"http"
"https"
],
"isCurrent": true,
"isOnline": true
"isCurrent": true
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
"resourceGroupName": "rg1",
"api-version": "2017-03-01",
"subscriptionId": "subid",
"apiId": "5a5fcc09124a7fa9b89f2f1d"
"apiId": "a1",
"releaseId": "testrev",
"If-Match": "*",
"parameters": {
"properties": {
"apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1",
"notes": "yahooagain"
}
}
},
"responses": {
"200": {
"body": {
"notes": "Here is an updated revision description"
}
}
"204": { }
}
}

0 comments on commit 3b026b5

Please sign in to comment.