Skip to content

Commit db37dbb

Browse files
authored
solving s360 issues in MarketplaceOrdering swagger (#15335)
* solving s360 issues in MarketplaceOrdering swagger * Update Agreements.json * Update Agreements.json * Update Agreements.json * Update Agreements.json * Update Agreements.json * Update Agreements.json * Update Agreements.json * Update CancelMarketplaceTerms.json * Update GetAgreementMarketplaceTerms.json * Update GetMarketplaceTerms.json * Update SetMarketplaceTerms.json * Update SignMarketplaceTerms.json * Update SignMarketplaceTerms.json * Update SetMarketplaceTerms.json * Update GetMarketplaceTerms.json * Update GetAgreementMarketplaceTerms.json * Update ListMarketplaceTerms.json * Update Agreements.json * Update Agreements.json * Update readme.md * Update readme.md * Update readme.md
1 parent 111fbce commit db37dbb

File tree

8 files changed

+108
-11
lines changed

8 files changed

+108
-11
lines changed

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

Lines changed: 69 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@
7070
"$ref": "#/definitions/AgreementTerms"
7171
}
7272
},
73+
"415": {
74+
"description": "Unsupported Media Type",
75+
"x-ms-error-response": true,
76+
"schema": {
77+
"$ref": "#/definitions/UnsupportedMediaTypeErrorResponse"
78+
}
79+
},
7380
"default": {
7481
"description": "Microsoft.MarketplaceOrdering error response describing why the operation failed.",
7582
"schema": {
@@ -122,6 +129,13 @@
122129
"$ref": "#/definitions/AgreementTerms"
123130
}
124131
},
132+
"415": {
133+
"description": "Unsupported Media Type",
134+
"x-ms-error-response": true,
135+
"schema": {
136+
"$ref": "#/definitions/UnsupportedMediaTypeErrorResponse"
137+
}
138+
},
125139
"default": {
126140
"description": "Microsoft.MarketplaceOrdering error response describing why the operation failed.",
127141
"schema": {
@@ -150,6 +164,13 @@
150164
"$ref": "#/definitions/OperationListResult"
151165
}
152166
},
167+
"415": {
168+
"description": "Unsupported Media Type",
169+
"x-ms-error-response": true,
170+
"schema": {
171+
"$ref": "#/definitions/UnsupportedMediaTypeErrorResponse"
172+
}
173+
},
153174
"default": {
154175
"description": "Microsoft.MarketplaceOrdering error response describing why the operation failed.",
155176
"schema": {
@@ -195,6 +216,13 @@
195216
"$ref": "#/definitions/OldAgreementTerms"
196217
}
197218
},
219+
"415": {
220+
"description": "Unsupported Media Type",
221+
"x-ms-error-response": true,
222+
"schema": {
223+
"$ref": "#/definitions/UnsupportedMediaTypeErrorResponse"
224+
}
225+
},
198226
"default": {
199227
"description": "Microsoft.MarketplaceOrdering error response describing why the operation failed.",
200228
"schema": {
@@ -237,6 +265,13 @@
237265
"$ref": "#/definitions/OldAgreementTerms"
238266
}
239267
},
268+
"415": {
269+
"description": "Unsupported Media Type",
270+
"x-ms-error-response": true,
271+
"schema": {
272+
"$ref": "#/definitions/UnsupportedMediaTypeErrorResponse"
273+
}
274+
},
240275
"default": {
241276
"description": "Microsoft.MarketplaceOrdering error response describing why the operation failed.",
242277
"schema": {
@@ -279,6 +314,13 @@
279314
"$ref": "#/definitions/OldAgreementTerms"
280315
}
281316
},
317+
"415": {
318+
"description": "Unsupported Media Type",
319+
"x-ms-error-response": true,
320+
"schema": {
321+
"$ref": "#/definitions/UnsupportedMediaTypeErrorResponse"
322+
}
323+
},
282324
"default": {
283325
"description": "Microsoft.MarketplaceOrdering error response describing why the operation failed.",
284326
"schema": {
@@ -312,6 +354,13 @@
312354
"$ref": "#/definitions/AgreementTermsList"
313355
}
314356
},
357+
"415": {
358+
"description": "Unsupported Media Type",
359+
"x-ms-error-response": true,
360+
"schema": {
361+
"$ref": "#/definitions/UnsupportedMediaTypeErrorResponse"
362+
}
363+
},
315364
"default": {
316365
"description": "Microsoft.MarketplaceOrdering error response describing why the operation failed.",
317366
"schema": {
@@ -386,12 +435,13 @@
386435
"description": "The value of the array.",
387436
"type": "array",
388437
"items": {
389-
"$ref": "#/definitions/AgreementTerms"
438+
"$ref": "#/definitions/OldAgreementTerms"
390439
}
391440
}
392441
}
393442
},
394443
"AgreementTerms": {
444+
"type": "object",
395445
"properties": {
396446
"properties": {
397447
"$ref": "#/definitions/AgreementProperties",
@@ -407,6 +457,7 @@
407457
"description": "Terms properties for provided Publisher/Offer/Plan tuple"
408458
},
409459
"AgreementProperties": {
460+
"type": "object",
410461
"properties": {
411462
"publisher": {
412463
"type": "string",
@@ -500,20 +551,30 @@
500551
},
501552
"description": "Old Agreement Terms definition"
502553
},
554+
"UnsupportedMediaTypeErrorResponse": {
555+
"description": "Error response that indicates the media type in the request is unsupported.",
556+
"type": "object",
557+
"properties": {
558+
"Message": {
559+
"type": "string",
560+
"description": "The details of the error."
561+
}
562+
}
563+
},
503564
"ErrorResponse": {
504565
"description": "Error response indicates Microsoft.MarketplaceOrdering service is not able to process the incoming request. The reason is provided in the error message.",
505566
"type": "object",
506567
"properties": {
507-
"Error": {
568+
"error": {
508569
"type": "object",
509570
"description": "The details of the error.",
510571
"properties": {
511-
"Code": {
572+
"code": {
512573
"description": "Error code.",
513574
"type": "string",
514575
"readOnly": true
515576
},
516-
"Message": {
577+
"message": {
517578
"description": "Error message indicating why the operation failed.",
518579
"type": "string",
519580
"readOnly": true
@@ -532,6 +593,7 @@
532593
},
533594
"display": {
534595
"description": "The object that represents the operation.",
596+
"type": "object",
535597
"properties": {
536598
"provider": {
537599
"description": "Service provider: Microsoft.MarketplaceOrdering",
@@ -555,9 +617,11 @@
555617
},
556618
"OperationListResult": {
557619
"description": "Result of the request to list MarketplaceOrdering operations. It contains a list of operations and a URL link to get the next set of results.",
620+
"type": "object",
558621
"properties": {
559622
"value": {
560623
"type": "array",
624+
"uniqueItems": false,
561625
"items": {
562626
"$ref": "#/definitions/Operation"
563627
},
@@ -572,6 +636,7 @@
572636
},
573637
"Resource": {
574638
"description": "ARM resource.",
639+
"type": "object",
575640
"properties": {
576641
"id": {
577642
"readOnly": true,

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
"state": "Canceled"
2222
}
2323
}
24+
},
25+
"415": {
26+
"body": {
27+
"Message": "media type unsupported"
28+
}
2429
}
2530
}
2631
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
"state": "Canceled"
2222
}
2323
}
24+
},
25+
"415": {
26+
"body": {
27+
"Message": "media type unsupported"
28+
}
2429
}
2530
}
2631
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
"accepted": true
2525
}
2626
}
27+
},
28+
"415": {
29+
"body": {
30+
"Message": "media type unsupported"
31+
}
2732
}
2833
}
2934
}

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,19 @@
1313
"type": "Microsoft.MarketplaceOrdering/offertypes",
1414
"properties": {
1515
"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
16+
"offer": "offid",
17+
"signDate": "2019-04-26T05:57:25.3013164Z",
18+
"cancelDate": "2019-04-27T05:57:25.3013164Z",
19+
"state": "Active"
2320
}
2421
}
2522
]
2623
}
24+
},
25+
"415": {
26+
"body": {
27+
"Message": "media type unsupported"
28+
}
2729
}
2830
}
2931
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
"accepted": true
3838
}
3939
}
40+
},
41+
"415": {
42+
"body": {
43+
"Message": "media type unsupported"
44+
}
4045
}
4146
}
4247
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
"state": "Canceled"
2222
}
2323
}
24+
},
25+
"415": {
26+
"body": {
27+
"Message": "media type unsupported"
28+
}
2429
}
2530
}
2631
}

specification/marketplaceordering/resource-manager/readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ These settings apply only when `--tag=package-2015-06-01` is specified on the co
6767
``` yaml $(tag) == 'package-2015-06-01'
6868
input-file:
6969
- Microsoft.MarketplaceOrdering/stable/2015-06-01/Agreements.json
70+
directive:
71+
# suppress each RPC 3016 error
72+
- where: $.definitions.UnsupportedMediaTypeErrorResponse.properties.Message
73+
suppress: R3016
74+
reason: This requires a change in code thats in production for several years
7075
```
7176

7277

0 commit comments

Comments
 (0)