Skip to content

Commit c2b8b99

Browse files
authored
feat: swagger.enabled default to true (#515)
Signed-off-by: tison <wander4096@gmail.com>
1 parent e4755d0 commit c2b8b99

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Pulsar manager backend is a supplement and improvement to Pulsar broker.
66
* Route requests (add, delete, update) to brokers
77
* Support multi broker, dynamic change environment
88

9-
### Supported configurations of backend
9+
### Supported configurations of backend
1010

1111
| Name | Default |Description
1212
| ------- | ------- | ------- |
@@ -26,7 +26,7 @@ Pulsar manager backend is a supplement and improvement to Pulsar broker.
2626

2727
### Use custom databases
2828

29-
If you have a large amount of data, you can use a custom database. The following is an example of PostgreSQL.
29+
If you have a large amount of data, you can use a custom database. The following is an example of PostgreSQL.
3030

3131
1. Initialize database and table structures using [file](https://github.com/apache/pulsar-manager/tree/master/src/main/resources/META-INF/sql/postgresql-schema.sql).
3232

@@ -112,7 +112,7 @@ jwt.broker.token.mode=PRIVATE
112112
jwt.broker.public.key=file:///path/broker-public.key
113113
jwt.broker.private.key=file:///path/broker-private.key
114114
115-
or
115+
or
116116
jwt.broker.token.mode=SECRET
117117
jwt.broker.secret.key=file:///path/broker-secret.key
118118
```
@@ -188,17 +188,17 @@ Set the `bkvm.enabled` field to `true` in the file [bkvm.conf](https://github.co
188188
```
189189

190190
### Enable swagger UI
191+
191192
To enable swagger UI, set `swagger.enabled=true` in the `application.properties` file. The default value is `true`.
192193

193-
If you want to disable swagger UI in the production environment, you can set `swagger.enabled=false`.
194+
If you want to disable swagger UI in the production environment, you can set `swagger.enabled=false`.
194195

195196
### How to use swagger to access the API
196-
1. Enable swagger UI by setting 'swagger.enabled=true' in the `application.properties` file.
197197

198+
1. Enable swagger UI by setting 'swagger.enabled=true' in the `application.properties` file.
198199
2. Visit http://YOUR_BACKEND_SERVICE_HOST:7750/swagger-ui.html
199-
200200
3. Request the login API, use the username and password of the Pulsar Manager to login, copy the `token` of the response header.
201-
201+
202202
The request body is as follows:
203203
```$xslt
204204
{
@@ -213,7 +213,7 @@ If you want to disable swagger UI in the production environment, you can set `s
213213
- environment: the environment name you have configured in Pulsar Manager.
214214
- token: the token you have copied in the previous step.
215215
- username: the username you login.
216-
216+
217217
![swagger-authorize](../docs/img/swagger-authorize.png)
218218
219219
5. Request other APIs.

src/main/resources/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ tls.pulsar.admin.ca-certs=ca-client-path
144144
pulsar.peek.message=false
145145

146146
# swagger configuration
147-
swagger.enabled=false
147+
swagger.enabled=true
148148

149149
# casdoor configuration
150150
casdoor.endpoint = http://localhost:8000

0 commit comments

Comments
 (0)