From 24ae6fdff80652b4a49a2468c6b9888a7166012c Mon Sep 17 00:00:00 2001 From: olrakovs <39234482+olrakovs@users.noreply.github.com> Date: Thu, 23 Apr 2020 10:42:18 +0300 Subject: [PATCH] [Hub Generated] Review request for Microsoft.Marketplace to add version stable/2020-01-01 (#9123) * addinfg input for swagger to sdk * Fixing lint errors * fixing model validation * R3021 - PathResrouceTypeNameCamelCase fix * fixing semantic * changing name * removing plans from offer * response to arm comments --- .../stable/2020-01-01/Marketplace.json | 117 +++++++++++------- .../examples/DeletePrivateStore.json | 2 +- .../examples/DeletePrivateStoreOffer.json | 4 +- .../2020-01-01/examples/GetPrivateStore.json | 13 +- .../examples/GetPrivateStoreOffer.json | 43 +++---- .../examples/GetPrivateStoreOffers.json | 78 +++++------- .../2020-01-01/examples/GetPrivateStores.json | 22 +++- .../examples/UpdatePrivateStore.json | 12 +- .../examples/UpdatePrivateStoreOffer.json | 57 ++++----- .../marketplace/resource-manager/readme.md | 11 +- 10 files changed, 196 insertions(+), 163 deletions(-) diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/Marketplace.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/Marketplace.json index 3614928252c9..89944456c4f9 100644 --- a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/Marketplace.json +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/Marketplace.json @@ -10,7 +10,7 @@ "https" ], "paths": { - "/providers/Microsoft.Marketplace/privateStores/{PrivateStoreId}/offers": { + "/providers/Microsoft.Marketplace/privateStores/{privateStoreId}/offers": { "parameters": [ { "$ref": "#/parameters/PrivateStoreIdParameter" @@ -52,13 +52,13 @@ } } }, - "/providers/Microsoft.Marketplace/privateStores/{PrivateStoreId}/offers/{OfferId}": { + "/providers/Microsoft.Marketplace/privateStores/{privateStoreId}/offers/{offerId}": { "parameters": [ { - "$ref": "#/parameters/OfferIdPathParameter" + "$ref": "#/parameters/PrivateStoreIdParameter" }, { - "$ref": "#/parameters/PrivateStoreIdParameter" + "$ref": "#/parameters/OfferIdPathParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -191,7 +191,7 @@ } } }, - "/providers/Microsoft.Marketplace/privateStores/{PrivateStoreId}": { + "/providers/Microsoft.Marketplace/privateStores/{privateStoreId}": { "parameters": [ { "$ref": "#/parameters/PrivateStoreIdParameter" @@ -213,7 +213,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/PrivateStoreProperties" + "$ref": "#/definitions/PrivateStore" } }, "default": { @@ -272,7 +272,7 @@ "in": "body", "name": "payload", "schema": { - "$ref": "#/definitions/PrivateStoreProperties" + "$ref": "#/definitions/PrivateStore" } } ], @@ -325,10 +325,11 @@ }, "parameters": { "PrivateStoreIdParameter": { - "name": "PrivateStoreId", + "name": "privateStoreId", "in": "path", "required": true, "type": "string", + "x-ms-parameter-location": "method", "description": "The store ID - must use the tenant ID" }, "ApiVersionParameter": { @@ -340,42 +341,14 @@ }, "OfferIdPathParameter": { "in": "path", - "name": "OfferId", + "name": "offerId", "type": "string", + "x-ms-parameter-location": "method", "required": true, "description": "The offer ID to update or delete" - }, - "offerObjectParameter": { - "in": "body", - "name": "offerObject", - "schema": { - "$ref": "#/definitions/offerSkuObject" - } } }, "definitions": { - "offerSkuObject": { - "type": "object", - "required": [ - "isAvailable" - ], - "properties": { - "isAvailable": { - "type": "boolean" - } - } - }, - "offerObject": { - "type": "object", - "required": [ - "isAvailable" - ], - "properties": { - "isAvailable": { - "type": "boolean" - } - } - }, "ErrorResponse": { "description": "Error response indicates Microsoft.Marketplace service is not able to process the incoming request. The reason is provided in the error message.", "type": "object", @@ -404,7 +377,7 @@ "value": { "type": "array", "items": { - "$ref": "#/definitions/PrivateStoreProperties" + "$ref": "#/definitions/PrivateStore" } }, "nextLink": { @@ -413,6 +386,22 @@ } } }, + "PrivateStore": { + "description": "The PrivateStore data structure.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/PrivateStoreProperties", + "description": "The PrivateStore data structure.", + "x-ms-client-flatten": true + } + } + }, "PrivateStoreProperties": { "description": "Describes the json payload on whether or not the private store is enabled for a given tenant", "type": "object", @@ -455,6 +444,22 @@ } }, "Offer": { + "description": "The privateStore offer data structure.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/OfferProperties", + "description": "The privateStore offer data structure.", + "x-ms-client-flatten": true + } + } + }, + "OfferProperties": { "type": "object", "properties": { "uniqueOfferId": { @@ -481,12 +486,15 @@ "description": "Private store unique id", "type": "string" }, - "plans": { - "type": "array", + "createdBy": { "readOnly": true, - "items": { - "$ref": "#/definitions/Plan" - } + "description": "Private store offer creator name", + "type": "string" + }, + "createdDate": { + "readOnly": true, + "description": "Private store offer created date", + "type": "string" }, "specificPlanIdsLimitation": { "description": "Plan ids limitation for this offer", @@ -560,6 +568,27 @@ "readOnly": true } } + }, + "Resource": { + "description": "An Azure resource.", + "properties": { + "id": { + "description": "The resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "The name of the resource.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "The type of the resource.", + "type": "string", + "readOnly": true + } + }, + "x-ms-azure-resource": true } }, "securityDefinitions": { diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/DeletePrivateStore.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/DeletePrivateStore.json index 8bc56777425c..3eb812f741c5 100644 --- a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/DeletePrivateStore.json +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/DeletePrivateStore.json @@ -1,6 +1,6 @@ { "parameters": { - "PrivateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", "api-version": "2020-01-01" }, "responses": { diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/DeletePrivateStoreOffer.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/DeletePrivateStoreOffer.json index 8939579051a0..f07d0b733688 100644 --- a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/DeletePrivateStoreOffer.json +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/DeletePrivateStoreOffer.json @@ -1,7 +1,7 @@ { "parameters": { - "PrivateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", - "OfferId": "marketplacetestthirdparty.md-test-third-party-2", + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "offerId": "marketplacetestthirdparty.md-test-third-party-2", "api-version": "2020-01-01" }, "responses": { diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/GetPrivateStore.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/GetPrivateStore.json index 9a4363e7764f..e2f45e7ac54f 100644 --- a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/GetPrivateStore.json +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/GetPrivateStore.json @@ -1,14 +1,19 @@ { "parameters": { - "PrivateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", "api-version": "2020-01-01" }, "responses": { "200": { "body": { - "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", - "availability": "enabled", - "eTag": "\"9301f4fd-0000-0100-0000-5e248b350345\"" + "id": "/providers/Microsoft.Marketplace/privateStores/a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "type": "Microsoft.Marketplace/privateStores", + "name": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "properties": { + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "availability": "enabled", + "eTag": "\"9301f4fd-0000-0100-0000-5e248b350345\"" + } } } } diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/GetPrivateStoreOffer.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/GetPrivateStoreOffer.json index 2695c6be26c3..951260a83750 100644 --- a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/GetPrivateStoreOffer.json +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/GetPrivateStoreOffer.json @@ -1,34 +1,29 @@ { "parameters": { - "PrivateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", - "OfferId": "marketplacetestthirdparty.md-test-third-party-2", + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "offerId": "marketplacetestthirdparty.md-test-third-party-2", "api-version": "2020-01-01" }, "responses": { "200": { "body": { - "uniqueOfferId": "marketplacetestthirdparty.md-test-third-party-2", - "offerDisplayName": "md-test-third-party-2", - "publisherDisplayName": "Marketplace Test Third Party", - "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", - "eTag": "\"9301f4fd-0000-0100-0000-5e248b350000\"", - "specificPlanIdsLimitation": [ - "0001", - "0002", - "0003" - ], - "plans": [ - { - "skuId": "0001", - "planId": "text-iq-deep-concept-analysis", - "planDisplayName": "Text IQ Deep Concept Analysis" - }, - { - "skuId": "0002", - "planId": "new-md-sku-4", - "planDisplayName": "New Medic Solution" - } - ] + "id": "/providers/Microsoft.Marketplace/privateStores/a0e28e55-90c4-41d8-8e34-bb7ef7775406/offers/marketplacetestthirdparty.md-test-third-party-2", + "type": "Microsoft.Marketplace/privateStores/offers", + "name": "marketplacetestthirdparty.md-test-third-party-2", + "properties": { + "uniqueOfferId": "marketplacetestthirdparty.md-test-third-party-2", + "offerDisplayName": "md-test-third-party-2", + "publisherDisplayName": "Marketplace Test Third Party", + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "eTag": "\"9301f4fd-0000-0100-0000-5e248b350000\"", + "specificPlanIdsLimitation": [ + "0001", + "0002", + "0003" + ], + "createdDate": "05/29/2015 5:50", + "createdBy": "test@microsoft.com" + } } } } diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/GetPrivateStoreOffers.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/GetPrivateStoreOffers.json index 48d67af2d602..2805dbb00d7c 100644 --- a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/GetPrivateStoreOffers.json +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/GetPrivateStoreOffers.json @@ -1,6 +1,6 @@ { "parameters": { - "PrivateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", "api-version": "2020-01-01" }, "responses": { @@ -9,51 +9,41 @@ "nextLink": "", "value": [ { - "uniqueOfferId": "marketplacetestthirdparty.md-test-third-party-2", - "offerDisplayName": "md-test-third-party-2", - "publisherDisplayName": "Marketplace Test Third Party", - "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", - "eTag": "\"9301f4fd-0000-0100-0000-5e248b350000\"", - "specificPlanIdsLimitation": [ - "0001", - "0002", - "0003" - ], - "plans": [ - { - "skuId": "0001", - "planId": "text-iq-deep-concept-analysis", - "planDisplayName": "Text IQ Deep Concept Analysis" - }, - { - "skuId": "0002", - "planId": "new-md-sku-4", - "planDisplayName": "New Medic Solution" - } - ] + "id": "/providers/Microsoft.Marketplace/privateStores/a0e28e55-90c4-41d8-8e34-bb7ef7775406/offers/marketplacetestthirdparty.md-test-third-party-2", + "type": "Microsoft.Marketplace/privateStores/offers", + "name": "marketplacetestthirdparty.md-test-third-party-2", + "properties": { + "uniqueOfferId": "marketplacetestthirdparty.md-test-third-party-2", + "offerDisplayName": "md-test-third-party-2", + "publisherDisplayName": "Marketplace Test Third Party", + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "eTag": "\"9301f4fd-0000-0100-0000-5e248b350000\"", + "specificPlanIdsLimitation": [ + "0001", + "0002", + "0003" + ], + "createdDate": "05/29/2015 5:50", + "createdBy": "test@microsoft.com" + } }, { - "uniqueOfferId": "marketplacetestthirdparty.md-test-third-party-3", - "offerDisplayName": "md-test-third-party-3", - "publisherDisplayName": "Marketplace Test Third Party", - "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", - "eTag": "\"9301f4fd-0000-0100-0304-5e248b350043\"", - "specificPlanIdsLimitation": [ - "0001", - "0002" - ], - "plans": [ - { - "skuId": "0001", - "planId": "test-planId", - "planDisplayName": "Test Plan Id" - }, - { - "skuId": "0001", - "planId": "new-md-sku-6", - "planDisplayName": "New Medic Solution Sixth Generation" - } - ] + "id": "/providers/Microsoft.Marketplace/privateStores/a0e28e55-90c4-41d8-8e34-bb7ef7775406/offers/marketplacetestthirdparty.md-test-third-party-3", + "type": "Microsoft.Marketplace/privateStores/offers", + "name": "marketplacetestthirdparty.md-test-third-party-2", + "properties": { + "uniqueOfferId": "marketplacetestthirdparty.md-test-third-party-3", + "offerDisplayName": "md-test-third-party-3", + "publisherDisplayName": "Marketplace Test Third Party", + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "eTag": "\"9301f4fd-0000-0100-0304-5e248b350043\"", + "specificPlanIdsLimitation": [ + "0001", + "0002" + ], + "createdDate": "05/29/2015 5:50", + "createdBy": "test@microsoft.com" + } } ] } diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/GetPrivateStores.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/GetPrivateStores.json index d9f26cc0e047..16988bb65256 100644 --- a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/GetPrivateStores.json +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/GetPrivateStores.json @@ -8,14 +8,24 @@ "nextLink": "", "value": [ { - "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", - "availability": "enabled", - "eTag": "\"9301f4fd-0000-0100-0000-5e248b350332\"" + "id": "/providers/Microsoft.Marketplace/privateStores/a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "type": "Microsoft.Marketplace/privateStores", + "name": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "properties": { + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "availability": "enabled", + "eTag": "\"9301f4fd-0000-0100-0000-5e248b350332\"" + } }, { - "privateStoreId": "f4528e55-98c4-4328-8e34-bb7ef7775345", - "availability": "disabled", - "eTag": "\"9301f4fd-0000-0100-0000-5e234b350345\"" + "id": "/providers/Microsoft.Marketplace/privateStores/f4528e55-98c4-4328-8e34-bb7ef7775345", + "type": "Microsoft.Marketplace/privateStores", + "name": "f4528e55-98c4-4328-8e34-bb7ef7775345", + "properties": { + "privateStoreId": "f4528e55-98c4-4328-8e34-bb7ef7775345", + "availability": "disabled", + "eTag": "\"9301f4fd-0000-0100-0000-5e234b350345\"" + } } ] } diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/UpdatePrivateStore.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/UpdatePrivateStore.json index 884633dcd1cc..35d6e2cd3bd2 100644 --- a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/UpdatePrivateStore.json +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/UpdatePrivateStore.json @@ -1,11 +1,13 @@ { "parameters": { - "PrivateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", "api-version": "2020-01-01", - "parameters": { - "properties": { - "availability": "disabled", - "eTag": "\"9301f4fd-0000-0100-0000-5e248b350345\"" + "PrivateStore": { + "parameters": { + "properties": { + "availability": "disabled", + "eTag": "\"9301f4fd-0000-0100-0000-5e248b350345\"" + } } } }, diff --git a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/UpdatePrivateStoreOffer.json b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/UpdatePrivateStoreOffer.json index f4f0d5285737..99ce60ce0ad2 100644 --- a/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/UpdatePrivateStoreOffer.json +++ b/specification/marketplace/resource-manager/Microsoft.Marketplace/stable/2020-01-01/examples/UpdatePrivateStoreOffer.json @@ -1,42 +1,39 @@ { "parameters": { - "PrivateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", - "OfferId": "marketplacetestthirdparty.md-test-third-party-2", + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "offerId": "marketplacetestthirdparty.md-test-third-party-2", "api-version": "2020-01-01", - "parameters": { - "properties": { - "specificPlanIdsLimitation": [ - "0001", - "0002" - ], - "eTag": "\"9301f4fd-0000-0100-0000-5e248b350666\"" + "Offer": { + "parameters": { + "properties": { + "specificPlanIdsLimitation": [ + "0001", + "0002" + ], + "eTag": "\"9301f4fd-0000-0100-0000-5e248b350666\"" + } } } }, "responses": { "200": { "body": { - "uniqueOfferId": "marketplacetestthirdparty.md-test-third-party-2", - "offerDisplayName": "md-test-third-party-2", - "publisherDisplayName": "Marketplace Test Third Party", - "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", - "eTag": "\"9301f4fd-0000-0100-0000-5e248b350666\"", - "specificPlanIdsLimitation": [ - "0001", - "0002" - ], - "plans": [ - { - "skuId": "0001", - "planId": "text-iq-deep-concept-analysis", - "planDisplayName": "Text IQ Deep Concept Analysis" - }, - { - "skuId": "0002", - "planId": "new-md-sku-4", - "planDisplayName": "New Medic Solution" - } - ] + "id": "/providers/Microsoft.Marketplace/privateStores/a0e28e55-90c4-41d8-8e34-bb7ef7775406/offers/marketplacetestthirdparty.md-test-third-party-2", + "type": "Microsoft.Marketplace/privateStores/offers", + "name": "marketplacetestthirdparty.md-test-third-party-2", + "properties": { + "uniqueOfferId": "marketplacetestthirdparty.md-test-third-party-2", + "offerDisplayName": "md-test-third-party-2", + "publisherDisplayName": "Marketplace Test Third Party", + "privateStoreId": "a0e28e55-90c4-41d8-8e34-bb7ef7775406", + "eTag": "\"9301f4fd-0000-0100-0000-5e248b350666\"", + "specificPlanIdsLimitation": [ + "0001", + "0002" + ], + "createdDate": "05/29/2015 5:50", + "createdBy": "test@microsoft.com" + } } } } diff --git a/specification/marketplace/resource-manager/readme.md b/specification/marketplace/resource-manager/readme.md index 028203ab4e6d..4796a969e8cf 100644 --- a/specification/marketplace/resource-manager/readme.md +++ b/specification/marketplace/resource-manager/readme.md @@ -22,14 +22,19 @@ To see additional help and options, run: ### Basic Information -Make an HTTPs request from Ibiza to the endpoint in order to get the check if user is private or not +These are the global settings for the Marketplace API. + +``` yaml +openapi-type: arm +tag: package-2020-01-01 +``` ### Tag: package-2019-12-01 These settings apply only when `--tag=package-2019-12-01` is specified on the command line. -```yaml $(tag) == 'package-2019-12-01' +``` yaml $(tag) == 'package-2019-12-01' input-file: - Microsoft.Marketplace/stable/2019-12-01/Marketplace.json ``` @@ -38,7 +43,7 @@ input-file: These settings apply only when `--tag=package-2020-01-01` is specified on the command line. -```yaml $(tag) == 'package-2020-01-01' +``` yaml $(tag) == 'package-2020-01-01' input-file: - Microsoft.Marketplace/stable/2020-01-01/Marketplace.json ```