Skip to content

Lowercase Operation Names are Not Fully Respected #4016

Description

@SharkBaitDLS

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())
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions