Skip to content
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

Lowercase Operation Names are Not Fully Respected #4016

Open
SharkBaitDLS opened this issue Feb 14, 2025 · 0 comments
Open

Lowercase Operation Names are Not Fully Respected #4016

SharkBaitDLS opened this issue Feb 14, 2025 · 0 comments

Comments

@SharkBaitDLS
Copy link

SharkBaitDLS commented Feb 14, 2025

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())
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant