Skip to content

Commit b308b43

Browse files
sushil490023Sushil Upadhyay
authored andcommitted
Added Response Schema for Runbook Operation (Azure#21128)
* Added Response Schema for Runbook Operation * Update resopnse of Runbook Operation * Updated example to fix Avacado errors * Update resopnse of Runbook Operation * Updated example to fix Avacado errors * Fix Lint diff errors * Fix Avacado errors * Fix Avacado errors Co-authored-by: Sushil Upadhyay <[email protected]>
1 parent ed02179 commit b308b43

File tree

7 files changed

+78
-30
lines changed

7 files changed

+78
-30
lines changed

specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/replaceRunbookDraftContent.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
"202": {
1212
"headers": {
1313
"Location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks/Get-AzureVMTutorial/draft/content/operationResults/9bd70be2-cf73-49b4-9467-5261d48c2b3d?api-version=2015-10-31"
14-
},
15-
"body": {}
14+
}
1615
},
17-
"200": {}
16+
"200": {
17+
"body": {}
18+
}
1819
}
1920
}

specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/undoDraftEditToLastKnownPublishedState.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
"api-version": "2018-06-30"
88
},
99
"responses": {
10-
"200": {}
10+
"200": {
11+
"body": {}
12+
}
1113
}
1214
}

specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/updateRunbook.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"creationTime": "2017-03-30T21:01:33.777+00:00",
4040
"lastModifiedBy": "[email protected]",
4141
"lastModifiedTime": "2017-03-30T21:01:39.45+00:00"
42-
}
42+
},
43+
"body": {}
4344
}
4445
}
4546
}

specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/replaceRunbookDraftContent.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
"Location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/runbooks/Get-AzureVMTutorial/draft/content/operationResults/9bd70be2-cf73-49b4-9467-5261d48c2b3d?api-version=2019-06-01"
1414
}
1515
},
16-
"200": {}
16+
"200": {
17+
"body": {}
18+
}
1719
}
1820
}

specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/undoDraftEditToLastKnownPublishedState.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
"api-version": "2022-08-08"
88
},
99
"responses": {
10-
"200": {}
10+
"200": {
11+
"body": {}
12+
}
1113
}
1214
}

specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/runbook.json

