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
Fix lexv1 AlternativeIntentsSerializationError #4264
Conversation
Deserialisation of the `X-Amz-Lex-Alternative-Intents` header fails because it is a JSON array, but `aws.JSONValue` is a `map[string]interface{}`. Fix this by treating `X-Amz-Lex-Alternative-Intents` as a base64 encoded string, which will not be decoded and unmarshalled by the SDK. The caller of the SDK must manually base64 decode and JSON unmarshal the field, in order to use the contents.
I'm guessing this applies here... |
ActiveContexts is also a JSON array.
Thanks for taking the time to create this PR @chrbsg. Since this PR modifies the SDK's API model/generated code we cannot take this Pr directly. But with that said, i created #4269. This new PR takes the idea of supressing the JSONValue traits for these API parameters. Taking a step further the PR also disables future support for JSONValue in the v1 SDK to prevent further issues. |
=== ### Service Client Updates * `service/budgets`: Updates service API and documentation * Adds support for auto-adjusting budgets, a new budget method alongside fixed and planned. Auto-adjusting budgets introduces new metadata to configure a budget limit baseline using a historical lookback average or current period forecast. * `service/ce`: Updates service API * `service/ec2`: Updates service API and documentation * Documentation updates for EC2. * `service/glue`: Updates service API and documentation * Support for optimistic locking in UpdateTable * `service/ssm`: Updates service documentation * Assorted ticket fixes and updates for AWS Systems Manager. ### SDK Features * `codegen`: Updates the SDK's code generation to stop supporting new API modeled JSONValue parameters. The SDK's JSONValue type is only compatible with JSON documents with a top level JSON Object. JSON Lists, Strings, Scalars, are not compatible. This prevents JSON Value working with some APIs such as Amazon Lex Runtime Service's operations. * Related to [#4264](#4264) and [#4258](#4258) ### SDK Bugs * `service/lexruntimeservice`: Introduces a breaking change for following parameters from a JSONValue to string type, because the SDKs JSONValue is not compatible with JSON documents of lists. * PostContentInput.ActiveContexts * PutContentOutput.AlternativeIntents * PutContentOutput.ActiveContexts * PutSessionOutput.ActiveContexts * Fixes [#4258](#4258)
Release v1.43.0 (2022-02-16) === ### Service Client Updates * `service/budgets`: Updates service API and documentation * Adds support for auto-adjusting budgets, a new budget method alongside fixed and planned. Auto-adjusting budgets introduces new metadata to configure a budget limit baseline using a historical lookback average or current period forecast. * `service/ce`: Updates service API * `service/ec2`: Updates service API and documentation * Documentation updates for EC2. * `service/glue`: Updates service API and documentation * Support for optimistic locking in UpdateTable * `service/ssm`: Updates service documentation * Assorted ticket fixes and updates for AWS Systems Manager. ### SDK Features * `codegen`: Updates the SDK's code generation to stop supporting new API modeled JSONValue parameters. The SDK's JSONValue type is only compatible with JSON documents with a top level JSON Object. JSON Lists, Strings, Scalars, are not compatible. This prevents JSON Value working with some APIs such as Amazon Lex Runtime Service's operations. * Related to [#4264](#4264) and [#4258](#4258) ### SDK Bugs * `service/lexruntimeservice`: Introduces a breaking change for following parameters from a JSONValue to string type, because the SDKs JSONValue is not compatible with JSON documents of lists. * PostContentInput.ActiveContexts * PutContentOutput.AlternativeIntents * PutContentOutput.ActiveContexts * PutSessionOutput.ActiveContexts * Fixes [#4258](#4258)
Deserialisation of the
X-Amz-Lex-Alternative-Intents
header fails because itis a JSON array, but
aws.JSONValue
is amap[string]interface{}
. Fix this bytreating
X-Amz-Lex-Alternative-Intents
as a base64 encoded string, which willnot be decoded and unmarshalled by the SDK. The caller of the SDK must manually
base64 decode and JSON unmarshal the field, in order to use the contents.
bug #4258