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(endpoint): dedupe clientContext/builtIn params, fix s3 unit test #4051
Conversation
return Promise.resolve({ output: {} as any, response: {} as any }); | ||
}; | ||
const client = new S3({ endpoint: "http://localhost:8080/path?foo=bar" }); | ||
const client = new S3({ endpoint: "http://localhost:8080/path", forcePathStyle: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we no longer test the omission of the query param, because endpoints 2.0 requires that a query param custom endpoint be rejected instead of modified.
"DisableMultiRegionAccessPoints", "disableMultiregionAccessPoints", | ||
"UseArnRegion", "useArnRegion", | ||
"Endpoint", "endpoint", | ||
"UseGlobalEndpoint", "useGlobalEndpoint" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm setting more param names to match our existing param names.
The codegen has also been modified to default to camelCase
if this map does not cover future params.
.map(([k, v]) => `${k}=${v}`) | ||
.join("&"); | ||
return url; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is to cover deprecated behavior: resolveEndpointConfig.ts
changes the endpoint
config to return a V1 endpoint for use by Upload
and the s3 signer.
Here we convert it back to a URL to enforce consistency in the endpoints 2.0 resolver.
return new URL(value); | ||
} catch (error) { | ||
return null; | ||
} | ||
})(); | ||
|
||
if (!whatwgURL) { | ||
console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a message here because the endpoints resolved error gives too little info.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
paired with smithy-lang/smithy-typescript#616
camelCase