You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c4100f5
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/transform/C2jModelToGeneratorModelTransformer.java
+54-73Lines changed: 54 additions & 73 deletions
Original file line number
Diff line number
Diff line change
@@ -52,63 +52,15 @@ public class C2jModelToGeneratorModelTransformer {
52
52
UNSUPPORTEDHTMLTAGS.add("</important>");
53
53
}
54
54
55
-
// A list of non-compliant service models that are already released, so we keep them backward-compatible.
serviceId = c2jMetadata.getServiceFullName(); // fallback to full name for legacy already released models
324
-
}
325
-
if(serviceId == null || serviceId.isEmpty()) {
326
-
thrownewSourceGenerationFailedException(String.format("Service model file %s must have metadata.serviceId present", c2jServiceModel.getServiceName()));
Copy file name to clipboardExpand all lines: tools/code-generation/generator/src/test/java/com/amazonaws/util/awsclientgenerator/transform/C2jModelToGeneratorModelTransformerTest.java
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -77,12 +77,19 @@ public void testMetadataConversationWithStandalonePackages() {
77
77
c2jMetadata.setServiceFullName("Amazon AWS Service Abbr Full Name");
78
78
c2jMetadata.setSignatureVersion("v4");
79
79
c2jMetadata.setTargetPrefix("ServiceAbbr.");
80
+
// The namespace is derived from serviceId only (serviceAbbreviation / serviceFullName are
81
+
// no longer read), so the model must carry a serviceId. A deliberately "dirty" serviceId
82
+
// (distinct from the serviceAbbreviation above) verifies sanitizeServiceAbbreviation runs
83
+
// AND that the transformer reads serviceId, not the abbreviation:
0 commit comments