Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb9c42b5

Browse files
author
FalkWolsky
committed
Changing application.yaml to support openapi spec standard endpoint
1 parent0a8842a commitb9c42b5

File tree

4 files changed

+150
-42
lines changed

4 files changed

+150
-42
lines changed

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ server/api-service/lowcoder-server/src/main/resources/application-lowcoder.yml
1414
server/api-service/lowcoder-server/src/main/resources/application-debug.yaml
1515
.vscode/settings.json
1616
.vscode/launch.json
17+
server/api-service/lowcoder-server/src/main/resources/application-debug.yaml

‎server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/OpenAPIDocsConfiguration.java‎

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -33,39 +33,39 @@ OpenAPI customizeOpenAPI() {
3333
finalStringsecuritySchemeName =commonConfig.getCookieName();
3434

3535
returnnewOpenAPI()
36-
.info(newInfo()
37-
.title("Lowcoder Open Rest API")
38-
.version(commonConfig.getApiVersion()))
39-
/*.addServersItem(new Server()
40-
.url(createLocalServerUrl("localhost", serverPort, contextPath))
41-
.description("Local development API service")
42-
) */
43-
.addServersItem(createCustomServer())
44-
.addServersItem(newServer()
45-
.url("https://api-service.lowcoder.cloud/")
46-
.description("Lowcoder Community Edition: Public Cloud API Access")
47-
)
48-
.addSecurityItem(newSecurityRequirement()
49-
.addList(securitySchemeName)).components(newComponents()
50-
/* .addSecuritySchemes(
51-
securitySchemeName,
52-
new SecurityScheme()
53-
.name(securitySchemeName)
54-
.type(SecurityScheme.Type.HTTP) // HTTP-based authentication
55-
.scheme("cookie") // Specify the authentication scheme as "cookie"
56-
.description("Cookie-based authentication. Please ensure the client sends cookies with each request after authentication.")
57-
) */
58-
.addSecuritySchemes(
59-
"API Key",
60-
newSecurityScheme()
61-
.name("Authorization")
62-
.type(SecurityScheme.Type.APIKEY)
63-
.in(SecurityScheme.In.HEADER)
64-
.scheme("bearer")
65-
.bearerFormat("JWT")
66-
.description("API Key Authentication with a Bearer token. Copy your API Key and prefix it here with 'Bearer ' (e.g. 'Bearer eyJhbGciO...'")
67-
)
68-
);
36+
.info(newInfo()
37+
.title("Lowcoder Open Rest API")
38+
.version(commonConfig.getApiVersion()))
39+
/*.addServersItem(new Server()
40+
.url(createLocalServerUrl("localhost", serverPort, contextPath))
41+
.description("Local development API service")
42+
) */
43+
.addServersItem(createCustomServer())
44+
.addServersItem(newServer()
45+
.url("https://api-service.lowcoder.cloud/")
46+
.description("Lowcoder Community Edition: Public Cloud API Access")
47+
)
48+
.addSecurityItem(newSecurityRequirement()
49+
.addList(securitySchemeName)).components(newComponents()
50+
/* .addSecuritySchemes(
51+
securitySchemeName,
52+
new SecurityScheme()
53+
.name(securitySchemeName)
54+
.type(SecurityScheme.Type.HTTP) // HTTP-based authentication
55+
.scheme("cookie") // Specify the authentication scheme as "cookie"
56+
.description("Cookie-based authentication. Please ensure the client sends cookies with each request after authentication.")
57+
) */
58+
.addSecuritySchemes(
59+
"API Key",
60+
newSecurityScheme()
61+
.name("Authorization")
62+
.type(SecurityScheme.Type.APIKEY)
63+
.in(SecurityScheme.In.HEADER)
64+
.scheme("bearer")
65+
.bearerFormat("JWT")
66+
.description("API Key Authentication with a Bearer token. Copy your API Key and prefix it here with 'Bearer ' (e.g. 'Bearer eyJhbGciO...'")
67+
)
68+
);
6969
}
7070

7171

