You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ur...@apache.org on 2022/08/09 07:11:50 UTC

[pulsar-site] branch lookup-rest-api created (now ad05cc10d73)

This is an automated email from the ASF dual-hosted git repository.

urfree pushed a change to branch lookup-rest-api
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


      at ad05cc10d73 feat: add lookup rest api page

This branch includes the following new commits:

     new ad05cc10d73 feat: add lookup rest api page

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[pulsar-site] 01/01: feat: add lookup rest api page

Posted by ur...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

urfree pushed a commit to branch lookup-rest-api
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git

commit ad05cc10d7354beb82ee6ef7edd0b9bcc0503163
Author: Li Li <ur...@apache.org>
AuthorDate: Tue Aug 9 15:11:39 2022 +0800

    feat: add lookup rest api page
    
    Signed-off-by: Li Li <ur...@apache.org>
---
 site2/website-next/docusaurus.config.js      | 3 +++
 site2/website-next/src/components/RestApi.js | 7 +++++++
 2 files changed, 10 insertions(+)

diff --git a/site2/website-next/docusaurus.config.js b/site2/website-next/docusaurus.config.js
index 64ba65dc361..f1ca6eee2d1 100644
--- a/site2/website-next/docusaurus.config.js
+++ b/site2/website-next/docusaurus.config.js
@@ -42,6 +42,7 @@ const sourceApiUrl = url + "/source-rest-api";
 const sinkApiUrl = url + "/sink-rest-api";
 const packagesApiUrl = url + "/packages-rest-api";
 const transactionsApiUrl = url + "/transactions-rest-api";
+const lookupApiUrl = url + "/lookup-rest-api";
 const githubUrl = "https://github.com/apache/pulsar";
 const baseUrl = "/";
 
@@ -109,6 +110,8 @@ const injectLinkParseForEndpoint = ([, info]) => {
     restBaseUrl = packagesApiUrl;
   } else if (restApiType == "transactions") {
     restBaseUrl = transactionsApiUrl;
+  } else if (restApiType == "lookup") {
+    restBaseUrl = lookupApiUrl;
   }
   let restUrl = "";
   if (suffix.indexOf("?version=") >= 0) {
diff --git a/site2/website-next/src/components/RestApi.js b/site2/website-next/src/components/RestApi.js
index 5f11bb4e877..581c884c53f 100644
--- a/site2/website-next/src/components/RestApi.js
+++ b/site2/website-next/src/components/RestApi.js
@@ -14,6 +14,8 @@ function parseVersion(pathName) {
     swagger = "swaggerpackages";
   } else if (pathName.indexOf("transactions") > -1) {
     swagger = "swaggertransactions";
+  } else if (pathName.indexOf("lookup") > -1) {
+    swagger = "swaggerlookup";
   }
   let version = getVersion();
   let apiversion = getApiVersion(swagger);
@@ -87,6 +89,11 @@ class RestApi extends React.Component {
         "spec-url",
         "/swagger/" + version + "/" + apiversion + "/swaggertransactions.json"
       );
+    } else if (pathName.indexOf("lookup-rest-api") >= 0) {
+      redoc.setAttribute(
+        "spec-url",
+        "/swagger/" + version + "/" + apiversion + "/swaggerlookup.json"
+      );
     }
     redoc.setAttribute("lazy-rendering", "true");
     const redocLink = document.createElement("script");