Skip to content

Commit ee514a4

Browse files
committed
some services only exist in c2j and not smithy, added temporary solution to generate them. added patch for crt
1 parent 17e28a5 commit ee514a4

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

tools/code-generation/smithy/codegen/cpp-pagination-codegen/src/main/java/com/amazonaws/util/awsclientsmithygenerator/generators/templates/PaginationCodegenPlugin.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public void execute(PluginContext context) {
3737

3838
// TODO: Remove this workaround - mock projections should use proper Smithy model generation
3939
// instead of manually writing files in the plugin
40+
// Currently only needed for importexport, sdb (SimpleDB), and s3-crt
4041
// Check if this is a legacy service mock projection
4142
String projectionName = context.getProjectionName();
4243
if (projectionName.endsWith(".mock")) {
@@ -94,6 +95,7 @@ private void generateLegacyServiceFile(PluginContext context) {
9495
Map<String, String> legacyServices = new HashMap<>();
9596
legacyServices.put("importexport", "ImportExport");
9697
legacyServices.put("sdb", "SimpleDB");
98+
legacyServices.put("s3-crt", "S3Crt");
9799

98100
String projectionName = context.getProjectionName();
99101
String c2jName = projectionName.replace(".mock", "");

tools/code-generation/smithy/codegen/cpp-pagination/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,11 @@ tasks.register("generate-smithy-build") {
7575
projectionsBuilder.withMember("$sdkId.${service.version.lowercase()}", projectionContents)
7676
}
7777

78-
// TODO: Remove this workaround - legacy services should have proper Smithy models
78+
// TODO: Remove this workaround - legacy services should have proper Smithy model files
7979
// instead of hardcoding service names in both Gradle and Java
80+
// Currently only needed for importexport, sdb (SimpleDB), and s3-crt
8081
// Add mock projections for legacy C2J-only services
81-
val legacyServices = mapOf("importexport" to "ImportExport", "sdb" to "SimpleDB")
82+
val legacyServices = mapOf("importexport" to "ImportExport", "sdb" to "SimpleDB", "s3-crt" to "S3Crt")
8283
legacyServices.forEach { (c2jName, pascalName) ->
8384
if (filteredServiceList.isEmpty() || c2jName in filteredServiceList) {
8485
val mockProjectionContents = Node.objectNodeBuilder()

0 commit comments

Comments
 (0)