Open
Description
that is if set updateConfiguration.targets.azureQueries.tagSettings
as "tagSettings": {}
the response will be 400 error as below:
{
"code": "BadRequest",
"message": "{\"Message\":\"The request is invalid.\",\"ModelState\":{\"softwareUpdateConfiguration.properties.updateConfiguration.targets.azureQueries[0].tagSettings.tags\":[\"The tags field is required.\"]}}"
}
but if we provide an empty map in tags but not specify the filterOperator
as below
"tagSettings": {
"tags": {}
}
the request-response 201 is a success as below:
"tagSettings": {
"filterOperator": 0,
"tags": {}
}
the tagSettings.filterOperator
in response is a numeric zero, but the type defined in swagger is a string. so the go sdk unmarshal the response with an error Error = 'json: cannot unmarshal number into Go struct field TagSettingsProperties.updateConfiguration.targets.azureQueries.tagSettings.filterOperator of type automation.TagOperators'
.
related swagger definition:
Expect behavior
- create success with no tags in tagSettings
- response
filterOperator
must always be a string.