Skip to content

Commit

Permalink
Only capitalize first letter of resource lifecycle
Browse files Browse the repository at this point in the history
  • Loading branch information
JordonPhillips committed Nov 14, 2023
1 parent 9638c4c commit 2307860
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package software.amazon.smithy.docgen.core.generators;

import java.util.HashSet;
import java.util.Locale;
import java.util.function.BiConsumer;
import software.amazon.smithy.codegen.core.SymbolReference;
import software.amazon.smithy.docgen.core.DocGenerationContext;
Expand All @@ -22,6 +23,7 @@
import software.amazon.smithy.model.shapes.OperationShape;
import software.amazon.smithy.model.shapes.ResourceShape;
import software.amazon.smithy.utils.SmithyInternalApi;
import software.amazon.smithy.utils.StringUtils;

/**
* Generates documentation for the resources.
Expand Down Expand Up @@ -190,7 +192,7 @@ private void writeLifecycleListing(
writer.openListItem(ListType.UNORDERED);
var reference = SymbolReference.builder()
.symbol(context.symbolProvider().toSymbol(operation))
.alias(lifecycleType.name())
.alias(StringUtils.capitalize(lifecycleType.name().toLowerCase(Locale.ENGLISH)))
.build();
writer.writeInline("$R: ", reference).writeShapeDocs(operation, context.model());
writer.closeListItem(ListType.UNORDERED);
Expand Down

0 comments on commit 2307860

Please sign in to comment.