Skip to content
Open
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 @@ -38,6 +38,8 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
///
/// GoldenKitchenSinkClient
///
/// This client uses GoldenKitchenSink version test-api-version.
///
/// @par Equality
///
/// Instances of this class created via copy-construction or copy-assignment
Expand Down
7 changes: 7 additions & 0 deletions generator/internal/format_class_comments.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "google/cloud/internal/absl_str_replace_quiet.h"
#include "google/cloud/log.h"
#include "absl/strings/strip.h"
#include <google/api/client.pb.h>

namespace google {
namespace cloud {
Expand Down Expand Up @@ -78,6 +79,12 @@ std::string FormatClassCommentsFromServiceComments(
{service.name(), service_name}});
}

auto api_version = service.options().GetExtension(google::api::api_version);
if (!api_version.empty()) {
absl::StrAppend(&formatted_comments, "\n///\n/// This client uses ",
service_name, " version ", api_version, ".");
}

auto const references =
ResolveCommentReferences(formatted_comments, *service.file()->pool());
auto trailer = std::string{};
Expand Down
Loading