Lines changed: 60 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
"in": "path",
7070
"required": true,
7171
"type": "string",
72-
"description": "The runbook name."
72+
"description": "The runbook name.",
73+
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
7374
},
7475
{
7576
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
@@ -122,7 +123,8 @@
122123
"in": "path",
123124
"required": true,
124125
"type": "string",
125-
"description": "The runbook name."
126+
"description": "The runbook name.",
127+
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
126128
},
127129
{
128130
"name": "runbookContent",
@@ -140,7 +142,10 @@
140142
],
141143
"responses": {
142144
"200": {
143-
"description": "OK"
145+
"description": "OK",
146+
"schema": {
147+
"type": "file"
148+
}
144149
},
145150
"202": {
146151
"description": "Accepted and the operation will complete asynchronously.",
@@ -160,7 +165,7 @@
160165
},
161166
"x-ms-long-running-operation": true,
162167
"x-ms-long-running-operation-options": {
163-
"final-state-via": "location"
168+
"final-state-via": "azure-async-operation"
164169
}
165170
}
166171
},
@@ -194,7 +199,8 @@
194199
"in": "path",
195200
"required": true,
196201
"type": "string",
197-
"description": "The runbook name."
202+
"description": "The runbook name.",
203+
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
198204
},
199205
{
200206
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
@@ -246,7 +252,8 @@
246252
"in": "path",
247253
"required": true,
248254
"type": "string",
249-
"description": "The parameters supplied to the publish runbook operation."
255+
"description": "The parameters supplied to the publish runbook operation.",
256+
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
250257
},
251258
{
252259
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
@@ -302,15 +309,19 @@
302309
"in": "path",
303310
"required": true,
304311
"type": "string",
305-
"description": "The runbook name."
312+
"description": "The runbook name.",
313+
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
306314
},
307315
{
308316
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
309317
}
310318
],
311319
"responses": {
312320
"200": {
313-
"description": "OK"
321+
"description": "OK",
322+
"schema": {
323+
"$ref": "#/definitions/RunbookDraftUndoEditResult"
324+
}
314325
},
315326
"default": {
316327
"description": "Automation error response describing why the operation failed.",
@@ -354,7 +365,8 @@
354365
"in": "path",
355366
"required": true,
356367
"type": "string",
357-
"description": "The runbook name."
368+
"description": "The runbook name.",
369+
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
358370
},
359371
{
360372
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
@@ -406,7 +418,8 @@
406418
"in": "path",
407419
"required": true,
408420
"type": "string",
409-
"description": "The runbook name."
421+
"description": "The runbook name.",
422+
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
410423
},
411424
{
412425
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
@@ -459,7 +472,8 @@
459472
"in": "path",
460473
"required": true,
461474
"type": "string",
462-
"description": "The runbook name."
475+
"description": "The runbook name.",
476+
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
463477
},
464478
{
465479
"name": "parameters",
@@ -524,7 +538,8 @@
524538
"in": "path",
525539
"required": true,
526540
"type": "string",
527-
"description": "The runbook name."
541+
"description": "The runbook name.",
542+
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
528543
},
529544
{
530545
"name": "parameters",
@@ -583,7 +598,8 @@
583598
"in": "path",
584599
"required": true,
585600
"type": "string",
586-
"description": "The runbook name."
601+
"description": "The runbook name.",
602+
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
587603
},
588604
{
589605
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
@@ -683,7 +699,8 @@
683699
"in": "path",
684700
"required": true,
685701
"type": "string",
686-
"description": "The runbook name."
702+
"description": "The runbook name.",
703+
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
687704
},
688705
{
689706
"name": "jobStreamId",
@@ -742,7 +759,8 @@
742759
"in": "path",
743760
"required": true,
744761
"type": "string",
745-
"description": "The runbook name."
762+
"description": "The runbook name.",
763+
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
746764
},
747765
{
748766
"name": "$filter",
@@ -804,7 +822,8 @@
804822
"in": "path",
805823
"required": true,
806824
"type": "string",
807-
"description": "The parameters supplied to the create test job operation."
825+
"description": "The parameters supplied to the create test job operation.",
826+
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
808827
},
809828
{
810829
"name": "parameters",
@@ -863,7 +882,8 @@
863882
"in": "path",
864883
"required": true,
865884
"type": "string",
866-
"description": "The runbook name."
885+
"description": "The runbook name.",
886+
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
867887
},
868888
{
869889
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
@@ -915,7 +935,8 @@
915935
"in": "path",
916936
"required": true,
917937
"type": "string",
918-
"description": "The runbook name."
938+
"description": "The runbook name.",
939+
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
919940
},
920941
{
921942
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
@@ -964,7 +985,8 @@
964985
"in": "path",
965986
"required": true,
966987
"type": "string",
967-
"description": "The runbook name."
988+
"description": "The runbook name.",
989+
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
968990
},
969991
{
970992
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
@@ -1013,7 +1035,8 @@
10131035
"in": "path",
10141036
"required": true,
10151037
"type": "string",
1016-
"description": "The runbook name."
1038+
"description": "The runbook name.",
1039+
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
10171040
},
10181041
{
10191042
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
@@ -1035,6 +1058,7 @@
10351058
},
10361059
"definitions": {
10371060
"JobStream": {
1061+
"type": "object",
10381062
"properties": {
10391063
"id": {
10401064
"type": "string",
@@ -1049,6 +1073,7 @@
10491073
"description": "Definition of the job stream."
10501074
},
10511075
"JobStreamProperties": {
1076+
"type": "object",
10521077
"properties": {
10531078
"jobStreamId": {
10541079
"type": "string",
@@ -1097,6 +1122,7 @@
10971122
"description": "Definition of the job stream."
10981123
},
10991124
"JobStreamListResult": {
1125+
"type": "object",
11001126
"properties": {
11011127
"value": {
11021128
"type": "array",
@@ -1149,6 +1175,7 @@
11491175
"description": "Definition of the content link."
11501176
},
11511177
"RunbookProperties": {
1178+
"type": "object",
11521179
"properties": {
11531180
"runbookType": {
11541181
"type": "string",
@@ -1256,6 +1283,7 @@
12561283
"description": "Definition of the runbook property type."
12571284
},
12581285
"Runbook": {
1286+
"type": "object",
12591287
"properties": {
12601288
"properties": {
12611289
"$ref": "#/definitions/RunbookProperties",
@@ -1275,6 +1303,7 @@
12751303
"description": "Definition of the runbook type."
12761304
},
12771305
"RunbookListResult": {
1306+
"type": "object",
12781307
"properties": {
12791308
"value": {
12801309
"type": "array",
@@ -1291,6 +1320,7 @@
12911320
"description": "The response model for the list runbook operation."
12921321
},
12931322
"RunbookCreateOrUpdateProperties": {
1323+
"type": "object",
12941324
"properties": {
12951325
"logVerbose": {
12961326
"type": "boolean",
@@ -1342,6 +1372,7 @@
13421372
"description": "The parameters supplied to the create or update runbook properties."
13431373
},
13441374
"RunbookCreateOrUpdateParameters": {
1375+
"type": "object",
13451376
"properties": {
13461377
"properties": {
13471378
"$ref": "#/definitions/RunbookCreateOrUpdateProperties",
@@ -1370,6 +1401,7 @@
13701401
"description": "The parameters supplied to the create or update runbook operation."
13711402
},
13721403
"RunbookUpdateProperties": {
1404+
"type": "object",
13731405
"properties": {
13741406
"description": {
13751407
"type": "string",
@@ -1392,6 +1424,7 @@
13921424
"description": "The parameters supplied to the update runbook properties."
13931425
},
13941426
"RunbookUpdateParameters": {
1427+
"type": "object",
13951428
"properties": {
13961429
"properties": {
13971430
"$ref": "#/definitions/RunbookUpdateProperties",
@@ -1417,6 +1450,7 @@
14171450
"description": "The parameters supplied to the update runbook operation."
14181451
},
14191452
"RunbookDraftUndoEditResult": {
1453+
"type": "object",
14201454
"properties": {
14211455
"statusCode": {
14221456
"type": "string",
@@ -1481,6 +1515,7 @@
14811515
"description": "The response model for the undo edit runbook operation."
14821516
},
14831517
"RunbookDraft": {
1518+
"type": "object",
14841519
"properties": {
14851520
"inEdit": {
14861521
"type": "boolean",
@@ -1519,6 +1554,7 @@
15191554
}
15201555
},
15211556
"RunbookParameter": {
1557+
"type": "object",
15221558
"properties": {
15231559
"type": {
15241560
"type": "string",
@@ -1541,6 +1577,7 @@
15411577
"description": "Definition of the runbook parameter type."
15421578
},
15431579
"TestJobCreateParameters": {
1580+
"type": "object",
15441581
"properties": {
15451582
"parameters": {
15461583
"type": "object",
@@ -1557,6 +1594,7 @@
15571594
"description": "The parameters supplied to the create test job operation."
15581595
},
15591596
"TestJob": {
1597+
"type": "object",
15601598
"x-ms-mutability": [
15611599
"read",
15621600
"create"
@@ -1624,6 +1662,7 @@
16241662
"description": "Definition of the test job."
16251663
},
16261664
"RunbookCreateOrUpdateDraftProperties": {
1665+
"type": "object",
16271666
"properties": {
16281667
"logVerbose": {
16291668
"type": "boolean",
@@ -1672,6 +1711,7 @@
16721711
"description": "The parameters supplied to the create or update draft runbook properties."
16731712
},
16741713
"RunbookCreateOrUpdateDraftParameters": {
1714+
"type": "object",
16751715
"properties": {
16761716
"runbookContent": {
16771717
"type": "string",

0 commit comments

Comments
 (0)