Skip to content

Commit

Permalink
fix: Batch model validation errors (#6753)
Browse files Browse the repository at this point in the history
- Add body for RESPONSE_BODY_NOT_IN_EXAMPLE errors
- active -> Active for state enum in 2017-09-01 examples
  • Loading branch information
nschonni authored and michaeljqzq committed Jul 29, 2019
1 parent 1905235 commit bc9c454
Show file tree
Hide file tree
Showing 9 changed files with 162 additions and 144 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
},
"responses": {
"201": {
"id": "app1",
"displayName": "myAppName",
"packages": [],
"allowUpdates": false
"body": {
"id": "app1",
"displayName": "myAppName",
"packages": [],
"allowUpdates": false
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@
},
"responses": {
"200": {
"id": "app1",
"displayName": "myAppName",
"packages": [
{
"id": "app1",
"version": "1",
"state": "active",
"format": "zip",
"lastActivationTime": "2017-06-27T18:48:09.9330991Z"
}
],
"allowUpdates": false,
"defaultVersion": "1"
"body": {
"id": "app1",
"displayName": "myAppName",
"packages": [
{
"id": "app1",
"version": "1",
"state": "Active",
"format": "zip",
"lastActivationTime": "2017-06-27T18:48:09.9330991Z"
}
],
"allowUpdates": false,
"defaultVersion": "1"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,38 @@
},
"responses": {
"200": {
"value": [
{
"id": "app1",
"displayName": "myAppName",
"packages": [
{
"version": "1",
"state": "active",
"format": "zip",
"lastActivationTime": "2017-06-27T18:48:09.9330991Z"
}
],
"allowUpdates": false,
"defaultVersion": "1"
},
{
"id": "app2",
"displayName": "myAppName",
"packages": [
{
"version": "1",
"state": "active",
"format": "zip",
"lastActivationTime": "2017-06-27T18:48:09.9330991Z"
}
],
"allowUpdates": false,
"defaultVersion": "1"
}
]
"body": {
"value": [
{
"id": "app1",
"displayName": "myAppName",
"packages": [
{
"version": "1",
"state": "Active",
"format": "zip",
"lastActivationTime": "2017-06-27T18:48:09.9330991Z"
}
],
"allowUpdates": false,
"defaultVersion": "1"
},
{
"id": "app2",
"displayName": "myAppName",
"packages": [
{
"version": "1",
"state": "Active",
"format": "zip",
"lastActivationTime": "2017-06-27T18:48:09.9330991Z"
}
],
"allowUpdates": false,
"defaultVersion": "1"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
},
"responses": {
"201": {
"id": "app1",
"version": "1",
"state": "active",
"format": "zip",
"storageUrl": "http://mystorage1.blob.core.windows.net/myapp?mysas",
"storageUrlExpiry": "2017-06-27T18:48:09.9330991Z"
"body": {
"id": "app1",
"version": "1",
"state": "Active",
"format": "zip",
"storageUrl": "http://mystorage1.blob.core.windows.net/myapp?mysas",
"storageUrlExpiry": "2017-06-27T18:48:09.9330991Z"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
},
"responses": {
"200": {
"id": "app1",
"version": "1",
"state": "active",
"format": "zip",
"lastActivationTime": "2017-06-27T18:48:09.9330991Z"
"body": {
"id": "app1",
"version": "1",
"state": "Active",
"format": "zip",
"lastActivationTime": "2017-06-27T18:48:09.9330991Z"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,31 @@
},
"responses": {
"200": {
"value": [
{
"type": "Microsoft.Batch/batchAccounts/applications",
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1",
"name": "app1",
"etag": "W/\"0x8D64F91A9089879\"",
"properties": {
"allowUpdates": false,
"defaultVersion": "1"
"body": {
"value": [
{
"type": "Microsoft.Batch/batchAccounts/applications",
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1",
"name": "app1",
"etag": "W/\"0x8D64F91A9089879\"",
"properties": {
"allowUpdates": false,
"defaultVersion": "1"
}
},
{
"type": "Microsoft.Batch/batchAccounts/applications",
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app2",
"name": "app1",
"etag": "W/\"0x8D64F91A9089879\"",
"properties": {
"allowUpdates": false,
"defaultVersion": "2.0",
"displayName": "myAppName"
}
}
},
{
"type": "Microsoft.Batch/batchAccounts/applications",
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app2",
"name": "app1",
"etag": "W/\"0x8D64F91A9089879\"",
"properties": {
"allowUpdates": false,
"defaultVersion": "2.0",
"displayName": "myAppName"
}
}
]
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,30 @@
},
"responses": {
"200": {
"value": [
{
"type": "Microsoft.Batch/batchAccounts/applications/versions",
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1/versions/1.0",
"name": "1.0",
"etag": "W/\"0x8D64FF0B9F47F67\"",
"properties": {
"state": "Pending"
"body": {
"value": [
{
"type": "Microsoft.Batch/batchAccounts/applications/versions",
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1/versions/1.0",
"name": "1.0",
"etag": "W/\"0x8D64FF0B9F47F67\"",
"properties": {
"state": "Pending"
}
},
{
"type": "Microsoft.Batch/batchAccounts/applications/versions",
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1/versions/2.0",
"name": "2.0",
"etag": "W/\"0x8D64FF0B9F47F67\"",
"properties": {
"state": "Active",
"format": "zip",
"lastActivationTime": "2017-06-27T18:48:09.9330991Z"
}
}
},
{
"type": "Microsoft.Batch/batchAccounts/applications/versions",
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1/versions/2.0",
"name": "2.0",
"etag": "W/\"0x8D64FF0B9F47F67\"",
"properties": {
"state": "Active",
"format": "zip",
"lastActivationTime": "2017-06-27T18:48:09.9330991Z"
}
}
]
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,31 @@
},
"responses": {
"200": {
"value": [
{
"type": "Microsoft.Batch/batchAccounts/applications",
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1",
"name": "app1",
"etag": "W/\"0x8D64F91A9089879\"",
"properties": {
"allowUpdates": false,
"defaultVersion": "1"
"body": {
"value": [
{
"type": "Microsoft.Batch/batchAccounts/applications",
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1",
"name": "app1",
"etag": "W/\"0x8D64F91A9089879\"",
"properties": {
"allowUpdates": false,
"defaultVersion": "1"
}
},
{
"type": "Microsoft.Batch/batchAccounts/applications",
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app2",
"name": "app1",
"etag": "W/\"0x8D64F91A9089879\"",
"properties": {
"allowUpdates": false,
"defaultVersion": "2.0",
"displayName": "myAppName"
}
}
},
{
"type": "Microsoft.Batch/batchAccounts/applications",
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app2",
"name": "app1",
"etag": "W/\"0x8D64F91A9089879\"",
"properties": {
"allowUpdates": false,
"defaultVersion": "2.0",
"displayName": "myAppName"
}
}
]
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,30 @@
},
"responses": {
"200": {
"value": [
{
"type": "Microsoft.Batch/batchAccounts/applications/versions",
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1/versions/1.0",
"name": "1.0",
"etag": "W/\"0x8D64FF0B9F47F67\"",
"properties": {
"state": "Pending"
"body": {
"value": [
{
"type": "Microsoft.Batch/batchAccounts/applications/versions",
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1/versions/1.0",
"name": "1.0",
"etag": "W/\"0x8D64FF0B9F47F67\"",
"properties": {
"state": "Pending"
}
},
{
"type": "Microsoft.Batch/batchAccounts/applications/versions",
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1/versions/2.0",
"name": "2.0",
"etag": "W/\"0x8D64FF0B9F47F67\"",
"properties": {
"state": "Active",
"format": "zip",
"lastActivationTime": "2017-06-27T18:48:09.9330991Z"
}
}
},
{
"type": "Microsoft.Batch/batchAccounts/applications/versions",
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/applications/app1/versions/2.0",
"name": "2.0",
"etag": "W/\"0x8D64FF0B9F47F67\"",
"properties": {
"state": "Active",
"format": "zip",
"lastActivationTime": "2017-06-27T18:48:09.9330991Z"
}
}
]
]
}
}
}
}

0 comments on commit bc9c454

Please sign in to comment.