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 37847db
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .changelog/bugfix-fix-legacy-id-table.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,5 +2,5 @@
2
2
"type": "bugfix",
3
3
"category": "tools",
4
4
"contributor": "",
5
-
"description": "Derive generated service client namespaces from the service ID (codegen ID) in both the C2J and Smithy code generators. Generated client output is unchanged."
5
+
"description": "Derive generated service client namespaces from the service ID in both the C2J and Smithy code generators. Generated client output is unchanged."
Copy file name to clipboardExpand all lines: tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/domainmodels/codegeneration/Metadata.java
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -72,13 +72,15 @@ public String findFirstSupportedProtocol() {
72
72
returnprotocol;
73
73
}
74
74
75
-
//We're releasing CBOR so current services (only arc-region-switch) need to opt into the new protocol priority
76
-
if (serviceFullName != null && serviceFullName.equalsIgnoreCase("ARC - Region switch")){
75
+
//We're releasing CBOR so current services (only arc-region-switch) need to opt into the new protocol priority.
76
+
//Match on the service id (serviceId), NOT the display name (serviceFullName), so a
77
+
//display-name change can never silently flip the wire protocol (JSON <-> CBOR).
78
+
if (serviceId != null && serviceId.equalsIgnoreCase("ARC Region switch")){
Copy file name to clipboardExpand all lines: tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/transform/C2jModelToGeneratorModelTransformer.java
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -52,10 +52,10 @@ public class C2jModelToGeneratorModelTransformer {
52
52
UNSUPPORTEDHTMLTAGS.add("</important>");
53
53
}
54
54
55
-
// SEP exception: a few ancient models carry no "serviceId" at all, so their namespace cannot
56
-
// be keyed by one (the Service ID SEP forbids keying on a docgen id, endpoint prefix, or model
57
-
// file name). Their already-released namespaces are therefore preserved by model (service)
58
-
// name. Every other preserved namespace lives in the shared, serviceId-keyed identifier table
55
+
// A few ancient models carry no "serviceId" at all, so their namespace cannot be keyed by one
56
+
// (identifiers must not be keyed on a display name, endpoint prefix, or model file name). Their
57
+
// already-released namespaces are therefore preserved by model (service) name. Every other
58
+
// preserved namespace lives in the shared, serviceId-keyed identifier table
59
59
// (service-namespace-table.json via ServiceNamespaceTable).
Copy file name to clipboardExpand all lines: tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/transform/ServiceNamespaceTable.java
+9-8Lines changed: 9 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -16,15 +16,16 @@
16
16
importjava.util.Map;
17
17
18
18
/**
19
-
* Static, checked-in table that preserves the C++ SDK service namespaces released before
20
-
* Revision 2 of the Service ID SEP (seps/accepted/shared/service-id.md) that diverge from the
21
-
* namespace derived from the service's codegen id ("serviceId").
19
+
* Static, checked-in table that preserves the C++ SDK service namespaces that diverge from the
20
+
* namespace derived from the service's {@code "serviceId"} (so previously released names stay
21
+
* stable).
22
22
*
23
-
* <p>The table is keyed by the exact, untransformed "serviceId" and is loaded from the shared
24
-
* data file {@code service-namespace-table.json}, which is the single source of truth shared
25
-
* with the Smithy generator. The SEP forbids keying on a docgen id, an endpoint prefix, or a
26
-
* model file name, and forbids deriving the preserved value from any of those; the values here
27
-
* are frozen literals, not computed from model metadata at generation time.
23
+
* <p>The table is keyed by the exact, untransformed {@code "serviceId"} and is loaded from the
24
+
* shared data file {@code service-namespace-table.json}, which is the single source of truth
25
+
* shared with the Smithy generator. Identifiers are derived from {@code "serviceId"} only, never
26
+
* from the display-name fields ({@code serviceAbbreviation}/{@code serviceFullName}), the endpoint
27
+
* prefix, or the model file name; the values here are frozen literals, not computed from model
Copy file name to clipboardExpand all lines: tools/code-generation/smithy/cpp-codegen/smithy-cpp-codegen/src/main/java/com/amazonaws/util/awsclientsmithygenerator/generators/ServiceNameUtil.java
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -16,10 +16,10 @@ public final class ServiceNameUtil {
Copy file name to clipboardExpand all lines: tools/code-generation/smithy/cpp-codegen/smithy-cpp-codegen/src/main/java/com/amazonaws/util/awsclientsmithygenerator/generators/ServiceNamespaceTable.java
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -16,17 +16,17 @@
16
16
importjava.util.Map;
17
17
18
18
/**
19
-
* Static, checked-in table preserving the C++ SDK service namespaces released before Revision 2
20
-
* of the Service ID SEP (seps/accepted/shared/service-id.md) that diverge from the namespace
21
-
* derived from the service's codegen id ("serviceId" == Smithy sdkId).
19
+
* Static, checked-in table preserving the C++ SDK service namespaces that diverge from the
20
+
* namespace derived from the service's {@code "serviceId"} (== Smithy sdkId), so previously
21
+
* released names stay stable.
22
22
*
23
23
* <p>This loads the SAME shared data file as the C2J generator
24
24
* ({@code tools/code-generation/shared/service-namespace-table.json}), the single source of truth.
25
-
* The file is keyed by the exact, untransformed serviceId per the SEP. Because the Smithy
26
-
* generator queries with a sanitized, lower-cased serviceId, this class builds a lookup index
27
-
* keyed by {@code sanitizeServiceAbbreviation(serviceId).toLowerCase()} (the same normalization
25
+
* The file is keyed by the exact, untransformed serviceId. Because the Smithy generator queries
26
+
* with a sanitized, lower-cased serviceId, this class builds a lookup index keyed by
27
+
* {@code sanitizeServiceAbbreviation(serviceId).toLowerCase()} (the same normalization
28
28
* {@link ServiceNameUtil#getServiceName} applies). The stored values are frozen literals, never
29
-
* derived from a docgen id, endpoint prefix, or model file name.
29
+
* derived from the display-name fields, endpoint prefix, or model file name.
0 commit comments