Skip to content

Commit

Permalink
Fix issues in mgmt group swaggers which result in problematic SDKs (A…
Browse files Browse the repository at this point in the history
…zure#12488)

* fix issue in 2020-02-01

* fix issue in 2020-05-01

* fix model validation

* fix prettier

* revert some removal of x-ms-parameter-location
  • Loading branch information
ArcturusZhang authored and mkarmark committed Jul 20, 2021
1 parent 6792b75 commit f30757b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"groupId": "ChildGroup",
"patchGroupRequest": {
"displayName": "AlternateDisplayName",
"parentGroupId": "/providers/Microsoft.Management/managementGroups/AlternateRootGroup"
"parentId": "/providers/Microsoft.Management/managementGroups/AlternateRootGroup"
},
"Cache-Control": "no-cache"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
"createManagementGroupRequest": {
"properties": {
"displayName": "ChildGroup",
"parent": {
"id": "/providers/Microsoft.Management/managementGroups/RootGroup"
"details": {
"parent": {
"id": "/providers/Microsoft.Management/managementGroups/RootGroup"
}
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1787,14 +1787,14 @@
"type": {
"type": "string",
"enum": [
"Microsoft.Management/managementGroup"
"Microsoft.Management/managementGroups"
],
"x-ms-enum": {
"name": "Type",
"modelAsString": false,
"values": [
{
"value": "Microsoft.Management/managementGroup"
"value": "Microsoft.Management/managementGroups"
}
]
},
Expand Down Expand Up @@ -1855,7 +1855,7 @@
"schema": {
"$ref": "#/definitions/CreateManagementGroupRequest"
},
"x-ms-parameter-location": "client"
"x-ms-parameter-location": "method"
},
"PatchGroupRequestParameter": {
"name": "patchGroupRequest",
Expand All @@ -1865,7 +1865,7 @@
"schema": {
"$ref": "#/definitions/PatchManagementGroupRequest"
},
"x-ms-parameter-location": "client"
"x-ms-parameter-location": "method"
},
"FilterParameter": {
"name": "$filter",
Expand Down Expand Up @@ -1922,19 +1922,7 @@
"schema": {
"$ref": "#/definitions/CreateOrUpdateSettingsRequest"
},
"x-ms-parameter-location": "client"
},
"OperationResultIdParameter": {
"name": "operationResultId",
"in": "path",
"required": true,
"type": "string",
"enum": [
"create",
"delete"
],
"description": "The id of the operation result.",
"x-ms-parameter-location": "client"
"x-ms-parameter-location": "method"
},
"CheckNameAvailabilityParameter": {
"name": "checkNameAvailabilityRequest",
Expand All @@ -1944,31 +1932,31 @@
"schema": {
"$ref": "#/definitions/CheckNameAvailabilityRequest"
},
"x-ms-parameter-location": "client"
"x-ms-parameter-location": "method"
},
"SkipParameter": {
"name": "$skip",
"in": "query",
"required": false,
"type": "integer",
"description": "Number of entities to skip over when retrieving results. Passing this in will override $skipToken.",
"x-ms-parameter-location": "client"
"x-ms-parameter-location": "method"
},
"TopParameter": {
"name": "$top",
"in": "query",
"required": false,
"type": "integer",
"description": "Number of elements to return when retrieving results. Passing this in will override $skipToken.",
"x-ms-parameter-location": "client"
"x-ms-parameter-location": "method"
},
"SkipTokenParameter": {
"name": "$skiptoken",
"in": "query",
"required": false,
"type": "string",
"description": "Page continuation token is only used if a previous operation returned a partial result. \nIf a previous response contains a nextLink element, the value of the nextLink element will include a token parameter that specifies a starting point to use for subsequent calls.\n",
"x-ms-parameter-location": "client"
"x-ms-parameter-location": "method"
},
"CacheControlHeader": {
"name": "Cache-Control",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1971,7 +1971,7 @@
"schema": {
"$ref": "#/definitions/CreateManagementGroupRequest"
},
"x-ms-parameter-location": "client"
"x-ms-parameter-location": "method"
},
"PatchGroupRequestParameter": {
"name": "patchGroupRequest",
Expand All @@ -1981,7 +1981,7 @@
"schema": {
"$ref": "#/definitions/PatchManagementGroupRequest"
},
"x-ms-parameter-location": "client"
"x-ms-parameter-location": "method"
},
"FilterParameter": {
"name": "$filter",
Expand Down Expand Up @@ -2038,19 +2038,7 @@
"schema": {
"$ref": "#/definitions/CreateOrUpdateSettingsRequest"
},
"x-ms-parameter-location": "client"
},
"OperationResultIdParameter": {
"name": "operationResultId",
"in": "path",
"required": true,
"type": "string",
"enum": [
"create",
"delete"
],
"description": "The id of the operation result.",
"x-ms-parameter-location": "client"
"x-ms-parameter-location": "method"
},
"CheckNameAvailabilityParameter": {
"name": "checkNameAvailabilityRequest",
Expand All @@ -2060,31 +2048,31 @@
"schema": {
"$ref": "#/definitions/CheckNameAvailabilityRequest"
},
"x-ms-parameter-location": "client"
"x-ms-parameter-location": "method"
},
"SkipParameter": {
"name": "$skip",
"in": "query",
"required": false,
"type": "integer",
"description": "Number of entities to skip over when retrieving results. Passing this in will override $skipToken.",
"x-ms-parameter-location": "client"
"x-ms-parameter-location": "method"
},
"TopParameter": {
"name": "$top",
"in": "query",
"required": false,
"type": "integer",
"description": "Number of elements to return when retrieving results. Passing this in will override $skipToken.",
"x-ms-parameter-location": "client"
"x-ms-parameter-location": "method"
},
"SkipTokenParameter": {
"name": "$skiptoken",
"in": "query",
"required": false,
"type": "string",
"description": "Page continuation token is only used if a previous operation returned a partial result. \nIf a previous response contains a nextLink element, the value of the nextLink element will include a token parameter that specifies a starting point to use for subsequent calls.\n",
"x-ms-parameter-location": "client"
"x-ms-parameter-location": "method"
},
"CacheControlHeader": {
"name": "Cache-Control",
Expand Down

0 comments on commit f30757b

Please sign in to comment.