Skip to content

Commit 32a19e0

Browse files
committed
schema testing
1 parent b20705d commit 32a19e0

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
@@ -535,12 +535,12 @@ private void writeTraitsInContext(Shape context, Shape shape) {
535535
TypeScriptWriter writer = getWriter(context.getId());
536536
boolean useImportedStrings = !groupingIndex.isBaseGroup(context);
537537

538-
writer.write(
539-
new SchemaTraitWriter(
540-
shape, elision,
541-
useImportedStrings ? store.useSchemaWriter(writer) : store
542-
).toString()
543-
);
538+
String traitCode = new SchemaTraitWriter(
539+
shape, elision,
540+
useImportedStrings ? store.useSchemaWriter(writer) : store
541+
).toString();
542+
543+
writer.write(traitCode.replace("$", "$$"));
544544
}
545545

546546
/**

0 commit comments

Comments
 (0)