Skip to content

Commit c8f742e

Browse files
alkigelAndrew Sager
authored andcommitted
Updating Agreements.json to comply with S360 alerts (Azure#14658)
* Updating Agreements.json to comply with S360 alerts * Updating Agreements.json * Fixing Cancel example according to swagger * Fixing GetAgreement example according to swagger * Fixing SignAgreement example according to swagger * Fixing ListTerms example according to swagger * Fixing Agreements.json syntax * Update Agreements.json * Update Agreements.json * Fixing PrettierCheck errors * adding type:object to Agreements.json
1 parent ca587f9 commit c8f742e

File tree

5 files changed

+114
-47
lines changed

5 files changed

+114
-47
lines changed

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

Lines changed: 81 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
"200": {
193193
"description": "OK. The request was successfully processed and the terms were accepted.",
194194
"schema": {
195-
"$ref": "#/definitions/AgreementTerms"
195+
"$ref": "#/definitions/OldAgreementTerms"
196196
}
197197
},
198198
"default": {
@@ -234,7 +234,7 @@
234234
"200": {
235235
"description": "OK. The request was successfully processed and the terms were rejected.",
236236
"schema": {
237-
"$ref": "#/definitions/AgreementTerms"
237+
"$ref": "#/definitions/OldAgreementTerms"
238238
}
239239
},
240240
"default": {
@@ -276,7 +276,7 @@
276276
"200": {
277277
"description": "Terms returned successfully",
278278
"schema": {
279-
"$ref": "#/definitions/AgreementTerms"
279+
"$ref": "#/definitions/OldAgreementTerms"
280280
}
281281
},
282282
"default": {
@@ -309,10 +309,7 @@
309309
"200": {
310310
"description": "Terms returned successfully",
311311
"schema": {
312-
"type": "array",
313-
"items": {
314-
"$ref": "#/definitions/AgreementTerms"
315-
}
312+
"$ref": "#/definitions/AgreementTermsList"
316313
}
317314
},
318315
"default": {
@@ -381,6 +378,19 @@
381378
}
382379
},
383380
"definitions": {
381+
"AgreementTermsList": {
382+
"type": "object",
383+
"description": "Represents the list of AgreementTerms objects",
384+
"properties": {
385+
"value": {
386+
"description": "The value of the array.",
387+
"type": "array",
388+
"items": {
389+
"$ref": "#/definitions/AgreementTerms"
390+
}
391+
}
392+
}
393+
},
384394
"AgreementTerms": {
385395
"properties": {
386396
"properties": {
@@ -434,19 +444,76 @@
434444
},
435445
"description": "Agreement Terms definition"
436446
},
447+
"OldAgreementTerms": {
448+
"type": "object",
449+
"properties": {
450+
"properties": {
451+
"$ref": "#/definitions/OldAgreementProperties",
452+
"description": "Represents the properties of the resource.",
453+
"x-ms-client-flatten": true
454+
}
455+
},
456+
"allOf": [
457+
{
458+
"$ref": "#/definitions/Resource"
459+
}
460+
],
461+
"description": "Terms properties for provided Publisher/Offer/Plan tuple"
462+
},
463+
"OldAgreementProperties": {
464+
"type": "object",
465+
"properties": {
466+
"id": {
467+
"type": "string",
468+
"description": "A unique identifier of the agreement."
469+
},
470+
"publisher": {
471+
"type": "string",
472+
"description": "Publisher identifier string of image being deployed."
473+
},
474+
"offer": {
475+
"type": "string",
476+
"description": "Offer identifier string of image being deployed."
477+
},
478+
"signDate": {
479+
"type": "string",
480+
"format": "date-time",
481+
"description": "Date and time in UTC of when the terms were accepted. This is empty if state is cancelled."
482+
},
483+
"cancelDate": {
484+
"type": "string",
485+
"format": "date-time",
486+
"description": "Date and time in UTC of when the terms were cancelled. This is empty if state is active."
487+
},
488+
"state": {
489+
"type": "string",
490+
"enum": [
491+
"Active",
492+
"Canceled"
493+
],
494+
"description": "Whether the agreement is active or cancelled",
495+
"x-ms-enum": {
496+
"name": "state",
497+
"modelAsString": true
498+
}
499+
}
500+
},
501+
"description": "Old Agreement Terms definition"
502+
},
437503
"ErrorResponse": {
438504
"description": "Error response indicates Microsoft.MarketplaceOrdering service is not able to process the incoming request. The reason is provided in the error message.",
439505
"type": "object",
440506
"properties": {
441-
"error": {
507+
"Error": {
508+
"type": "object",
442509
"description": "The details of the error.",
443510
"properties": {
444-
"code": {
511+
"Code": {
445512
"description": "Error code.",
446513
"type": "string",
447514
"readOnly": true
448515
},
449-
"message": {
516+
"Message": {
450517
"description": "Error message indicating why the operation failed.",
451518
"type": "string",
452519
"readOnly": true
@@ -477,6 +544,10 @@
477544
"operation": {
478545
"description": "Operation type: Get Agreement, Sign Agreement, Cancel Agreement etc.",
479546
"type": "string"
547+
},
548+
"description": {
549+
"description": "The description of the operation",
550+
"type": "string"
480551
}
481552
}
482553
}

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@
1313
"name": "planid",
1414
"type": "Microsoft.MarketplaceOrdering/offertypes",
1515
"properties": {
16+
"id": "11111111-1111-1111-1111-111111111111",
1617
"publisher": "pubid",
17-
"product": "offid",
18-
"plan": "planid",
19-
"licenseTextLink": "test.licenseLink",
20-
"privacyPolicyLink": "test.privacyPolicyLink",
21-
"retrieveDatetime": "2017-08-15T11:33:07.12132Z",
22-
"signature": "ASDFSDAFWEFASDGWERLWER",
23-
"accepted": false
18+
"offer": "offid",
19+
"signDate": "2017-08-15T11:33:07.12132Z",
20+
"cancelDate": "2017-08-16T11:33:07.12132Z",
21+
"state": "Canceled"
2422
}
2523
}
2624
}

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@
1313
"name": "planid",
1414
"type": "Microsoft.MarketplaceOrdering/offertypes",
1515
"properties": {
16+
"id": "11111111-1111-1111-1111-111111111111",
1617
"publisher": "pubid",
17-
"product": "offid",
18-
"plan": "planid",
19-
"licenseTextLink": "test.licenseLink",
20-
"privacyPolicyLink": "test.privacyPolicyLink",
21-
"retrieveDatetime": "2017-08-15T11:33:07.12132Z",
22-
"signature": "ASDFSDAFWEFASDGWERLWER",
23-
"accepted": true
18+
"offer": "offid",
19+
"signDate": "2017-08-15T11:33:07.12132Z",
20+
"cancelDate": "2017-08-16T11:33:07.12132Z",
21+
"state": "Canceled"
2422
}
2523
}
2624
}

specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2015-06-01/examples/ListMarketplaceTerms.json

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,25 @@
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-
"retrieveDatetime": "2017-08-15T11:33:07.12132Z",
20-
"signature": "ASDFSDAFWEFASDGWERLWER",
21-
"accepted": true
8+
"body": {
9+
"value": [
10+
{
11+
"id": "id",
12+
"name": "planid",
13+
"type": "Microsoft.MarketplaceOrdering/offertypes",
14+
"properties": {
15+
"publisher": "pubid",
16+
"product": "offid",
17+
"plan": "planid",
18+
"licenseTextLink": "test.licenseLink",
19+
"privacyPolicyLink": "test.privacyPolicyLink",
20+
"retrieveDatetime": "2017-08-15T11:33:07.12132Z",
21+
"signature": "ASDFSDAFWEFASDGWERLWER",
22+
"accepted": true
23+
}
2224
}
23-
}
24-
]
25+
]
26+
}
2527
}
2628
}
2729
}

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@
1313
"name": "planid",
1414
"type": "Microsoft.MarketplaceOrdering/offertypes",
1515
"properties": {
16+
"id": "11111111-1111-1111-1111-111111111111",
1617
"publisher": "pubid",
17-
"product": "offid",
18-
"plan": "planid",
19-
"licenseTextLink": "test.licenseLink",
20-
"privacyPolicyLink": "test.privacyPolicyLink",
21-
"retrieveDatetime": "2017-08-15T11:33:07.12132Z",
22-
"signature": "ASDFSDAFWEFASDGWERLWER",
23-
"accepted": true
18+
"offer": "offid",
19+
"signDate": "2017-08-15T11:33:07.12132Z",
20+
"cancelDate": "2017-08-16T11:33:07.12132Z",
21+
"state": "Canceled"
2422
}
2523
}
2624
}

0 commit comments

Comments
 (0)