Skip to content

Commit

Permalink
[Hub Generated] Review request for Microsoft.CostManagement to add ve…
Browse files Browse the repository at this point in the history
…rsion stable/2021-10-01 (Azure#18676)

* Adding common-types

u

u

u

* Adding common-types

u

u

u

u:x

* Fixing common-types ref in exports.json

* Fixing references and remove Resource definition

* Reverting changes to pricesheets

* Adding Operations_List example

* Adding example

* Reverting breaking change

* Reverting a breaking change and using ApiVersionParameter from
types.json

* Reverting api-version parameter change since that flagged as a breaking
change
  • Loading branch information
sri- authored Apr 16, 2022
1 parent fb31972 commit 77b4154
Show file tree
Hide file tree
Showing 5 changed files with 255 additions and 247 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"swagger": "2.0",
"info": {
"version": "2021-10-01",
"title": "Cost Management common types"
},
"paths": {},
"definitions": {
"ErrorResponse": {
"description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. \n\nSome Error responses: \n\n * 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the \"x-ms-ratelimit-microsoft.consumption-retry-after\" header. \n\n * 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the \"Retry-After\" header.",
"type": "object",
"properties": {
"error": {
"description": "The details of the error.",
"$ref": "#/definitions/ErrorDetails"
}
}
},
"ErrorDetails": {
"description": "The details of the error.",
"type": "object",
"properties": {
"code": {
"description": "Error code.",
"type": "string",
"readOnly": true
},
"message": {
"description": "Error message indicating why the operation failed.",
"type": "string",
"readOnly": true
}
}
},
"ProxyResource": {
"description": "The Resource model definition.",
"type": "object",
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "Resource Id."
},
"name": {
"readOnly": true,
"type": "string",
"description": "Resource name."
},
"type": {
"readOnly": true,
"type": "string",
"description": "Resource type."
},
"eTag": {
"type": "string",
"description": "eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not."
}
},
"x-ms-azure-resource": true
}
},
"parameters": {
"apiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "Version of the API to be used with the client request."
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"$ref": "#/parameters/scopeExportParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
"$ref": "common-types.json#/parameters/apiVersionParameter"
},
{
"name": "$expand",
Expand All @@ -88,7 +88,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
"$ref": "common-types.json#/definitions/ErrorResponse"
}
}
}
Expand Down Expand Up @@ -129,7 +129,7 @@
"$ref": "#/parameters/scopeExportParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
"$ref": "common-types.json#/parameters/apiVersionParameter"
},
{
"$ref": "#/parameters/exportNameParameter"
Expand All @@ -152,7 +152,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
"$ref": "common-types.json#/definitions/ErrorResponse"
}
}
}
Expand Down Expand Up @@ -191,7 +191,7 @@
"$ref": "#/parameters/scopeExportParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
"$ref": "common-types.json#/parameters/apiVersionParameter"
},
{
"$ref": "#/parameters/exportNameParameter"
Expand Down Expand Up @@ -222,7 +222,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
"$ref": "common-types.json#/definitions/ErrorResponse"
}
}
}
Expand Down Expand Up @@ -261,7 +261,7 @@
"$ref": "#/parameters/scopeExportParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
"$ref": "common-types.json#/parameters/apiVersionParameter"
},
{
"$ref": "#/parameters/exportNameParameter"
Expand All @@ -274,7 +274,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
"$ref": "common-types.json#/definitions/ErrorResponse"
}
}
}
Expand Down Expand Up @@ -315,7 +315,7 @@
"$ref": "#/parameters/scopeExportParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
"$ref": "common-types.json#/parameters/apiVersionParameter"
},
{
"$ref": "#/parameters/exportNameParameter"
Expand All @@ -328,7 +328,7 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
"$ref": "common-types.json#/definitions/ErrorResponse"
}
}
}
Expand Down Expand Up @@ -369,7 +369,7 @@
"$ref": "#/parameters/scopeExportParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
"$ref": "common-types.json#/parameters/apiVersionParameter"
},
{
"$ref": "#/parameters/exportNameParameter"
Expand All @@ -385,96 +385,14 @@
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
"$ref": "common-types.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"ErrorResponse": {
"description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. \n\nSome Error responses: \n\n * 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the \"x-ms-ratelimit-microsoft.consumption-retry-after\" header. \n\n * 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the \"Retry-After\" header.",
"type": "object",
"properties": {
"error": {
"description": "The details of the error.",
"$ref": "#/definitions/ErrorDetails"
}
}
},
"ErrorDetails": {
"description": "The details of the error.",
"type": "object",
"properties": {
"code": {
"description": "Error code.",
"type": "string",
"readOnly": true
},
"message": {
"description": "Error message indicating why the operation failed.",
"type": "string",
"readOnly": true
}
}
},
"Resource": {
"description": "The Resource model definition.",
"type": "object",
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "Resource Id."
},
"name": {
"readOnly": true,
"type": "string",
"description": "Resource name."
},
"type": {
"readOnly": true,
"type": "string",
"description": "Resource type."
},
"tags": {
"readOnly": true,
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Resource tags."
}
},
"x-ms-azure-resource": true
},
"ProxyResource": {
"description": "The Resource model definition.",
"type": "object",
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "Resource Id."
},
"name": {
"readOnly": true,
"type": "string",
"description": "Resource name."
},
"type": {
"readOnly": true,
"type": "string",
"description": "Resource type."
},
"eTag": {
"type": "string",
"description": "eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not."
}
},
"x-ms-azure-resource": true
},
"ExportListResult": {
"description": "Result of listing exports. It contains a list of available exports in the scope provided.",
"type": "object",
Expand All @@ -494,7 +412,7 @@
"type": "object",
"allOf": [
{
"$ref": "#/definitions/ProxyResource"
"$ref": "common-types.json#/definitions/ProxyResource"
}
],
"properties": {
Expand Down Expand Up @@ -781,7 +699,7 @@
"type": "object",
"allOf": [
{
"$ref": "#/definitions/ProxyResource"
"$ref": "common-types.json#/definitions/ProxyResource"
}
],
"properties": {
Expand Down Expand Up @@ -854,19 +772,12 @@
},
"error": {
"description": "The details of any error.",
"$ref": "#/definitions/ErrorDetails"
"$ref": "common-types.json#/definitions/ErrorDetails"
}
}
}
},
"parameters": {
"apiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "Version of the API to be used with the client request."
},
"scopeExportParameter": {
"name": "scope",
"in": "path",
Expand Down
Loading

0 comments on commit 77b4154

Please sign in to comment.