Lines changed: 115 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,131 @@
1+
auth:
2+
api-key:
3+
secret:${LOWCODER_API_KEY_SECRET:5a41b090758b39b226603177ef48d73ae9839dd458ccb7e66f7e7cc028d5a50b}
4+
email:
5+
enable:${LOWCODER_EMAIL_AUTH_ENABLED:true}
6+
enable-register:${LOWCODER_EMAIL_SIGNUP_ENABLED:true}
7+
workspace-creation:${LOWCODER_CREATE_WORKSPACE_ON_SIGNUP:true}
8+
19
spring:
210
data:
311
mongodb:
412
authentication-database:admin
5-
uri:"mongodb://localhost:27017/lowcoder"
13+
auto-index-creation:false
14+
uri:${LOWCODER_MONGODB_URL:mongodb://lowcoder:secret123@localhost:27017/lowcoder?retryWrites=true&loadBalanced=false&connectTimeoutMS=10000&authSource=admin&authMechanism=SCRAM-SHA-256}
615
redis:
7-
url:"redis://127.0.0.1:6379"
8-
16+
url:${LOWCODER_REDIS_URL:redis://localhost:6379}
17+
main:
18+
allow-bean-definition-overriding:false
19+
allow-circular-references:false
20+
codec:
21+
max-in-memory-size:20MB
22+
webflux:
23+
base-path:/
24+
mail:
25+
host:${LOWCODER_ADMIN_SMTP_HOST:localhost}
26+
port:${LOWCODER_ADMIN_SMTP_PORT:587}
27+
username:${LOWCODER_ADMIN_SMTP_USERNAME:info@localhost}
28+
password:${LOWCODER_ADMIN_SMTP_PASSWORD:s3cr3t}
29+
properties:
30+
mail:
31+
smtp:
32+
auth:${LOWCODER_ADMIN_SMTP_AUTH:true}
33+
ssl:
34+
enable:${LOWCODER_ADMIN_SMTP_SSL_ENABLED:false}
35+
starttls:
36+
enable:${LOWCODER_ADMIN_SMTP_STARTTLS_ENABLED:true}
37+
required:${LOWCODER_ADMIN_SMTP_STARTTLS_REQUIRED:true}
38+
transport:
39+
protocol:smtp
940
server:
41+
compression:
42+
enabled:true
43+
forward-headers-strategy:NATIVE
44+
http2:
45+
enabled:true
1046
port:8080
47+
shutdown:graceful
48+
49+
default:
50+
orgs-per-user:${LOWCODER_MAX_ORGS_PER_USER:100}
51+
org-member-count:${LOWCODER_MAX_MEMBERS_PER_ORG:1000}
52+
org-group-count:${LOWCODER_MAX_GROUPS_PER_ORG:100}
53+
org-app-count:${LOWCODER_MAX_APPS_PER_ORG:1000}
54+
developer-count:${LOWCODER_MAX_DEVELOPERS:50}
55+
api-rate-limit:${LOWCODER_API_RATE_LIMIT:50}
56+
1157
common:
12-
cookie-name:LOWCODER_DEBUG_TOKEN
58+
cookie-name:LOWCODER_CE_SELFHOST_TOKEN
59+
product:lowcoder
60+
domain:
61+
default-value:lowcoder.org
62+
cloud:false
63+
version:2.1.4
64+
apiVersion:1.1
65+
block-hound-enable:false
66+
encrypt:
67+
password:${LOWCODER_DB_ENCRYPTION_PASSWORD:lowcoder.org}
68+
salt:${LOWCODER_DB_ENCRYPTION_SALT:lowcoder.org}
69+
security:
70+
corsAllowedDomainString:${LOWCODER_CORS_DOMAINS:*}
1371
js-executor:
14-
host:"http://127.0.0.1:6060"
72+
host:${LOWCODER_NODE_SERVICE_URL:http://127.0.0.1:6060}
73+
max-query-request-size:${LOWCODER_MAX_REQUEST_SIZE:20m}
74+
max-query-response-size:${LOWCODER_MAX_REQUEST_SIZE:20m}
75+
max-upload-size:${LOWCODER_MAX_REQUEST_SIZE:20m}
76+
max-query-timeout:${LOWCODER_MAX_QUERY_TIMEOUT:120}
1577
workspace:
16-
mode:SAAS
78+
mode:${LOWCODER_WORKSPACE_MODE:SAAS}
79+
plugin-dirs:
80+
-${LOWCODER_PLUGINS_DIR:../plugins}
81+
super-admin:
82+
username:${LOWCODER_SUPERUSER_USERNAME:admin@localhost}
83+
password:${LOWCODER_SUPERUSER_PASSWORD:}
84+
marketplace:
85+
private-mode:${LOWCODER_MARKETPLACE_PRIVATE_MODE:true}
86+
lowcoder-public-url:${LOWCODER_PUBLIC_URL:http://localhost:3000}
87+
notifications-email-sender:${LOWCODER_EMAIL_NOTIFICATIONS_SENDER:info@localhost}
88+
89+
material:
90+
mongodb-grid-fs:
91+
bucket-name:material
92+
93+
springdoc:
94+
api-docs:
95+
path:/api/docs/openapi.json
96+
swagger-ui:
97+
path:/api/docs/swagger-ui
98+
paths-to-exclude:/api/v1/**
99+
100+
management:
101+
endpoints:
102+
enabled-by-default:false
103+
web:
104+
base-path:"/api/status"
105+
exposure:
106+
include:"health,metrics,prometheus"
107+
endpoint:
108+
health:
109+
show-details:never
110+
show-components:always
111+
enabled:true
112+
metrics:
113+
enabled:true
114+
prometheus:
115+
enabled:true
116+
health:
117+
mail:
118+
enabled:false
119+
db:
120+
enabled:true
121+
redis:
122+
enabled:true
123+
diskspace:
124+
enabled:false
17125

18126
debug:true
19127

20128
logging:
21129
level:
22130
root:debug
23-
org.lowcoder:debug
24-
131+
org.lowcoder:debug

‎server/api-service/lowcoder-server/src/main/resources/application.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ material:
9292

9393
springdoc:
9494
api-docs:
95-
path:/api/docs/api-docs
95+
path:/api/docs/openapi.json
9696
swagger-ui:
9797
path:/api/docs/swagger-ui
9898
paths-to-exclude:/api/v1/**

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp