.../services/network/mgmt/2020-03-01/networkgo version: go version go1.14.2 darwin/amd64future.Result(*client) (code):network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture#Result: Failure responding to request: StatusCode=200 -- Original Error: Error occurred unmarshalling JSON - Error = 'json: cannot unmarshal string into Go value of type network.String' JSON = '"https://nfvprodsuppdb.blob.core.windows.net/vpnprofileimmutable/xxxxxxxxxxxxxx/vpnprofile/xxxxxxxxxxxxxx/vpnclientconfiguration.zip?sv=2017-04-17&sr=b&sig=xxxxxxxxxxxxxx&st=2020-05-22T07%3A58%3A15Z&se=2020-05-22T08%3A58%3A15Z&sp=r&fileExtension=.zip"'network.String to work with containing "https://nfvprodsuppdb.blob.core.windows.net/vpnprofileimmutable/xxxxxxxxxxxxxx/vpnprofile/xxxxxxxxxxxxxx/vpnclientconfiguration.zip?sv=2017-04-17&sr=b&sig=xxxxxxxxxxxxxx&st=2020-05-22T07%3A58%3A15Z&se=2020-05-22T08%3A58%3A15Z&sp=r&fileExtension=.zip"make acctests SERVICE=web TESTARGS='-run=TestAccAzureRMAppServiceVirtualNetworkGatewayConnection_basic' against my branch and fork of the AzureRM TerraForm Provider/this PR: https://github.com/terraform-providers/terraform-provider-azurerm/pull/7048The problem is the same as https://github.com/Azure/azure-sdk-for-go/issues/5921, which is already open for more than half a year..
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @aznetsuppgithub.
Hi @aristosvo thanks for this issue!
Last time in internal emails, we have come an agreement with the service team that they would change their format of the response. But apparently they have not made that change yet...
Hi @jhendrixMSFT do you have some recommendation here? Is it valid for us to make some workaround on the code gen?
@ArcturusZhang the swagger needs to be fixed. Can you please follow up with the RP about it?
@lilyjma @ArcturusZhang Can you please give me an update on the progress?
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @aznetsuppgithub.
@ArcturusZhang: Any updates on swagger change?
@lilyjma sorry some of the comments may not be clear enough - we are expecting the service to return everything in a format of JSON rather than a plain string. But we did not get enough progress with the service team.
Please let me give them another ping on this.
@ArcturusZhang I might have been wrong about this requirement. According to spec, "some string" is a valid JSON string and we have a lot of other places where this is returned (a lot in the test server).
I think the codegen might be wrong here, i.e. this might be a bug where LROs and operations that return scalar values intersect. If you look at codegen in the test server for the non-LRO case, we unmarshall into the Value field.
https://github.com/Azure/autorest.go/blob/master/test/src/tests/generated/stringgroup/string.go#L87
For network we don't.
autorest.ByUnmarshallingJSON(&result),
I think the codegen should unmarshall that into result.String.
We appear to have the same issue in track 2.
Actually, it looks like track 2 does the right thing here.
@ArcturusZhang I might have been wrong about this requirement. According to spec,
"some string"is a valid JSON string and we have a lot of other places where this is returned (a lot in the test server).I think the codegen might be wrong here, i.e. this might be a bug where LROs and operations that return scalar values intersect. If you look at codegen in the test server for the non-LRO case, we unmarshall into the
Valuefield.https://github.com/Azure/autorest.go/blob/master/test/src/tests/generated/stringgroup/string.go#L87
For network we don't.
autorest.ByUnmarshallingJSON(&result),I think the codegen should unmarshall that into
result.String.We appear to have the same issue in track 2.
Good to know. Let me have a look how to fix this in the code gen.
@ArcturusZhang Any news?
Most helpful comment
@ArcturusZhang the swagger needs to be fixed. Can you please follow up with the RP about it?