File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed
smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -132,9 +132,6 @@ abstract class GenerateSmithyBuildTask : DefaultTask() {
132132 val useLegacyAuthServices = setOf<String >(
133133 // e.g. "S3" - use this as exclusion list if needed.
134134 )
135- val useSchemaSerde = setOf<String >(
136- // "S3"
137- )
138135 val projectionContents = Node .objectNodeBuilder()
139136 .withMember(" imports" , Node .fromStrings(" ${modelsDirFile.absolutePath}${File .separator}${file.name} " ))
140137 .withMember(" plugins" , Node .objectNode()
@@ -147,8 +144,7 @@ abstract class GenerateSmithyBuildTask : DefaultTask() {
147144 + clientName + " Client for Node.js, Browser and React Native" )
148145 .withMember(" useLegacyAuth" ,
149146 useLegacyAuthServices.contains(serviceTrait.sdkId))
150- .withMember(" generateSchemas" ,
151- useSchemaSerde.contains(serviceTrait.sdkId))
147+ .withMember(" generateSchemas" , true )
152148 .build()))
153149 .build()
154150 projectionsBuilder.withMember(sdkId + " ." + version.lowercase(), projectionContents)
Original file line number Diff line number Diff line change 1919import software .amazon .smithy .aws .traits .protocols .RestXmlTrait ;
2020import software .amazon .smithy .codegen .core .SymbolProvider ;
2121import software .amazon .smithy .model .Model ;
22+ import software .amazon .smithy .model .shapes .ShapeId ;
2223import software .amazon .smithy .model .traits .XmlNamespaceTrait ;
2324import software .amazon .smithy .protocol .traits .Rpcv2CborTrait ;
2425import software .amazon .smithy .typescript .codegen .LanguageTarget ;
3738public final class AddProtocolConfig implements TypeScriptIntegration {
3839
3940 public AddProtocolConfig () {
40- SchemaGenerationAllowlist .allow ("com.amazonaws.s3#AmazonS3" );
41- SchemaGenerationAllowlist .allow ("com.amazonaws.dynamodb#DynamoDB_20120810" );
42- SchemaGenerationAllowlist .allow ("com.amazonaws.lambda#AWSGirApiService" );
43- SchemaGenerationAllowlist .allow ("com.amazonaws.cloudwatchlogs#Logs_20140328" );
44- SchemaGenerationAllowlist .allow ("com.amazonaws.sts#AWSSecurityTokenServiceV20110615" );
41+ List <ShapeId > allowed = List .of (
42+ AwsJson1_0Trait .ID ,
43+ AwsJson1_1Trait .ID
44+ );
45+ List <ShapeId > pending = List .of (
46+ RestJson1Trait .ID ,
47+ Ec2QueryTrait .ID ,
48+ AwsQueryTrait .ID ,
49+ RestXmlTrait .ID
50+ );
51+ for (ShapeId shapeId : allowed ) {
52+ SchemaGenerationAllowlist .allowProtocol (shapeId );
53+ assert !pending .contains (shapeId );
54+ }
4555
4656 // protocol tests
4757 SchemaGenerationAllowlist .allow ("aws.protocoltests.json10#JsonRpc10" );
You can’t perform that action at this time.
0 commit comments