Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ public abstract class SchemaGenerationAllowlist {

@Deprecated
public static boolean allows(String serviceShapeId, TypeScriptSettings settings) {
return ALLOWED.contains(serviceShapeId) && settings.generateSchemas();
return settings.generateClient();
}

public static boolean allows(ShapeId serviceShapeId, TypeScriptSettings settings) {
return ALLOWED.contains(serviceShapeId.toString()) && settings.generateSchemas();
return settings.generateClient();
}

public static void allow(String serviceShapeId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,12 +521,12 @@ private void writeTraitsInContext(Shape context, Shape shape) {
TypeScriptWriter writer = getWriter(context.getId());
boolean useImportedStrings = !groupingIndex.isBaseGroup(context);

writer.write(
new SchemaTraitWriter(
shape, elision,
useImportedStrings ? store.useSchemaWriter(writer) : store
).toString()
);
String traitCode = new SchemaTraitWriter(
shape, elision,
useImportedStrings ? store.useSchemaWriter(writer) : store
).toString();

writer.write(traitCode.replace("$", "$$"));
}

/**
Expand Down
Loading