Skip to content

Commit 2c3e339

Browse files
meirloichterkayousef
authored andcommitted
[S360 fix] update Agreements.json to reflect the current api (Azure#21844)
* update Agreements.json to reflect the current api * fix prettier issues * fix prettier issues
1 parent 3372cd7 commit 2c3e339

File tree

7 files changed

+115
-57
lines changed

7 files changed

+115
-57
lines changed

specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2021-01-01/Agreements.json

Lines changed: 72 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
"200": {
198198
"description": "OK. The request was successfully processed and the terms were accepted.",
199199
"schema": {
200-
"$ref": "#/definitions/AgreementTerms"
200+
"$ref": "#/definitions/OldAgreementTerms"
201201
}
202202
},
203203
"default": {
@@ -239,7 +239,7 @@
239239
"200": {
240240
"description": "OK. The request was successfully processed and the terms were rejected.",
241241
"schema": {
242-
"$ref": "#/definitions/AgreementTerms"
242+
"$ref": "#/definitions/OldAgreementTerms"
243243
}
244244
},
245245
"default": {
@@ -281,7 +281,7 @@
281281
"200": {
282282
"description": "Terms returned successfully",
283283
"schema": {
284-
"$ref": "#/definitions/AgreementTerms"
284+
"$ref": "#/definitions/OldAgreementTerms"
285285
}
286286
},
287287
"default": {
@@ -314,10 +314,7 @@
314314
"200": {
315315
"description": "Terms returned successfully",
316316
"schema": {
317-
"type": "array",
318-
"items": {
319-
"$ref": "#/definitions/AgreementTerms"
320-
}
317+
"$ref": "#/definitions/OldAgreementTermsList"
321318
}
322319
},
323320
"default": {
@@ -448,6 +445,74 @@
448445
},
449446
"description": "Agreement Terms definition"
450447
},
448+
"OldAgreementTermsList": {
449+
"description": "Agreement Terms definition list",
450+
"type": "object",
451+
"properties": {
452+
"value": {
453+
"type": "array",
454+
"items": {
455+
"$ref": "#/definitions/OldAgreementTerms"
456+
}
457+
}
458+
}
459+
},
460+
"OldAgreementTerms": {
461+
"type": "object",
462+
"properties": {
463+
"properties": {
464+
"$ref": "#/definitions/OldAgreementProperties",
465+
"description": "Represents the properties of the resource.",
466+
"x-ms-client-flatten": true
467+
}
468+
},
469+
"allOf": [
470+
{
471+
"$ref": "#/definitions/Resource"
472+
}
473+
],
474+
"description": "Terms properties for provided Publisher/Offer/Plan tuple"
475+
},
476+
"OldAgreementProperties": {
477+
"type": "object",
478+
"properties": {
479+
"id": {
480+
"type": "string",
481+
"description": "A unique identifier of the agreement."
482+
},
483+
"publisher": {
484+
"type": "string",
485+
"description": "Publisher identifier string of image being deployed."
486+
},
487+
"offer": {
488+
"type": "string",
489+
"description": "Offer identifier string of image being deployed."
490+
},
491+
"signDate": {
492+
"type": "string",
493+
"format": "date-time",
494+
"description": "Date and time in UTC of when the terms were accepted. This is empty if state is cancelled."
495+
},
496+
"cancelDate": {
497+
"type": "string",
498+
"format": "date-time",
499+
"description": "Date and time in UTC of when the terms were cancelled. This is empty if state is active."
500+
},
501+
"state": {
502+
"type": "string",
503+
"enum": [
504+
"Active",
505+
"Canceled"
506+
],
507+
"description": "Whether the agreement is active or cancelled",
508+
"x-ms-enum": {
509+
"name": "state",
510+
"modelAsString": true
511+
}
512+
}
513+
},
514+
"description": "Old Agreement Terms definition"
515+
},
451516
"ErrorResponse": {
452517
"description": "Error response indicates Microsoft.MarketplaceOrdering service is not able to process the incoming request. The reason is provided in the error message.",
453518
"type": "object",

specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2021-01-01/examples/CancelMarketplaceTerms.json

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"parameters": {
3-
"api-version": "2016-04-01",
3+
"api-version": "2021-01-01",
44
"subscriptionId": "subid",
55
"publisherId": "pubid",
66
"offerId": "offid",
@@ -11,17 +11,12 @@
1111
"body": {
1212
"id": "id",
1313
"name": "planid",
14-
"type": "Microsoft.MarketplaceOrdering/offertypes",
14+
"type": "Microsoft.MarketplaceOrdering/agreements",
1515
"properties": {
1616
"publisher": "pubid",
17-
"product": "offid",
18-
"plan": "planid",
19-
"licenseTextLink": "test.licenseLink",
20-
"privacyPolicyLink": "test.privacyPolicyLink",
21-
"marketplaceTermsLink": "test.marketplaceTermsLink",
22-
"retrieveDatetime": "2017-08-15T11:33:07.12132Z",
23-
"signature": "ASDFSDAFWEFASDGWERLWER",
24-
"accepted": false
17+
"offer": "offid",
18+
"cancelDate": "2021-11-14T16:21:43.6945196Z",
19+
"state": "Canceled"
2520
}
2621
}
2722
}

specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2021-01-01/examples/GetAgreementMarketplaceTerms.json

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"parameters": {
3-
"api-version": "2016-04-01",
3+
"api-version": "2021-01-01",
44
"subscriptionId": "subid",
55
"publisherId": "pubid",
66
"offerId": "offid",
@@ -11,17 +11,12 @@
1111
"body": {
1212
"id": "id",
1313
"name": "planid",
14-
"type": "Microsoft.MarketplaceOrdering/offertypes",
14+
"type": "Microsoft.MarketplaceOrdering/agreements",
1515
"properties": {
1616
"publisher": "pubid",
17-
"product": "offid",
18-
"plan": "planid",
19-
"licenseTextLink": "test.licenseLink",
20-
"privacyPolicyLink": "test.privacyPolicyLink",
21-
"marketplaceTermsLink": "test.marketplaceTermsLink",
22-
"retrieveDatetime": "2017-08-15T11:33:07.12132Z",
23-
"signature": "ASDFSDAFWEFASDGWERLWER",
24-
"accepted": true
17+
"offer": "offid",
18+
"signDate": "2022-12-07T13:30:23.0665141Z",
19+
"state": "Active"
2520
}
2621
}
2722
}

specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2021-01-01/examples/GetMarketplaceTerms.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"parameters": {
3-
"api-version": "2016-04-01",
3+
"api-version": "2021-01-01",
44
"subscriptionId": "subid",
55
"offerType": "virtualmachine",
66
"publisherId": "pubid",
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,36 @@
11
{
22
"parameters": {
3-
"api-version": "2016-04-01",
3+
"api-version": "2021-01-01",
44
"subscriptionId": "subid"
55
},
66
"responses": {
77
"200": {
8-
"body": [
9-
{
10-
"id": "id",
11-
"name": "planid",
12-
"type": "Microsoft.MarketplaceOrdering/offertypes",
13-
"properties": {
14-
"publisher": "pubid",
15-
"product": "offid",
16-
"plan": "planid",
17-
"licenseTextLink": "test.licenseLink",
18-
"privacyPolicyLink": "test.privacyPolicyLink",
19-
"marketplaceTermsLink": "test.marketplaceTermsLink",
20-
"retrieveDatetime": "2017-08-15T11:33:07.12132Z",
21-
"signature": "ASDFSDAFWEFASDGWERLWER",
22-
"accepted": true
8+
"body": {
9+
"value": [
10+
{
11+
"id": "id1",
12+
"name": "planid1",
13+
"type": "Microsoft.MarketplaceOrdering/agreements",
14+
"properties": {
15+
"publisher": "publisher1",
16+
"offer": "offer1",
17+
"signDate": "2021-05-01T08:05:53.8374396Z",
18+
"state": "Active"
19+
}
20+
},
21+
{
22+
"id": "id2",
23+
"name": "planid2",
24+
"type": "Microsoft.MarketplaceOrdering/agreements",
25+
"properties": {
26+
"publisher": "publisher2",
27+
"offer": "offer2",
28+
"cancelDate": "2021-11-14T16:21:43.6945196Z",
29+
"state": "Canceled"
30+
}
2331
}
24-
}
25-
]
32+
]
33+
}
2634
}
2735
}
2836
}

specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2021-01-01/examples/SetMarketplaceTerms.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"parameters": {
3-
"api-version": "2016-04-01",
3+
"api-version": "2021-01-01",
44
"subscriptionId": "subid",
55
"offerType": "virtualmachine",
66
"publisherId": "pubid",

specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2021-01-01/examples/SignMarketplaceTerms.json

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"parameters": {
3-
"api-version": "2016-04-01",
3+
"api-version": "2021-01-01",
44
"subscriptionId": "subid",
55
"publisherId": "pubid",
66
"offerId": "offid",
@@ -11,17 +11,12 @@
1111
"body": {
1212
"id": "id",
1313
"name": "planid",
14-
"type": "Microsoft.MarketplaceOrdering/offertypes",
14+
"type": "Microsoft.MarketplaceOrdering/agreements",
1515
"properties": {
1616
"publisher": "pubid",
17-
"product": "offid",
18-
"plan": "planid",
19-
"licenseTextLink": "test.licenseLink",
20-
"privacyPolicyLink": "test.privacyPolicyLink",
21-
"marketplaceTermsLink": "test.marketplaceTermsLink",
22-
"retrieveDatetime": "2017-08-15T11:33:07.12132Z",
23-
"signature": "ASDFSDAFWEFASDGWERLWER",
24-
"accepted": true
17+
"offer": "offid",
18+
"signDate": "2021-08-15T11:33:07.12132Z",
19+
"state": "Active"
2520
}
2621
}
2722
}

0 commit comments

Comments
 (0)