generator-go-sdk
: compatiable with literal string response
#1756
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If the Response Body is a literal string, not a structure JSON, the currently generated code will also unmarshal by JSON which causes an error. This PR tries to unmarshalBytes for this kind of response. So we don't need to wait service team to fix the swagger issue Azure/azure-sdk-for-go#17591 and we can solve all failed Automation AccTest cases.
Makes these PRs possible or improved
automation_dsc_nodeconfiguration
- support for thecontent_version
,hash
andincrement_build_enabled
properties terraform-provider-azurerm#178752020-01-13-preview
to2019-06-01
terraform-provider-azurerm#18213automation_dsc_configuratioin
- support for thehash
andlog_process
properties terraform-provider-azurerm#17801azurerm_dsc_configuration
- fix resource read embedded_content error terraform-provider-azurerm#17804TODO
remove test code in
preparerForList
for content type (autorest.AsContentType("text/powershell"),
once #1908 merged.Diff of generated code
I have generated all RPs locally, and here is the diff between the code by the new template and the main branch of hashicorp/go-azure-sdk
May affect RPs: