Certain points in the client codegen appear to assume that the operation struct name and the operation name are interchangeable, which results in incorrectly-cased operation names in certain parts of the codegen. I noticed it in particular in the config block of impl RuntimePlugin.
An example of the incorrectly generated code, note the Metadata struct incorrectly created with an uppercase operation name, while it is properly respected in the Layer name:
fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
let mut cfg = ::aws_smithy_types::config_bag::Layer::new("myLowerCaseOperation");
cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
MyLowerCaseOperationRequestSerializer,
));
cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
MyLowerCaseOperationResponseDeserializer,
));
cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
));
cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("MyLowerCaseOperation", "my service name"));
::std::option::Option::Some(cfg.freeze())
}
Certain points in the client codegen appear to assume that the operation struct name and the operation name are interchangeable, which results in incorrectly-cased operation names in certain parts of the codegen. I noticed it in particular in the
configblock ofimpl RuntimePlugin.An example of the incorrectly generated code, note the
Metadatastruct incorrectly created with an uppercase operation name, while it is properly respected in theLayername: