Rename Config and Plugin to service-specific names#699
Conversation
Alan4506
left a comment
There was a problem hiding this comment.
LGTM overall. Just curious: why add the changelog entries to aws-sdk-signers, smithy-aws-core, and smithy-aws-event-stream? None of those packages' source actually changes in this PR. Do we have a better way to surface this codegen-level change?
| var service = settings.service(model); | ||
| var name = service.getTrait(ServiceTrait.class) | ||
| .map(trait -> StringUtils.capitalize(trait.getSdkId()).replace(" ", "") + "Config") | ||
| .orElse("Config"); |
There was a problem hiding this comment.
What circumstances does this fallback come into play?
I'd think you need an SDK ID to generate a client, so I'm not sure this fallback is useful. Am I missing something?
There was a problem hiding this comment.
The fallback is for non-AWS (generic sdks) that don't have a ServiceTrait (no SDK ID). Updated the comment to clarify.
# Conflicts: # codegen/core/src/main/java/software/amazon/smithy/python/codegen/ClientGenerator.java
fdcc69b to
e535514
Compare
jonathan343
left a comment
There was a problem hiding this comment.
Thanks Ujjwal!
Our current documentation generation in aws/aws-sdk-python relies on the current config and plugin names. We'll need to simultaneously ship a change to use the updated names so we don't break our docs.
Issue #, if available:
Description of changes:
Rename generated Config class to service-specific names derived from ServiceTrait sdkId (e.g.,
BedrockRuntimeConfig). Similarly rename Plugin to<ServiceName>Plugin. Deprecated aliases withDeprecationWarningare generated for backwards compatibility. Generic (Non-AWS SDKs) remain unchanged.Testing
make test-pyandmake test-protocols)Configis usedConfigandBedrockRuntimeConfigsuccessfully make requests and receive responsesBedrockRuntimeConfig/BedrockRuntimePluginwith deprecated aliases as expectedBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.