-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] GetEffectiveNetworkSecurityGroups fails with Json exception due to improper type handling #34094
Comments
Thank you for your feedback. Tagging and routing to the team member best able to assist. |
Thank you for your feedback. Tagging and routing to the team member best able to assist. |
HI @simonlrostron thank you for the issue! The root cause is indeed something wrong in the spec definition: https://github.com/Azure/azure-rest-api-specs/blob/7384176da46425e7899708f263e0598b851358c2/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/networkInterface.json#L1316 Based on the actual response payload in your description, the correct type for this property should be We will investigate this further and have an update for this very soon |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @aznetsuppgithub. Issue DetailsLibrary name and versionAzure.ResourceManager.Network 1.1.0 Describe the bugThe GetEffectiveNetworkSecurityGroups() / GetEffectiveNetworkSecurityGroupsAsync() methods in the NetworkInterfaceResource class fail when attempting to process the tagMap property in the result data. The following exception is thrown: System.Text.Json.Rethrowable: The requested operation requires an element of type 'String', but the target element has type 'Object'. Indeed, the property is an object in the actual API response:
...but it seems that the code is expecting a string value. In looking at the Swagger definitions for various versions of the /networkInterfaces API, the tagMap property definition seems to be incorrect:
The current public documentation for the API is accurate. Expected behaviorCalls to these methods succeed, and the appropriate data is returned. Actual behaviorBoth the synchronous and asynchronous methods fail when the results from the operation are processed. The following is a stacktrace:
Reproduction Steps
Environment
|
Library name and version
Azure.ResourceManager.Network 1.1.0
Describe the bug
The GetEffectiveNetworkSecurityGroups() / GetEffectiveNetworkSecurityGroupsAsync() methods in the NetworkInterfaceResource class fail when attempting to process the tagMap property in the result data.
The following exception is thrown: System.Text.Json.Rethrowable: The requested operation requires an element of type 'String', but the target element has type 'Object'.
Indeed, the property is an object in the actual API response:
...but it seems that the code is expecting a string value.
In looking at the Swagger definitions for various versions of the /networkInterfaces API, the tagMap property definition seems to be incorrect:
The current public documentation for the API is accurate.
Expected behavior
Calls to these methods succeed, and the appropriate data is returned.
Actual behavior
Both the synchronous and asynchronous methods fail when the results from the operation are processed.
The following is a stacktrace:
Reproduction Steps
Environment
The text was updated successfully, but these errors were encountered: