Skip to content

Commit 8eb3430

Browse files
committed
schema testing
1 parent 47537af commit 8eb3430

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/schema/SchemaGenerationAllowlist.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ public abstract class SchemaGenerationAllowlist {
2727

2828
@Deprecated
2929
public static boolean allows(String serviceShapeId, TypeScriptSettings settings) {
30-
return ALLOWED.contains(serviceShapeId) && settings.generateSchemas();
30+
return true;
3131
}
3232

3333
public static boolean allows(ShapeId serviceShapeId, TypeScriptSettings settings) {
34-
return ALLOWED.contains(serviceShapeId.toString()) && settings.generateSchemas();
34+
return true;
3535
}
3636

3737
public static void allow(String serviceShapeId) {

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/schema/SchemaGenerator.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -521,12 +521,12 @@ private void writeTraitsInContext(Shape context, Shape shape) {
521521
TypeScriptWriter writer = getWriter(context.getId());
522522
boolean useImportedStrings = !groupingIndex.isBaseGroup(context);
523523

524-
writer.write(
525-
new SchemaTraitWriter(
526-
shape, elision,
527-
useImportedStrings ? store.useSchemaWriter(writer) : store
528-
).toString()
529-
);
524+
String traitCode = new SchemaTraitWriter(
525+
shape, elision,
526+
useImportedStrings ? store.useSchemaWriter(writer) : store
527+
).toString();
528+
529+
writer.write(traitCode.replace("$", "$$"));
530530
}
531531

532532
/**

0 commit comments

Comments
 (0)