Skip to content

Commit

Permalink
[docs][issue-8853]Add version number for doc endpoint (apache#8888)
Browse files Browse the repository at this point in the history
Master Issue: apache#8853

### Motivation

This pr adds a `[[pulsar.version_number]]` field to restapi in documentation after 2.3.0, and fixes the build script.


### Modifications

* Add `pulsar.version_number`
* Fixed replace script

### Verifying this change

- [ ] Make sure that the change passes the CI checks.

After building the script:

![image](https://user-images.githubusercontent.com/1907867/101728310-31163380-3af1-11eb-9157-3045d3282025.png)

![image](https://user-images.githubusercontent.com/1907867/101728987-59eaf880-3af2-11eb-92f0-5f66f411af7f.png)
  • Loading branch information
tuteng authored Dec 10, 2020
1 parent d9f3710 commit 834aabd
Show file tree
Hide file tree
Showing 95 changed files with 1,028 additions and 1,016 deletions.
10 changes: 5 additions & 5 deletions site2/docs/admin-api-brokers.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ broker1.use.org.com:8080

<!--REST API-->

{@inject: endpoint|GET|/admin/v2/brokers/:cluster|operation/getActiveBrokers}
{@inject: endpoint|GET|/admin/v2/brokers/:cluster|operation/getActiveBrokers?version=[[pulsar:version_number]]}

<!--JAVA-->

Expand Down Expand Up @@ -71,7 +71,7 @@ $ pulsar-admin brokers namespaces use \
```
<!--REST API-->

{@inject: endpoint|GET|/admin/v2/brokers/:cluster/:broker/ownedNamespaces|operation/getOwnedNamespaes}
{@inject: endpoint|GET|/admin/v2/brokers/:cluster/:broker/ownedNamespaces|operation/getOwnedNamespaes?version=[[pulsar:version_number]]}

<!--JAVA-->

Expand Down Expand Up @@ -102,7 +102,7 @@ $ pulsar-admin brokers update-dynamic-config --config brokerShutdownTimeoutMs --

<!--REST API-->

{@inject: endpoint|POST|/admin/v2/brokers/configuration/:configName/:configValue|operation/updateDynamicConfiguration}
{@inject: endpoint|POST|/admin/v2/brokers/configuration/:configName/:configValue|operation/updateDynamicConfiguration?version=[[pulsar:version_number]]}

<!--JAVA-->

Expand All @@ -124,7 +124,7 @@ brokerShutdownTimeoutMs

<!--REST API-->

{@inject: endpoint|GET|/admin/v2/brokers/configuration|operation/getDynamicConfigurationName}
{@inject: endpoint|GET|/admin/v2/brokers/configuration|operation/getDynamicConfigurationName?version=[[pulsar:version_number]]}

<!--JAVA-->

Expand All @@ -147,7 +147,7 @@ brokerShutdownTimeoutMs:100

<!--REST API-->

{@inject: endpoint|GET|/admin/v2/brokers/configuration/values|operation/getAllDynamicConfigurations}
{@inject: endpoint|GET|/admin/v2/brokers/configuration/values|operation/getAllDynamicConfigurations?version=[[pulsar:version_number]]}

<!--JAVA-->

Expand Down
12 changes: 6 additions & 6 deletions site2/docs/admin-api-clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $ pulsar-admin clusters create cluster-1 \

<!--REST API-->

{@inject: endpoint|PUT|/admin/v2/clusters/:cluster|operation/createCluster}
{@inject: endpoint|PUT|/admin/v2/clusters/:cluster|operation/createCluster?version=[[pulsar:version_number]]}

<!--JAVA-->

Expand Down Expand Up @@ -105,7 +105,7 @@ $ pulsar-admin clusters get cluster-1

<!--REST API-->

{@inject: endpoint|GET|/admin/v2/clusters/:cluster|operation/getCluster}
{@inject: endpoint|GET|/admin/v2/clusters/:cluster|operation/getCluster?version=[[pulsar:version_number]]}

<!--JAVA-->

Expand All @@ -131,7 +131,7 @@ $ pulsar-admin clusters update cluster-1 \

<!--REST API-->

{@inject: endpoint|POST|/admin/v2/clusters/:cluster|operation/updateCluster}
{@inject: endpoint|POST|/admin/v2/clusters/:cluster|operation/updateCluster?version=[[pulsar:version_number]]}

<!--JAVA-->

Expand Down Expand Up @@ -161,7 +161,7 @@ $ pulsar-admin clusters delete cluster-1

<!--REST API-->

{@inject: endpoint|DELETE|/admin/v2/clusters/:cluster|operation/deleteCluster}
{@inject: endpoint|DELETE|/admin/v2/clusters/:cluster|operation/deleteCluster?version=[[pulsar:version_number]]}

<!--JAVA-->

Expand All @@ -187,7 +187,7 @@ cluster-2

<!--REST API-->

{@inject: endpoint|GET|/admin/v2/clusters|operation/getClusters}
{@inject: endpoint|GET|/admin/v2/clusters|operation/getClusters?version=[[pulsar:version_number]]}

<!--JAVA-->

Expand All @@ -211,7 +211,7 @@ $ pulsar-admin update-peer-clusters cluster-1 --peer-clusters cluster-2

<!--REST API-->

{@inject: endpoint|POST|/admin/v2/clusters/:cluster/peers|operation/setPeerClusterNames}
{@inject: endpoint|POST|/admin/v2/clusters/:cluster/peers|operation/setPeerClusterNames?version=[[pulsar:version_number]]}

<!--JAVA-->

Expand Down
36 changes: 18 additions & 18 deletions site2/docs/admin-api-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $ pulsar-admin functions create \

<!--REST API-->

{@inject: endpoint|POST|/admin/v3/functions/{tenant}/{namespace}/{functionName}
{@inject: endpoint|POST|/admin/v3/functions/:tenant/:namespace/:functionName?version=[[pulsar:version_number]]}

<!--Java Admin API-->

Expand Down Expand Up @@ -89,7 +89,7 @@ $ pulsar-admin functions update \

<!--REST Admin API-->

{@inject: endpoint|PUT|/admin/v3/functions/{tenant}/{namespace}/{functionName}
{@inject: endpoint|PUT|/admin/v3/functions/:tenant/:namespace/:functionName?version=[[pulsar:version_number]]}

<!--Java Admin API-->

Expand Down Expand Up @@ -126,7 +126,7 @@ $ pulsar-admin functions start \

<!--REST API-->

{@inject: endpoint|POST|/admin/v3/functions/{tenant}/{namespace}/{functionName}/{instanceId}/start
{@inject: endpoint|POST|/admin/v3/functions/:tenant/:namespace/:functionName/:instanceId/start?version=[[pulsar:version_number]]}

<!--Java Admin API-->

Expand Down Expand Up @@ -155,7 +155,7 @@ $ pulsar-admin functions start \

<!--REST API-->

{@inject: endpoint|POST|/admin/v3/functions/{tenant}/{namespace}/{functionName}/start
{@inject: endpoint|POST|/admin/v3/functions/:tenant/:namespace/:functionName/start?version=[[pulsar:version_number]]}

<!--Java-->

Expand Down Expand Up @@ -185,7 +185,7 @@ $ pulsar-admin functions stop \

<!--REST API-->

{@inject: endpoint|POST|/admin/v3/functions/{tenant}/{namespace}/{functionName}/{instanceId}/stop
{@inject: endpoint|POST|/admin/v3/functions/:tenant/:namespace/:functionName/:instanceId/stop?version=[[pulsar:version_number]]}

<!--Java Admin API-->

Expand Down Expand Up @@ -214,7 +214,7 @@ $ pulsar-admin functions stop \

<!--REST API-->

{@inject: endpoint|POST|/admin/v3/functions/{tenant}/{namespace}/{functionName}/stop
{@inject: endpoint|POST|/admin/v3/functions/:tenant/:namespace/:functionName/stop?version=[[pulsar:version_number]]}

<!--Java Admin API-->

Expand Down Expand Up @@ -244,7 +244,7 @@ $ pulsar-admin functions restart \

<!--REST API-->

{@inject: endpoint|POST|/admin/v3/functions/{tenant}/{namespace}/{functionName}/{instanceId}/restart
{@inject: endpoint|POST|/admin/v3/functions/:tenant/:namespace/:functionName/:instanceId/restart?version=[[pulsar:version_number]]}

<!--Java Admin API-->

Expand Down Expand Up @@ -273,7 +273,7 @@ $ pulsar-admin functions restart \

<!--REST API-->

{@inject: endpoint|POST|/admin/v3/functions/{tenant}/{namespace}/{functionName}/restart
{@inject: endpoint|POST|/admin/v3/functions/:tenant/:namespace/:functionName/restart?version=[[pulsar:version_number]]}

<!--Java Admin API-->

Expand Down Expand Up @@ -301,7 +301,7 @@ $ pulsar-admin functions list \

<!--REST API-->

{@inject: endpoint|GET|/admin/v3/functions/{tenant}/{namespace}
{@inject: endpoint|GET|/admin/v3/functions/:tenant/:namespace?version=[[pulsar:version_number]]}

<!--Java Admin API-->

Expand Down Expand Up @@ -330,7 +330,7 @@ $ pulsar-admin functions delete \

<!--REST API-->

{@inject: endpoint|DELETE|/admin/v3/functions/{tenant}/{namespace}/{functionName}
{@inject: endpoint|DELETE|/admin/v3/functions/:tenant/:namespace/:functionName?version=[[pulsar:version_number]]}

<!--Java Admin API-->

Expand Down Expand Up @@ -359,7 +359,7 @@ $ pulsar-admin functions get \

<!--REST API-->

{@inject: endpoint|GET|/admin/v3/functions/{tenant}/{namespace}/{functionName}
{@inject: endpoint|GET|/admin/v3/functions/:tenant/:namespace/:functionName?version=[[pulsar:version_number]]}

<!--Java Admin API-->

Expand Down Expand Up @@ -388,7 +388,7 @@ $ pulsar-admin functions status \

<!--REST API-->

{@inject: endpoint|GET|/admin/v3/functions/{tenant}/{namespace}/{functionName}/{instanceId}/status
{@inject: endpoint|GET|/admin/v3/functions/:tenant/:namespace/:functionName/:instanceId/status?version=[[pulsar:version_number]]}

<!--Java Admin API-->

Expand Down Expand Up @@ -417,7 +417,7 @@ $ pulsar-admin functions status \

<!--REST API-->

{@inject: endpoint|GET|/admin/v3/functions/{tenant}/{namespace}/{functionName}/status
{@inject: endpoint|GET|/admin/v3/functions/:tenant/:namespace/:functionName/status?version=[[pulsar:version_number]]}

<!--Java Admin API-->

Expand Down Expand Up @@ -446,7 +446,7 @@ $ pulsar-admin functions stats \

<!--REST API-->

{@inject: endpoint|GET|/admin/v3/functions/{tenant}/{namespace}/{functionName}/{instanceId}/stats
{@inject: endpoint|GET|/admin/v3/functions/:tenant/:namespace/:functionName/:instanceId/stats?version=[[pulsar:version_number]]}

<!--Java Admin API-->

Expand Down Expand Up @@ -475,7 +475,7 @@ $ pulsar-admin functions stats \

<!--REST API-->

{@inject: endpoint|GET|/admin/v3/functions/{tenant}/{namespace}/{functionName}/stats
{@inject: endpoint|GET|/admin/v3/functions/:tenant/:namespace/:functionName/stats?version=[[pulsar:version_number]]}

<!--Java Admin API-->

Expand Down Expand Up @@ -506,7 +506,7 @@ $ pulsar-admin functions trigger \
```
<!--REST API-->

{@inject: endpoint|POST|/admin/v3/functions/{tenant}/{namespace}/{functionName}/trigger
{@inject: endpoint|POST|/admin/v3/functions/:tenant/:namespace/:functionName/trigger?version=[[pulsar:version_number]]}

<!--Java Admin API-->

Expand Down Expand Up @@ -536,7 +536,7 @@ $ pulsar-admin functions putstate \

<!--REST API-->

{@inject: endpoint|POST|/admin/v3/functions/{tenant}/{namespace}/{functionName}/state/{key}
{@inject: endpoint|POST|/admin/v3/functions/:tenant/:namespace/:functionName/state/:key?version=[[pulsar:version_number]]}

<!--Java Admin API-->

Expand Down Expand Up @@ -568,7 +568,7 @@ $ pulsar-admin functions querystate \

<!--REST API-->

{@inject: endpoint|GET|/admin/v3/functions/{tenant}/{namespace}/{functionName}/state/{key}
{@inject: endpoint|GET|/admin/v3/functions/:tenant/:namespace/:functionName/state/:key?version=[[pulsar:version_number]]}

<!--Java Admin CLI-->

Expand Down
Loading

0 comments on commit 834aabd

Please sign in to comment.