Skip to content

Commit 5b46fa6

Browse files
authored
chore: no export of strings in schema files (#1765)
1 parent d90999a commit 5b46fa6

File tree

4 files changed

+155
-199
lines changed

4 files changed

+155
-199
lines changed

private/smithy-rpcv2-cbor-schema/src/schemas/schemas_0.ts

Lines changed: 131 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -1,134 +1,134 @@
1-
export const _CE = "ComplexError";
2-
export const _CNED = "ComplexNestedErrorData";
3-
export const _COD = "ClientOptionalDefaults";
4-
export const _D = "Defaults";
5-
export const _DSM = "DenseSetMap";
6-
export const _DSMe = "DenseStructMap";
7-
export const _EIO = "EmptyInputOutput";
8-
export const _ES = "EmptyStructure";
9-
export const _F = "Foo";
10-
export const _FO = "Float16Output";
11-
export const _FS = "FractionalSeconds";
12-
export const _FSO = "FractionalSecondsOutput";
13-
export const _Fl = "Float16";
14-
export const _GS = "GreetingStruct";
15-
export const _GWE = "GreetingWithErrors";
16-
export const _GWEO = "GreetingWithErrorsOutput";
17-
export const _IG = "InvalidGreeting";
18-
export const _M = "Message";
19-
export const _N = "Nested";
20-
export const _NIO = "NoInputOutput";
21-
export const _NSL = "NestedStringList";
22-
export const _OIO = "OptionalInputOutput";
23-
export const _OWD = "OperationWithDefaults";
24-
export const _OWDI = "OperationWithDefaultsInput";
25-
export const _OWDO = "OperationWithDefaultsOutput";
26-
export const _RS = "RecursiveShapes";
27-
export const _RSIO = "RecursiveShapesInputOutput";
28-
export const _RSION = "RecursiveShapesInputOutputNested1";
29-
export const _RSIONe = "RecursiveShapesInputOutputNested2";
30-
export const _RVCDM = "RpcV2CborDenseMaps";
31-
export const _RVCDMIO = "RpcV2CborDenseMapsInputOutput";
32-
export const _RVCL = "RpcV2CborLists";
33-
export const _RVCLIO = "RpcV2CborListInputOutput";
34-
export const _RVCSM = "RpcV2CborSparseMaps";
35-
export const _RVCSMIO = "RpcV2CborSparseMapsInputOutput";
36-
export const _SBM = "SparseBooleanMap";
37-
export const _SL = "StructureList";
38-
export const _SLM = "StructureListMember";
39-
export const _SNM = "SparseNumberMap";
40-
export const _SNO = "SparseNullsOperation";
41-
export const _SNOIO = "SparseNullsOperationInputOutput";
42-
export const _SS = "SimpleStructure";
43-
export const _SSL = "SparseStringList";
44-
export const _SSM = "SparseSetMap";
45-
export const _SSMp = "SparseStructMap";
46-
export const _SSMpa = "SparseStringMap";
47-
export const _SSP = "SimpleScalarProperties";
48-
export const _SSS = "SimpleScalarStructure";
49-
export const _TL = "TopLevel";
50-
export const _VE = "ValidationException";
51-
export const _VEF = "ValidationExceptionField";
52-
export const _VEFL = "ValidationExceptionFieldList";
53-
export const _a = "a";
54-
export const _b = "bar";
55-
export const _bL = "booleanList";
56-
export const _bLl = "blobList";
57-
export const _bV = "byteValue";
58-
export const _bVl = "blobValue";
59-
export const _b_ = "b";
60-
export const _c = "client";
61-
export const _cOD = "clientOptionalDefaults";
62-
export const _d = "datetime";
63-
export const _dB = "defaultBoolean";
64-
export const _dBM = "denseBooleanMap";
65-
export const _dBe = "defaultBlob";
66-
export const _dBef = "defaultByte";
67-
export const _dD = "defaultDouble";
68-
export const _dE = "defaultEnum";
69-
export const _dF = "defaultFloat";
70-
export const _dI = "defaultInteger";
71-
export const _dIE = "defaultIntEnum";
72-
export const _dL = "defaultList";
73-
export const _dLe = "defaultLong";
74-
export const _dM = "defaultMap";
75-
export const _dNM = "denseNumberMap";
76-
export const _dS = "defaultString";
77-
export const _dSM = "denseStructMap";
78-
export const _dSMe = "denseStringMap";
79-
export const _dSMen = "denseSetMap";
80-
export const _dSe = "defaultShort";
81-
export const _dT = "defaultTimestamp";
82-
export const _dV = "doubleValue";
83-
export const _de = "defaults";
84-
export const _e = "error";
85-
export const _eB = "emptyBlob";
86-
export const _eL = "enumList";
87-
export const _eS = "emptyString";
88-
export const _f = "foo";
89-
export const _fB = "falseBoolean";
90-
export const _fBV = "falseBooleanValue";
91-
export const _fL = "fieldList";
92-
export const _fV = "floatValue";
93-
export const _g = "greeting";
94-
export const _h = "hi";
95-
export const _iEL = "intEnumList";
96-
export const _iL = "integerList";
97-
export const _iV = "integerValue";
98-
export const _lV = "longValue";
99-
export const _m = "message";
100-
export const _me = "member";
101-
export const _n = "nested";
102-
export const _nSL = "nestedStringList";
103-
export const _oTLD = "otherTopLevelDefault";
104-
export const _p = "path";
105-
export const _rM = "recursiveMember";
106-
export const _s = "sparse";
107-
export const _sBM = "sparseBooleanMap";
108-
export const _sC = "smithy.ts.sdk.synthetic.smithy.protocoltests.rpcv2Cbor";
109-
export const _sL = "stringList";
110-
export const _sLt = "structureList";
111-
export const _sNM = "sparseNumberMap";
112-
export const _sS = "stringSet";
113-
export const _sSL = "sparseStringList";
114-
export const _sSM = "sparseStructMap";
115-
export const _sSMp = "sparseStringMap";
116-
export const _sSMpa = "sparseSetMap";
117-
export const _sV = "shortValue";
118-
export const _sVt = "stringValue";
119-
export const _tBV = "trueBooleanValue";
120-
export const _tL = "timestampList";
121-
export const _tLD = "topLevelDefault";
122-
export const _v = "value";
123-
export const _zB = "zeroByte";
124-
export const _zD = "zeroDouble";
125-
export const _zF = "zeroFloat";
126-
export const _zI = "zeroInteger";
127-
export const _zL = "zeroLong";
128-
export const _zS = "zeroShort";
129-
export const n0 = "smithy.framework";
130-
export const n1 = "smithy.protocoltests.rpcv2Cbor";
131-
export const n2 = "smithy.protocoltests.shared";
1+
const _CE = "ComplexError";
2+
const _CNED = "ComplexNestedErrorData";
3+
const _COD = "ClientOptionalDefaults";
4+
const _D = "Defaults";
5+
const _DSM = "DenseSetMap";
6+
const _DSMe = "DenseStructMap";
7+
const _EIO = "EmptyInputOutput";
8+
const _ES = "EmptyStructure";
9+
const _F = "Foo";
10+
const _FO = "Float16Output";
11+
const _FS = "FractionalSeconds";
12+
const _FSO = "FractionalSecondsOutput";
13+
const _Fl = "Float16";
14+
const _GS = "GreetingStruct";
15+
const _GWE = "GreetingWithErrors";
16+
const _GWEO = "GreetingWithErrorsOutput";
17+
const _IG = "InvalidGreeting";
18+
const _M = "Message";
19+
const _N = "Nested";
20+
const _NIO = "NoInputOutput";
21+
const _NSL = "NestedStringList";
22+
const _OIO = "OptionalInputOutput";
23+
const _OWD = "OperationWithDefaults";
24+
const _OWDI = "OperationWithDefaultsInput";
25+
const _OWDO = "OperationWithDefaultsOutput";
26+
const _RS = "RecursiveShapes";
27+
const _RSIO = "RecursiveShapesInputOutput";
28+
const _RSION = "RecursiveShapesInputOutputNested1";
29+
const _RSIONe = "RecursiveShapesInputOutputNested2";
30+
const _RVCDM = "RpcV2CborDenseMaps";
31+
const _RVCDMIO = "RpcV2CborDenseMapsInputOutput";
32+
const _RVCL = "RpcV2CborLists";
33+
const _RVCLIO = "RpcV2CborListInputOutput";
34+
const _RVCSM = "RpcV2CborSparseMaps";
35+
const _RVCSMIO = "RpcV2CborSparseMapsInputOutput";
36+
const _SBM = "SparseBooleanMap";
37+
const _SL = "StructureList";
38+
const _SLM = "StructureListMember";
39+
const _SNM = "SparseNumberMap";
40+
const _SNO = "SparseNullsOperation";
41+
const _SNOIO = "SparseNullsOperationInputOutput";
42+
const _SS = "SimpleStructure";
43+
const _SSL = "SparseStringList";
44+
const _SSM = "SparseSetMap";
45+
const _SSMp = "SparseStructMap";
46+
const _SSMpa = "SparseStringMap";
47+
const _SSP = "SimpleScalarProperties";
48+
const _SSS = "SimpleScalarStructure";
49+
const _TL = "TopLevel";
50+
const _VE = "ValidationException";
51+
const _VEF = "ValidationExceptionField";
52+
const _VEFL = "ValidationExceptionFieldList";
53+
const _a = "a";
54+
const _b = "bar";
55+
const _bL = "booleanList";
56+
const _bLl = "blobList";
57+
const _bV = "byteValue";
58+
const _bVl = "blobValue";
59+
const _b_ = "b";
60+
const _c = "client";
61+
const _cOD = "clientOptionalDefaults";
62+
const _d = "datetime";
63+
const _dB = "defaultBoolean";
64+
const _dBM = "denseBooleanMap";
65+
const _dBe = "defaultBlob";
66+
const _dBef = "defaultByte";
67+
const _dD = "defaultDouble";
68+
const _dE = "defaultEnum";
69+
const _dF = "defaultFloat";
70+
const _dI = "defaultInteger";
71+
const _dIE = "defaultIntEnum";
72+
const _dL = "defaultList";
73+
const _dLe = "defaultLong";
74+
const _dM = "defaultMap";
75+
const _dNM = "denseNumberMap";
76+
const _dS = "defaultString";
77+
const _dSM = "denseStructMap";
78+
const _dSMe = "denseStringMap";
79+
const _dSMen = "denseSetMap";
80+
const _dSe = "defaultShort";
81+
const _dT = "defaultTimestamp";
82+
const _dV = "doubleValue";
83+
const _de = "defaults";
84+
const _e = "error";
85+
const _eB = "emptyBlob";
86+
const _eL = "enumList";
87+
const _eS = "emptyString";
88+
const _f = "foo";
89+
const _fB = "falseBoolean";
90+
const _fBV = "falseBooleanValue";
91+
const _fL = "fieldList";
92+
const _fV = "floatValue";
93+
const _g = "greeting";
94+
const _h = "hi";
95+
const _iEL = "intEnumList";
96+
const _iL = "integerList";
97+
const _iV = "integerValue";
98+
const _lV = "longValue";
99+
const _m = "message";
100+
const _me = "member";
101+
const _n = "nested";
102+
const _nSL = "nestedStringList";
103+
const _oTLD = "otherTopLevelDefault";
104+
const _p = "path";
105+
const _rM = "recursiveMember";
106+
const _s = "sparse";
107+
const _sBM = "sparseBooleanMap";
108+
const _sC = "smithy.ts.sdk.synthetic.smithy.protocoltests.rpcv2Cbor";
109+
const _sL = "stringList";
110+
const _sLt = "structureList";
111+
const _sNM = "sparseNumberMap";
112+
const _sS = "stringSet";
113+
const _sSL = "sparseStringList";
114+
const _sSM = "sparseStructMap";
115+
const _sSMp = "sparseStringMap";
116+
const _sSMpa = "sparseSetMap";
117+
const _sV = "shortValue";
118+
const _sVt = "stringValue";
119+
const _tBV = "trueBooleanValue";
120+
const _tL = "timestampList";
121+
const _tLD = "topLevelDefault";
122+
const _v = "value";
123+
const _zB = "zeroByte";
124+
const _zD = "zeroDouble";
125+
const _zF = "zeroFloat";
126+
const _zI = "zeroInteger";
127+
const _zL = "zeroLong";
128+
const _zS = "zeroShort";
129+
const n0 = "smithy.framework";
130+
const n1 = "smithy.protocoltests.rpcv2Cbor";
131+
const n2 = "smithy.protocoltests.shared";
132132

133133
// smithy-typescript generated code
134134
import { RpcV2ProtocolServiceException as __RpcV2ProtocolServiceException } from "../models/RpcV2ProtocolServiceException";

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/CommandGenerator.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
import software.amazon.smithy.typescript.codegen.integration.ProtocolGenerator;
6262
import software.amazon.smithy.typescript.codegen.integration.RuntimeClientPlugin;
6363
import software.amazon.smithy.typescript.codegen.schema.SchemaGenerationAllowlist;
64-
import software.amazon.smithy.typescript.codegen.schema.ShapeGroupingIndex;
6564
import software.amazon.smithy.typescript.codegen.sections.CommandBodyExtraCodeSection;
6665
import software.amazon.smithy.typescript.codegen.sections.CommandConstructorCodeSection;
6766
import software.amazon.smithy.typescript.codegen.sections.CommandPropertiesCodeSection;
@@ -671,10 +670,9 @@ private void addCommandSpecificPlugins() {
671670
}
672671

673672
private void writeSchemaSerde() {
674-
ShapeGroupingIndex shapeTree = ShapeGroupingIndex.of(model);
675673
String operationSchema = reservedWords.escape(operation.getId().getName());
676674
writer.addRelativeImport(operationSchema, null, Paths.get(
677-
".", CodegenUtils.SOURCE_FOLDER, SCHEMAS_FOLDER, shapeTree.getGroup(operation.getId())
675+
".", CodegenUtils.SOURCE_FOLDER, SCHEMAS_FOLDER, "schemas_0"
678676
));
679677
writer.write("""
680678
.sc($L)""",

0 commit comments

Comments
 (0)