Skip to content

Commit

Permalink
add annotation to package docs when the service shape is deprecated (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lucix-aws authored Oct 8, 2024
1 parent 90c085e commit e3a9df9
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,13 @@ public boolean writePackageShapeDocs(Shape shape) {
.map(DocumentationTrait::getValue)
.map(docs -> {
writePackageDocs(docs);
if (shape.hasTrait(DeprecatedTrait.class)) {
var message = shape.expectTrait(DeprecatedTrait.class)
.getMessage()
.orElse("This package is deprecated.");
writePackageDocs("");
writePackageDocs("Deprecated: " + message);
}
return true;
}).orElse(false);
}
Expand Down

0 comments on commit e3a9df9

Please sign in to comment.