From 7e0f5408fe4fa42660222ec1c5cca8ae9440afde Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 28 Jul 2019 16:14:32 -0400 Subject: [PATCH] fix: Batch model validation errors - Add body for RESPONSE_BODY_NOT_IN_EXAMPLE errors - active -> Active for state enum in 2017-09-01 examples --- .../examples/ApplicationCreate.json | 10 +-- .../2017-09-01/examples/ApplicationGet.json | 28 +++++---- .../2017-09-01/examples/ApplicationList.json | 62 ++++++++++--------- .../examples/ApplicationPackageCreate.json | 14 +++-- .../examples/ApplicationPackageGet.json | 12 ++-- .../2018-12-01/examples/ApplicationList.json | 46 +++++++------- .../examples/ApplicationPackageList.json | 44 ++++++------- .../2019-04-01/examples/ApplicationList.json | 46 +++++++------- .../examples/ApplicationPackageList.json | 44 ++++++------- 9 files changed, 162 insertions(+), 144 deletions(-) diff --git a/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationCreate.json b/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationCreate.json index 2b87440d8ab4..89fb6d3c7979 100644 --- a/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationCreate.json +++ b/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationCreate.json @@ -12,10 +12,12 @@ }, "responses": { "201": { - "id": "app1", - "displayName": "myAppName", - "packages": [], - "allowUpdates": false + "body": { + "id": "app1", + "displayName": "myAppName", + "packages": [], + "allowUpdates": false + } } } } diff --git a/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationGet.json b/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationGet.json index 8fce07113859..db70b7ad18ff 100644 --- a/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationGet.json +++ b/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationGet.json @@ -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" + } } } } diff --git a/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationList.json b/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationList.json index 5de3779857ae..1c14403fcb19 100644 --- a/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationList.json +++ b/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationList.json @@ -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" + } + ] + } } } } diff --git a/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationPackageCreate.json b/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationPackageCreate.json index 00377b4a8d2d..224da10d1979 100644 --- a/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationPackageCreate.json +++ b/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationPackageCreate.json @@ -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" + } } } } diff --git a/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationPackageGet.json b/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationPackageGet.json index a5c2e055a230..d679e8cf0d1a 100644 --- a/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationPackageGet.json +++ b/specification/batch/resource-manager/Microsoft.Batch/stable/2017-09-01/examples/ApplicationPackageGet.json @@ -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" + } } } } diff --git a/specification/batch/resource-manager/Microsoft.Batch/stable/2018-12-01/examples/ApplicationList.json b/specification/batch/resource-manager/Microsoft.Batch/stable/2018-12-01/examples/ApplicationList.json index b8f80d28dd2a..77096edde5f4 100644 --- a/specification/batch/resource-manager/Microsoft.Batch/stable/2018-12-01/examples/ApplicationList.json +++ b/specification/batch/resource-manager/Microsoft.Batch/stable/2018-12-01/examples/ApplicationList.json @@ -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" - } - } - ] + ] + } } } } diff --git a/specification/batch/resource-manager/Microsoft.Batch/stable/2018-12-01/examples/ApplicationPackageList.json b/specification/batch/resource-manager/Microsoft.Batch/stable/2018-12-01/examples/ApplicationPackageList.json index 7de526067116..4973ac65a524 100644 --- a/specification/batch/resource-manager/Microsoft.Batch/stable/2018-12-01/examples/ApplicationPackageList.json +++ b/specification/batch/resource-manager/Microsoft.Batch/stable/2018-12-01/examples/ApplicationPackageList.json @@ -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" - } - } - ] + ] + } } } } diff --git a/specification/batch/resource-manager/Microsoft.Batch/stable/2019-04-01/examples/ApplicationList.json b/specification/batch/resource-manager/Microsoft.Batch/stable/2019-04-01/examples/ApplicationList.json index 069f28aa4a9f..cb964eaa3188 100644 --- a/specification/batch/resource-manager/Microsoft.Batch/stable/2019-04-01/examples/ApplicationList.json +++ b/specification/batch/resource-manager/Microsoft.Batch/stable/2019-04-01/examples/ApplicationList.json @@ -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" - } - } - ] + ] + } } } } diff --git a/specification/batch/resource-manager/Microsoft.Batch/stable/2019-04-01/examples/ApplicationPackageList.json b/specification/batch/resource-manager/Microsoft.Batch/stable/2019-04-01/examples/ApplicationPackageList.json index fd3c2b8921f8..1edc0dafbc76 100644 --- a/specification/batch/resource-manager/Microsoft.Batch/stable/2019-04-01/examples/ApplicationPackageList.json +++ b/specification/batch/resource-manager/Microsoft.Batch/stable/2019-04-01/examples/ApplicationPackageList.json @@ -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" - } - } - ] + ] + } } } }