Skip to content

Commit 59a5188

Browse files
author
SDKAuto
committed
CodeGen from PR 21875 in Azure/azure-rest-api-specs
{AzureAPIM} fixes Azure/azure-rest-api-specs#21849 'in body' parameter specification missing (#21875) * {AzureAPIM} fixes Azure/azure-rest-api-specs#21849 'in body' parameter specification missing fixes Azure/azure-rest-api-specs#21849 'in body' parameter specification missing The CreateOrUpdate operations on both of the following resource types are missing the in body parameter in the OpenAPI specification (OAS): Microsoft.ApiManagement/service/contentTypes Microsoft.ApiManagement/service/contentTypes/contentItems This causes the documentation TryIt and autogenerated libraries (e.g. nodejs @azure/arm-apimanagement) to break, as they don't support passing in the properties in the body, making these resource types unable to be updated or created. For example, if you run the "Try It" for this API, it doesn't give you a body field in the auto-generated REST HTTP request form. The body field is needed, but it doesn't give you that field as it's not populated in the OAS for this resource type. See this: https://github.com/Azure/azure-rest-api-specs/blob/7245d0f5cc01bf95df9d7ae893f252d4001b4ad7/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/apimcontenttypes.json#L132-L162 * Update apimcontenttypes.json
1 parent ad4a69d commit 59a5188

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

schemas/2021-08-01/Microsoft.ApiManagement.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,6 +1089,16 @@
10891089
"maxLength": 80,
10901090
"description": "Content type identifier."
10911091
},
1092+
"properties": {
1093+
"oneOf": [
1094+
{
1095+
"$ref": "#/definitions/ContentTypeContractProperties"
1096+
},
1097+
{
1098+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
1099+
}
1100+
]
1101+
},
10921102
"resources": {
10931103
"type": "array",
10941104
"items": {
@@ -1109,6 +1119,7 @@
11091119
"required": [
11101120
"apiVersion",
11111121
"name",
1122+
"properties",
11121123
"type"
11131124
],
11141125
"description": "Microsoft.ApiManagement/service/contentTypes"
@@ -1128,6 +1139,21 @@
11281139
"maxLength": 80,
11291140
"description": "Content item identifier."
11301141
},
1142+
"properties": {
1143+
"oneOf": [
1144+
{
1145+
"type": "object",
1146+
"additionalProperties": {
1147+
"type": "object",
1148+
"properties": {}
1149+
},
1150+
"properties": {}
1151+
},
1152+
{
1153+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
1154+
}
1155+
]
1156+
},
11311157
"type": {
11321158
"type": "string",
11331159
"enum": [
@@ -1138,6 +1164,7 @@
11381164
"required": [
11391165
"apiVersion",
11401166
"name",
1167+
"properties",
11411168
"type"
11421169
],
11431170
"description": "Microsoft.ApiManagement/service/contentTypes/contentItems"
@@ -3962,6 +3989,32 @@
39623989
],
39633990
"description": "SSL certificate information."
39643991
},
3992+
"ContentTypeContractProperties": {
3993+
"type": "object",
3994+
"properties": {
3995+
"description": {
3996+
"type": "string",
3997+
"description": "Content type description."
3998+
},
3999+
"id": {
4000+
"type": "string",
4001+
"description": "Content type identifier"
4002+
},
4003+
"name": {
4004+
"type": "string",
4005+
"description": "Content type name. Must be 1 to 250 characters long."
4006+
},
4007+
"schema": {
4008+
"type": "object",
4009+
"properties": {},
4010+
"description": "Content type schema."
4011+
},
4012+
"version": {
4013+
"type": "string",
4014+
"description": "Content type version."
4015+
}
4016+
}
4017+
},
39654018
"DataMasking": {
39664019
"type": "object",
39674020
"properties": {
@@ -6563,6 +6616,16 @@
65636616
"maxLength": 80,
65646617
"description": "Content type identifier."
65656618
},
6619+
"properties": {
6620+
"oneOf": [
6621+
{
6622+
"$ref": "#/definitions/ContentTypeContractProperties"
6623+
},
6624+
{
6625+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
6626+
}
6627+
]
6628+
},
65666629
"type": {
65676630
"type": "string",
65686631
"enum": [
@@ -6573,6 +6636,7 @@
65736636
"required": [
65746637
"apiVersion",
65756638
"name",
6639+
"properties",
65766640
"type"
65776641
],
65786642
"description": "Microsoft.ApiManagement/service/contentTypes"
@@ -6592,6 +6656,21 @@
65926656
"maxLength": 80,
65936657
"description": "Content item identifier."
65946658
},
6659+
"properties": {
6660+
"oneOf": [
6661+
{
6662+
"type": "object",
6663+
"additionalProperties": {
6664+
"type": "object",
6665+
"properties": {}
6666+
},
6667+
"properties": {}
6668+
},
6669+
{
6670+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
6671+
}
6672+
]
6673+
},
65956674
"type": {
65966675
"type": "string",
65976676
"enum": [
@@ -6602,6 +6681,7 @@
66026681
"required": [
66036682
"apiVersion",
66046683
"name",
6684+
"properties",
66056685
"type"
66066686
],
66076687
"description": "Microsoft.ApiManagement/service/contentTypes/contentItems"

0 commit comments

Comments
 (0)