-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support query compatible trait only for json protocol #3204
Changes from 4 commits
456ef0d
b855624
80cb22b
a54b0f6
2f221c5
2b078ff
e3c2082
58d1f31
1addb58
d890e65
ad14be8
1733616
819b765
e1e3344
0f2fc7a
fbb4a25
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -602,12 +602,16 @@ namespace Aws | |
SSOCredentialsClient::SSOCredentialsClient(const Aws::Client::ClientConfiguration& clientConfiguration, Aws::Http::Scheme scheme, const Aws::String& region) | ||
: AWSHttpResourceClient(clientConfiguration, SSO_RESOURCE_CLIENT_LOG_TAG) | ||
{ | ||
SetErrorMarshaller(Aws::MakeUnique<Aws::Client::JsonErrorMarshaller>(SSO_RESOURCE_CLIENT_LOG_TAG)); | ||
(Aws::MakeUnique<Aws::Client::JsonErrorMarshaller>( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ??? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure. I will revert this |
||
SSO_RESOURCE_CLIENT_LOG_TAG)); | ||
|
||
m_endpoint = buildEndpoint(scheme, region, "portal.sso.", "federation/credentials"); | ||
sbera87 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
m_oidcEndpoint = buildEndpoint(scheme, region, "oidc.", "token"); | ||
m_endpoint = buildEndpoint(scheme, region, "portal.sso.", | ||
"federation/credentials"); | ||
m_oidcEndpoint = buildEndpoint(scheme, region, "oidc.", "token"); | ||
|
||
AWS_LOGSTREAM_INFO(SSO_RESOURCE_CLIENT_LOG_TAG, "Creating SSO ResourceClient with endpoint: " << m_endpoint); | ||
AWS_LOGSTREAM_INFO( | ||
SSO_RESOURCE_CLIENT_LOG_TAG, | ||
"Creating SSO ResourceClient with endpoint: " << m_endpoint); | ||
} | ||
|
||
Aws::String SSOCredentialsClient::buildEndpoint( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,10 @@ namespace ${serviceNamespace} | |
class ${CppViewHelper.computeExportValue($metadata.classNamePrefix)} $className : public Aws::Client::JsonErrorMarshaller | ||
{ | ||
public: | ||
|
||
#if ($metadata.awsQueryCompatible) | ||
explicit $className(bool queryCompatibilityMode) : Aws::Client::JsonErrorMarshaller(queryCompatibilityMode){} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that we can make this code a little bit more maintainable using a decorator instead of a boolean. This also forces the query compatible decision to compile time and not runtime. i.e. we could do class JsonErrorMarshallerQueryCompatible: public JsonErrorMarshaller {
public:
AWSError<CoreErrors> Marshall(const Aws::Http::HttpResponse& response) const override {
//do special query compatible stuff
}
AWSError<CoreErrors> BuildAWSError(const std::shared_ptr<Http::HttpResponse>& httpResponse) const override {
//do special query compatible stuff
}
}; then at code generation time we could do
and avoid passing around true and falses |
||
#end | ||
Aws::Client::AWSError<Aws::Client::CoreErrors> FindErrorByName(const char* exceptionName) const override; | ||
}; | ||
|
||
|
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 guess smithy client needs to be updated as well.
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.
Ok, I will extend this to smithy client