Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Commit

Permalink
Add documentation link in discovery files
Browse files Browse the repository at this point in the history
  • Loading branch information
kaldebert authored and tangiel committed Feb 2, 2018
1 parent 1bb02fd commit 49d17fc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ private RestDescription writeApi(ApiKey apiKey, Iterable<ApiConfig> apiConfigs,
if (config.getTitle() != null) {
doc.setTitle(config.getTitle());
}
if (config.getDocumentationLink() != null) {
doc.setDocumentationLink(config.getDocumentationLink());
}
if (config.getNamespaceConfig() != null) {
ApiNamespaceConfig namespaceConfig = config.getNamespaceConfig();
if (!Strings.isEmptyOrWhitespace(namespaceConfig.getOwnerName())) {
Expand Down Expand Up @@ -392,7 +395,8 @@ private DirectoryList generateDirectory(Map<ApiKey, RestDescription> discoveryDo
.setName(doc.getName())
.setPreferred(preferred.contains(entry.getKey()))
.setTitle(doc.getTitle())
.setVersion(doc.getVersion()));
.setVersion(doc.getVersion())
.setDocumentationLink(doc.getDocumentationLink()));
}
return directory.setItems(items);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"batchPath": "batch",
"description": "Just Foo Things",
"discoveryVersion": "v1",
"documentationLink": "https://example.com",
"icons": {
"x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png",
"x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"batchPath": "batch",
"description": "Just Foo Things",
"discoveryVersion": "v1",
"documentationLink": "https://example.com",
"icons": {
"x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png",
"x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"batchPath": "batch",
"description": "Just Foo Things",
"discoveryVersion": "v1",
"documentationLink": "https://example.com",
"icons": {
"x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png",
"x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
version = "v1",
audiences = {"audience"},
title = "The Foo API",
description = "Just Foo Things")
description = "Just Foo Things",
documentationLink = "https://example.com")
public class FooEndpoint {
@ApiMethod(name = "foo.create", description = "create desc", path = "foos/{id}",
httpMethod = HttpMethod.PUT)
Expand Down

0 comments on commit 49d17fc

Please sign in to comment.