From 4f2bc48654727c4b22f6a756c5e092567f416960 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Tue, 26 Feb 2019 19:19:37 -0800 Subject: [PATCH 1/4] Add missing MarketplaceOrdering operations to swagger --- .../stable/2015-06-01/Agreements.json | 130 ++++++++++++++++++ 1 file changed, 130 insertions(+) diff --git a/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/Agreements.json b/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/Agreements.json index a2644211529e..929a80a21cd8 100644 --- a/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/Agreements.json +++ b/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/Agreements.json @@ -155,6 +155,136 @@ "nextLinkName": "nextLink" } } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}/sign": { + "put": { + "operationId": "MarketplaceAgreements_Sign", + "description": "Sign marketplace terms.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/PublishersParameter" + }, + { + "$ref": "#/parameters/OffersParameter" + }, + { + "$ref": "#/parameters/PlansParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request was successfully processed and the terms were accepted.", + "schema": { + "$ref": "#/definitions/AgreementTerms" + } + }, + "default": { + "description": "Microsoft.MarketplaceOrdering error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}/cancel": { + "put": { + "operationId": "MarketplaceAgreements_Cancel", + "description": "Cancel marketplace terms.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/PublishersParameter" + }, + { + "$ref": "#/parameters/OffersParameter" + }, + { + "$ref": "#/parameters/PlansParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request was successfully processed and the terms were rejected.", + "schema": { + "$ref": "#/definitions/AgreementTerms" + } + }, + "default": { + "description": "Microsoft.MarketplaceOrdering error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}": { + "get": { + "operationId": "MarketplaceAgreements_GetAgreement", + "description": "Get marketplace agreements.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/PublishersParameter" + }, + { + "$ref": "#/parameters/OffersParameter" + }, + { + "$ref": "#/parameters/PlansParameter" + } + ], + "responses": { + "200": { + "description": "Terms returned successfully", + "schema": { + "$ref": "#/definitions/AgreementTerms" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements": { + "get": { + "operationId": "MarketplaceAgreements_List", + "description": "List marketplace agreements.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Terms returned successfully", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AgreementTerms" + } + } + } + } + } } }, "parameters": { From 851a2e544919689237852f4cdc226e7919878658 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 1 Mar 2019 16:17:24 -0800 Subject: [PATCH 2/4] Add examples --- .../stable/2015-06-01/Agreements.json | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/Agreements.json b/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/Agreements.json index 929a80a21cd8..987f2de2d1bd 100644 --- a/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/Agreements.json +++ b/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/Agreements.json @@ -160,6 +160,11 @@ "put": { "operationId": "MarketplaceAgreements_Sign", "description": "Sign marketplace terms.", + "x-ms-examples": { + "SetMarketplaceTerms": { + "$ref": "./examples/SignMarketplaceTerms.json" + } + }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" @@ -197,6 +202,11 @@ "put": { "operationId": "MarketplaceAgreements_Cancel", "description": "Cancel marketplace terms.", + "x-ms-examples": { + "SetMarketplaceTerms": { + "$ref": "./examples/CancelMarketplaceTerms.json" + } + }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" @@ -234,6 +244,11 @@ "get": { "operationId": "MarketplaceAgreements_GetAgreement", "description": "Get marketplace agreements.", + "x-ms-examples": { + "SetMarketplaceTerms": { + "$ref": "./examples/GetAgreementMarketplaceTerms.json" + } + }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" @@ -265,6 +280,11 @@ "get": { "operationId": "MarketplaceAgreements_List", "description": "List marketplace agreements.", + "x-ms-examples": { + "SetMarketplaceTerms": { + "$ref": "./examples/ListMarketplaceTerms.json" + } + }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" From af3ce507e43ea67b1bc598ef00f1f214aa556f19 Mon Sep 17 00:00:00 2001 From: Zach Rathbun Date: Fri, 1 Mar 2019 16:18:05 -0800 Subject: [PATCH 3/4] Add example files --- .../examples/CancelMarketplaceTerms.json | 28 +++++++++++++++++++ .../GetAgreementMarketplaceTerms.json | 28 +++++++++++++++++++ .../examples/ListMarketplaceTerms.json | 25 +++++++++++++++++ .../examples/SignMarketplaceTerms.json | 28 +++++++++++++++++++ 4 files changed, 109 insertions(+) create mode 100644 specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/examples/CancelMarketplaceTerms.json create mode 100644 specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/examples/GetAgreementMarketplaceTerms.json create mode 100644 specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/examples/ListMarketplaceTerms.json create mode 100644 specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/examples/SignMarketplaceTerms.json diff --git a/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/examples/CancelMarketplaceTerms.json b/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/examples/CancelMarketplaceTerms.json new file mode 100644 index 000000000000..ac515ee654e9 --- /dev/null +++ b/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/examples/CancelMarketplaceTerms.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2016-04-01", + "subscriptionId": "subid", + "publisherId": "pubid", + "offerId": "offid", + "planId": "planid" + }, + "responses": { + "200": { + "body": { + "id": "id", + "name": "planid", + "type": "Microsoft.MarketplaceOrdering/offertypes", + "properties": { + "publisher": "pubid", + "product": "offid", + "plan": "planid", + "licenseTextLink": "test.licenseLink", + "privacyPolicyLink": "test.privacyPolicyLink", + "retrieveDatetime": "2017-08-15T11:33:07.12132Z", + "signature": "ASDFSDAFWEFASDGWERLWER", + "accepted": false + } + } + } + } +} \ No newline at end of file diff --git a/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/examples/GetAgreementMarketplaceTerms.json b/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/examples/GetAgreementMarketplaceTerms.json new file mode 100644 index 000000000000..792ac83dec9d --- /dev/null +++ b/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/examples/GetAgreementMarketplaceTerms.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2016-04-01", + "subscriptionId": "subid", + "publisherId": "pubid", + "offerId": "offid", + "planId": "planid" + }, + "responses": { + "200": { + "body": { + "id": "id", + "name": "planid", + "type": "Microsoft.MarketplaceOrdering/offertypes", + "properties": { + "publisher": "pubid", + "product": "offid", + "plan": "planid", + "licenseTextLink": "test.licenseLink", + "privacyPolicyLink": "test.privacyPolicyLink", + "retrieveDatetime": "2017-08-15T11:33:07.12132Z", + "signature": "ASDFSDAFWEFASDGWERLWER", + "accepted": true + } + } + } + } +} \ No newline at end of file diff --git a/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/examples/ListMarketplaceTerms.json b/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/examples/ListMarketplaceTerms.json new file mode 100644 index 000000000000..c6ce18a57e3a --- /dev/null +++ b/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/examples/ListMarketplaceTerms.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2016-04-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": [{ + "id": "id", + "name": "planid", + "type": "Microsoft.MarketplaceOrdering/offertypes", + "properties": { + "publisher": "pubid", + "product": "offid", + "plan": "planid", + "licenseTextLink": "test.licenseLink", + "privacyPolicyLink": "test.privacyPolicyLink", + "retrieveDatetime": "2017-08-15T11:33:07.12132Z", + "signature": "ASDFSDAFWEFASDGWERLWER", + "accepted": true + } + }] + } + } +} \ No newline at end of file diff --git a/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/examples/SignMarketplaceTerms.json b/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/examples/SignMarketplaceTerms.json new file mode 100644 index 000000000000..792ac83dec9d --- /dev/null +++ b/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/examples/SignMarketplaceTerms.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2016-04-01", + "subscriptionId": "subid", + "publisherId": "pubid", + "offerId": "offid", + "planId": "planid" + }, + "responses": { + "200": { + "body": { + "id": "id", + "name": "planid", + "type": "Microsoft.MarketplaceOrdering/offertypes", + "properties": { + "publisher": "pubid", + "product": "offid", + "plan": "planid", + "licenseTextLink": "test.licenseLink", + "privacyPolicyLink": "test.privacyPolicyLink", + "retrieveDatetime": "2017-08-15T11:33:07.12132Z", + "signature": "ASDFSDAFWEFASDGWERLWER", + "accepted": true + } + } + } + } +} \ No newline at end of file From fc54df16998b34ed493122f98c184b67444a6995 Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Mon, 4 Mar 2019 17:10:55 -0800 Subject: [PATCH 4/4] Apply suggestions from code review Clarify operation descriptions Co-Authored-By: zachraMSFT --- .../stable/2015-06-01/Agreements.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/Agreements.json b/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/Agreements.json index 987f2de2d1bd..6d432857774d 100644 --- a/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/Agreements.json +++ b/specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/Agreements.json @@ -243,7 +243,7 @@ "/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements/{publisherId}/offers/{offerId}/plans/{planId}": { "get": { "operationId": "MarketplaceAgreements_GetAgreement", - "description": "Get marketplace agreements.", + "description": "Get marketplace agreement.", "x-ms-examples": { "SetMarketplaceTerms": { "$ref": "./examples/GetAgreementMarketplaceTerms.json" @@ -279,7 +279,7 @@ "/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/agreements": { "get": { "operationId": "MarketplaceAgreements_List", - "description": "List marketplace agreements.", + "description": "List marketplace agreements in the subscription.", "x-ms-examples": { "SetMarketplaceTerms": { "$ref": "./examples/ListMarketplaceTerms.json" @@ -503,4 +503,4 @@ "x-ms-azure-resource": true } } -} \ No newline at end of file +}