Skip to content

Commit

Permalink
Added Response Schema for Runbook Operation (#21128)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
sushil490023 and Sushil Upadhyay authored Nov 3, 2022
1 parent e8b959d commit 00ea1cd
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
"202": {
"headers": {
"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"
},
"body": {}
}
},
"200": {}
"200": {
"body": {}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"api-version": "2018-06-30"
},
"responses": {
"200": {}
"200": {
"body": {}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"creationTime": "2017-03-30T21:01:33.777+00:00",
"lastModifiedBy": "[email protected]",
"lastModifiedTime": "2017-03-30T21:01:39.45+00:00"
}
},
"body": {}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"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"
}
},
"200": {}
"200": {
"body": {}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"api-version": "2022-08-08"
},
"responses": {
"200": {}
"200": {
"body": {}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
"in": "path",
"required": true,
"type": "string",
"description": "The runbook name."
"description": "The runbook name.",
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
},
{
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -122,7 +123,8 @@
"in": "path",
"required": true,
"type": "string",
"description": "The runbook name."
"description": "The runbook name.",
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
},
{
"name": "runbookContent",
Expand All @@ -140,7 +142,10 @@
],
"responses": {
"200": {
"description": "OK"
"description": "OK",
"schema": {
"type": "file"
}
},
"202": {
"description": "Accepted and the operation will complete asynchronously.",
Expand All @@ -160,7 +165,7 @@
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
"final-state-via": "azure-async-operation"
}
}
},
Expand Down Expand Up @@ -194,7 +199,8 @@
"in": "path",
"required": true,
"type": "string",
"description": "The runbook name."
"description": "The runbook name.",
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
},
{
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -246,7 +252,8 @@
"in": "path",
"required": true,
"type": "string",
"description": "The parameters supplied to the publish runbook operation."
"description": "The parameters supplied to the publish runbook operation.",
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
},
{
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -302,15 +309,19 @@
"in": "path",
"required": true,
"type": "string",
"description": "The runbook name."
"description": "The runbook name.",
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
},
{
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK"
"description": "OK",
"schema": {
"$ref": "#/definitions/RunbookDraftUndoEditResult"
}
},
"default": {
"description": "Automation error response describing why the operation failed.",
Expand Down Expand Up @@ -354,7 +365,8 @@
"in": "path",
"required": true,
"type": "string",
"description": "The runbook name."
"description": "The runbook name.",
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
},
{
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -406,7 +418,8 @@
"in": "path",
"required": true,
"type": "string",
"description": "The runbook name."
"description": "The runbook name.",
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
},
{
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -459,7 +472,8 @@
"in": "path",
"required": true,
"type": "string",
"description": "The runbook name."
"description": "The runbook name.",
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
},
{
"name": "parameters",
Expand Down Expand Up @@ -524,7 +538,8 @@
"in": "path",
"required": true,
"type": "string",
"description": "The runbook name."
"description": "The runbook name.",
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
},
{
"name": "parameters",
Expand Down Expand Up @@ -583,7 +598,8 @@
"in": "path",
"required": true,
"type": "string",
"description": "The runbook name."
"description": "The runbook name.",
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
},
{
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -683,7 +699,8 @@
"in": "path",
"required": true,
"type": "string",
"description": "The runbook name."
"description": "The runbook name.",
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
},
{
"name": "jobStreamId",
Expand Down Expand Up @@ -742,7 +759,8 @@
"in": "path",
"required": true,
"type": "string",
"description": "The runbook name."
"description": "The runbook name.",
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
},
{
"name": "$filter",
Expand Down Expand Up @@ -804,7 +822,8 @@
"in": "path",
"required": true,
"type": "string",
"description": "The parameters supplied to the create test job operation."
"description": "The parameters supplied to the create test job operation.",
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
},
{
"name": "parameters",
Expand Down Expand Up @@ -863,7 +882,8 @@
"in": "path",
"required": true,
"type": "string",
"description": "The runbook name."
"description": "The runbook name.",
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
},
{
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -915,7 +935,8 @@
"in": "path",
"required": true,
"type": "string",
"description": "The runbook name."
"description": "The runbook name.",
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
},
{
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -964,7 +985,8 @@
"in": "path",
"required": true,
"type": "string",
"description": "The runbook name."
"description": "The runbook name.",
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
},
{
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -1013,7 +1035,8 @@
"in": "path",
"required": true,
"type": "string",
"description": "The runbook name."
"description": "The runbook name.",
"pattern": "^[a-zA-Z]*-*[a-zA-Z0-9]*$"
},
{
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
Expand All @@ -1035,6 +1058,7 @@
},
"definitions": {
"JobStream": {
"type": "object",
"properties": {
"id": {
"type": "string",
Expand All @@ -1049,6 +1073,7 @@
"description": "Definition of the job stream."
},
"JobStreamProperties": {
"type": "object",
"properties": {
"jobStreamId": {
"type": "string",
Expand Down Expand Up @@ -1097,6 +1122,7 @@
"description": "Definition of the job stream."
},
"JobStreamListResult": {
"type": "object",
"properties": {
"value": {
"type": "array",
Expand Down Expand Up @@ -1149,6 +1175,7 @@
"description": "Definition of the content link."
},
"RunbookProperties": {
"type": "object",
"properties": {
"runbookType": {
"type": "string",
Expand Down Expand Up @@ -1256,6 +1283,7 @@
"description": "Definition of the runbook property type."
},
"Runbook": {
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/RunbookProperties",
Expand All @@ -1275,6 +1303,7 @@
"description": "Definition of the runbook type."
},
"RunbookListResult": {
"type": "object",
"properties": {
"value": {
"type": "array",
Expand All @@ -1291,6 +1320,7 @@
"description": "The response model for the list runbook operation."
},
"RunbookCreateOrUpdateProperties": {
"type": "object",
"properties": {
"logVerbose": {
"type": "boolean",
Expand Down Expand Up @@ -1342,6 +1372,7 @@
"description": "The parameters supplied to the create or update runbook properties."
},
"RunbookCreateOrUpdateParameters": {
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/RunbookCreateOrUpdateProperties",
Expand Down Expand Up @@ -1370,6 +1401,7 @@
"description": "The parameters supplied to the create or update runbook operation."
},
"RunbookUpdateProperties": {
"type": "object",
"properties": {
"description": {
"type": "string",
Expand All @@ -1392,6 +1424,7 @@
"description": "The parameters supplied to the update runbook properties."
},
"RunbookUpdateParameters": {
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/RunbookUpdateProperties",
Expand All @@ -1417,6 +1450,7 @@
"description": "The parameters supplied to the update runbook operation."
},
"RunbookDraftUndoEditResult": {
"type": "object",
"properties": {
"statusCode": {
"type": "string",
Expand Down Expand Up @@ -1481,6 +1515,7 @@
"description": "The response model for the undo edit runbook operation."
},
"RunbookDraft": {
"type": "object",
"properties": {
"inEdit": {
"type": "boolean",
Expand Down Expand Up @@ -1519,6 +1554,7 @@
}
},
"RunbookParameter": {
"type": "object",
"properties": {
"type": {
"type": "string",
Expand All @@ -1541,6 +1577,7 @@
"description": "Definition of the runbook parameter type."
},
"TestJobCreateParameters": {
"type": "object",
"properties": {
"parameters": {
"type": "object",
Expand All @@ -1557,6 +1594,7 @@
"description": "The parameters supplied to the create test job operation."
},
"TestJob": {
"type": "object",
"x-ms-mutability": [
"read",
"create"
Expand Down Expand Up @@ -1624,6 +1662,7 @@
"description": "Definition of the test job."
},
"RunbookCreateOrUpdateDraftProperties": {
"type": "object",
"properties": {
"logVerbose": {
"type": "boolean",
Expand Down Expand Up @@ -1672,6 +1711,7 @@
"description": "The parameters supplied to the create or update draft runbook properties."
},
"RunbookCreateOrUpdateDraftParameters": {
"type": "object",
"properties": {
"runbookContent": {
"type": "string",
Expand Down
Loading

0 comments on commit 00ea1cd

Please sign in to comment.