Open Jianru-Lin opened 6 months ago
Hi @Jianru-Lin ,
Thanks for reaching out. If you didn't know the AWS SDKs are code generated from the API models defined by each service team. In this case, the Cloudfront team has modeled this enum with all lowercase values as seen in the internal API model that each SDK holds.
I would have to reach out to the Cloudfront service team to either change the enum value or correct the value they return.
Aside from spotting the discrepancy, is there anything here that is blocking you?
Thanks, Ran~
P110186243
@RanVaknin Thank you for reporting this bug to Cloudfront service team.
Add a comment and paste drop markdown is also supported in the file also.
Checkboxes for prior research
Describe the bug
I am working on integrating the Cloudfront service with our internal system.
However, I found that the ListDistributionsCommand returns the incorrect "HttpVersion" value.
It returns "HTTP2and3" instead of "http2and3".
SDK version number
@aws-sdk/client-cloudfront@3.477.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v20.9.0
Reproduction Steps
@aws-sdk/client-cloudfront
to send aListDistributionsCommand
request. Check the response to reproduce the bug.Observed Behavior
This is what I got from aws server:
Expected Behavior
The value of the "HttpVersion" field should be "http2and3" instead of "HTTP2and3".
This value is incorrect because it does not align with two things:
/node_modules/@aws-sdk/client-cloudfront/dist-types/models/models_0.d.ts
GetDistributionCommand
returns (it returns the right value "http2and3")Possible Solution
No response
Additional Information/Context
For reference purpose, this is what defined in
/node_modules/@aws-sdk/client-cloudfront/dist-types/models/models_0.d.ts
: