Skip to content

Commit

Permalink
Fixing S360 swagger issues
Browse files Browse the repository at this point in the history
  • Loading branch information
toddm committed Jul 15, 2021
1 parent ef5948b commit 1617206
Show file tree
Hide file tree
Showing 2 changed files with 213 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"parameters": {
"api-version": "2021-07-01",
"body": {
"sku": {
"name": "standard_D1"
},
"location": "westus",
"properties": {
"reservedResourceType": "VirtualMachines",
"billingScopeId": "/subscriptions/ed3a1871-612d-abcd-a849-c2542a68be83",
"term": "P1Y",
"billingPlan": "Monthly",
"quantity": 1,
"displayName": "TestReservationOrder",
"appliedScopes": null,
"appliedScopeType": "Shared",
"reservedResourceProperties": {
"instanceFlexibility": "On"
}
}
}
},
"responses": {
"200": {
"body": {
"properties": {
"billingCurrencyTotal": {
"currencyCode": "USD",
"amount": 46.0
},
"reservationOrderId": "6d9cec54-7de8-abcd-9de7-80f5d634f2d2",
"skuTitle": "Reserved VM Instance, Standard_D1, US West, 1 Year",
"skuDescription": "standard_D1",
"pricingCurrencyTotal": {
"currencyCode": "USD",
"amount": 46.0
},
"paymentSchedule": [
{
"dueDate": "2019-05-14",
"pricingCurrencyTotal": {
"currencyCode": "USD",
"amount": 46
},
"billingCurrencyTotal": {
"currencyCode": "EUR",
"amount": 40
}
},
{
"dueDate": "2019-06-14",
"pricingCurrencyTotal": {
"currencyCode": "USD",
"amount": 46
}
},
{
"dueDate": "2019-07-14",
"pricingCurrencyTotal": {
"currencyCode": "USD",
"amount": 46
}
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,43 @@
}
}
},
"/providers/Microsoft.Capacity/calculatePrice": {
"post": {
"summary": "Calculate price for a `ReservationOrder`.",
"description": "Calculate price for placing a `ReservationOrder`.",
"operationId": "ReservationOrder_Calculate",
"x-ms-examples": {
"Purchase": {
"$ref": "./examples/CalculateReservationOrder.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/PurchaseParameter"
}
],
"tags": [
"Reservation, Calculate"
],
"responses": {
"200": {
"description": "Detailed price info for purchasing `ReservationOrder`",
"schema": {
"$ref": "#/definitions/CalculatePriceResponse"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/providers/Microsoft.Capacity/reservationOrders": {
"get": {
"summary": "Get all `ReservationOrder`s.",
Expand Down Expand Up @@ -852,6 +889,18 @@
"$ref": "#/definitions/SkuProperty"
}
},
"msrp": {
"type": "object",
"readOnly": true,
"description": "Pricing information about the SKU",
"properties": {
"p1Y": {
"type": "object",
"$ref": "#/definitions/Price",
"description": "Amount in pricing currency. Tax not included."
}
}
},
"restrictions": {
"type": "array",
"readOnly": true,
Expand Down Expand Up @@ -1238,7 +1287,8 @@
"description": "Amount that Microsoft uses for record. Used during refund for calculating refund limit. Tax is not included. This is locked price 30 days before expiry.",
"properties": {
"currencyCode": {
"type": "string"
"type": "string",
"description": "The ISO 4217 3-letter currency code for the currency used by this purchase record."
},
"amount": {
"type": "number"
Expand All @@ -1250,7 +1300,8 @@
"description": "Currency and amount that customer will be charged in customer's local currency for renewal purchase. Tax is not included.",
"properties": {
"currencyCode": {
"type": "string"
"type": "string",
"description": "The ISO 4217 3-letter currency code for the currency used by this purchase record."
},
"amount": {
"type": "number"
Expand Down Expand Up @@ -1291,6 +1342,14 @@
"description": "The applied scope type",
"$ref": "#/definitions/AppliedScopeType"
},
"archived": {
"description": "Indicates if the reservation is archived",
"type": "boolean"
},
"capabilities": {
"description": "Capabilities of the reservation",
"type": "string"
},
"quantity": {
"description": "Quantity of the SKUs that are part of the Reservation.",
"$ref": "#/definitions/ReservationQuantity"
Expand Down Expand Up @@ -1882,6 +1941,88 @@
"name": "OperationStatus",
"modelAsString": true
}
},
"CalculatePriceResponse": {
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/CalculatePriceResponseProperties"
}
}
},
"CalculatePriceResponseProperties": {
"type": "object",
"properties": {
"billingCurrencyTotal": {
"type": "object",
"description": "Currency and amount that customer will be charged in customer's local currency. Tax is not included.",
"properties": {
"currencyCode": {
"type": "string",
"description": "The ISO 4217 3-letter currency code for the currency used by this purchase record."
},
"amount": {
"type": "number",
"description": "Amount in pricing currency. Tax is not included.",
"format": "double"
}
}
},
"netTotal": {
"type": "number",
"description": "Net total amount in pricing currency.",
"format": "double"
},
"taxTotal": {
"type": "number",
"description": "Tax amount in pricing currency.",
"format": "double"
},
"grandTotal": {
"type": "number",
"description": "Total amount in pricing currency.",
"format": "double"
},
"isTaxIncluded": {
"type": "boolean",
"description": "Whether or not tax is included in grand total"
},
"isBillingPartnerManaged": {
"description": "True if billing is managed by Microsoft Partner. Used only for CSP accounts.",
"type": "boolean"
},
"reservationOrderId": {
"description": "GUID that represents reservation order that can be placed after calculating price.",
"type": "string"
},
"skuTitle": {
"description": "Title of SKU that is being purchased.",
"type": "string"
},
"skuDescription": {
"description": "Description of SKU that is being purchased.",
"type": "string"
},
"pricingCurrencyTotal": {
"type": "object",
"description": "Amount that Microsoft uses for record. Used during refund for calculating refund limit. Tax is not included.",
"properties": {
"currencyCode": {
"type": "string",
"description": "The ISO 4217 3-letter currency code for the currency used by this purchase record."
},
"amount": {
"type": "number"
}
}
},
"paymentSchedule": {
"type": "array",
"items": {
"$ref": "#/definitions/PaymentDetail"
}
}
}
}
},
"parameters": {
Expand Down

0 comments on commit 1617206

Please sign in to comment.