Describe the bug
Calling pricing.GetProducts() returns a different type beginning in v1.44.46, breaking existing programs. The PriceList field in pricing.GetProductsOutput is a *string, where it was previously an aws.JSONValue, which is a map[string]interface{}. Clients relying on the previous type are broken by this change:
products, _ := pricing.GetProducts(input)
b, _ := json.Marshal(products.PriceList)
fmt.Println(string(b)
Where previously this would print a JSON array where each element is an object, it now prints a JSON array where each element is a string (a stringified JSON object).
Expected Behavior
Either behavior is acceptable, but I would expect the type signature for all functions to remain the same across all revisions within a major version.
Current Behavior
Currently, an array of strings is returned
Reproduction Steps
For any pricing query (input)
products, _ := pricing.GetProducts(input)
b, _ := json.Marshal(products.PriceList)
fmt.Println(string(b))
This prints an array of strings
Possible Solution
No response
Additional Information/Context
Originally reported in hashicorp/terraform-provider-aws#25771
SDK version used
v1.44.46
Environment details (Version of Go (go version)? OS name and version, etc.)
go version go1.18.3 darwin/arm64
Describe the bug
Calling
pricing.GetProducts()returns a different type beginning inv1.44.46, breaking existing programs. ThePriceListfield inpricing.GetProductsOutputis a*string, where it was previously anaws.JSONValue, which is amap[string]interface{}. Clients relying on the previous type are broken by this change:Where previously this would print a JSON array where each element is an object, it now prints a JSON array where each element is a string (a stringified JSON object).
Expected Behavior
Either behavior is acceptable, but I would expect the type signature for all functions to remain the same across all revisions within a major version.
Current Behavior
Currently, an array of strings is returned
Reproduction Steps
For any pricing query (
input)This prints an array of strings
Possible Solution
No response
Additional Information/Context
Originally reported in hashicorp/terraform-provider-aws#25771
SDK version used
v1.44.46
Environment details (Version of Go (
go version)? OS name and version, etc.)go version go1.18.3 darwin/arm64