Skip to content

Commit dd36801

Browse files
dragonpooludomikula
authored andcommitted
Fix required issue
1 parent 60609a1 commit dd36801

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/datasource/DatasourceController.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public Mono<ResponseView<DatasourceStructure>> getStructure(@PathVariable String
116116
* name, type... and the plugin definition of it, excluding the detail configs such as the connection uri, password...
117117
*/
118118
@Override
119-
public Mono<ResponseView<List<Datasource>>> listJsDatasourcePlugins(@RequestParam("appId") String applicationId, @RequestParam String name, @RequestParam String type) {
119+
public Mono<ResponseView<List<Datasource>>> listJsDatasourcePlugins(@RequestParam("appId") String applicationId, @RequestParam(required = false) String name, @RequestParam(required = false) String type) {
120120
String objectId = gidService.convertApplicationIdToObjectId(applicationId);
121121
return datasourceApiService.listJsDatasourcePlugins(objectId, name, type)
122122
.collectList()
@@ -139,7 +139,7 @@ public Mono<ResponseView<List<Object>>> getPluginDynamicConfig(
139139

140140
@SneakyThrows
141141
@Override
142-
public Mono<ResponseView<List<DatasourceView>>> listOrgDataSources(@RequestParam(name = "orgId") String orgId, @RequestParam String name, @RequestParam String type) {
142+
public Mono<ResponseView<List<DatasourceView>>> listOrgDataSources(@RequestParam(name = "orgId") String orgId, @RequestParam(required = false) String name, @RequestParam(required = false) String type) {
143143
if (StringUtils.isBlank(orgId)) {
144144
return ofError(BizError.INVALID_PARAMETER, "ORG_ID_EMPTY");
145145
}
@@ -150,7 +150,7 @@ public Mono<ResponseView<List<DatasourceView>>> listOrgDataSources(@RequestParam
150150
}
151151

152152
@Override
153-
public Mono<ResponseView<List<DatasourceView>>> listAppDataSources(@RequestParam(name = "appId") String applicationId, @RequestParam String name, @RequestParam String type) {
153+
public Mono<ResponseView<List<DatasourceView>>> listAppDataSources(@RequestParam(name = "appId") String applicationId, @RequestParam(required = false) String name, @RequestParam(required = false) String type) {
154154
if (StringUtils.isBlank(applicationId)) {
155155
return ofError(BizError.INVALID_PARAMETER, "INVALID_APP_ID");
156156
}

server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/datasource/DatasourceEndpoints.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public Mono<ResponseView<DatasourceStructure>> getStructure(@PathVariable String
9999
description = "Retrieve a list of node service plugins available within Lowcoder."
100100
)
101101
@GetMapping("/jsDatasourcePlugins")
102-
public Mono<ResponseView<List<Datasource>>> listJsDatasourcePlugins(@RequestParam("appId") String applicationId, @RequestParam String name, @RequestParam String type);
102+
public Mono<ResponseView<List<Datasource>>> listJsDatasourcePlugins(@RequestParam("appId") String applicationId, @RequestParam(required = false) String name, @RequestParam(required = false) String type);
103103

104104
/**
105105
* Proxy the request to the node service, besides, add the "extra" information from the data source config stored in the mongodb if exists to

server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/query/LibraryQueryController.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ public class LibraryQueryController implements LibraryQueryEndpoints
3535
private GidService gidService;
3636

3737
@Override
38-
public Mono<ResponseView<List<LibraryQueryAggregateView>>> dropDownList(@RequestParam String name) {
38+
public Mono<ResponseView<List<LibraryQueryAggregateView>>> dropDownList(@RequestParam(required = false) String name) {
3939
return libraryQueryApiService.dropDownList(name)
4040
.map(ResponseView::success);
4141
}
4242

4343
@Override
44-
public Mono<ResponseView<List<LibraryQueryView>>> list(@RequestParam String name) {
44+
public Mono<ResponseView<List<LibraryQueryView>>> list(@RequestParam(required = false) String name) {
4545
return libraryQueryApiService.listLibraryQueries(name)
4646
.map(ResponseView::success);
4747
}

server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/query/LibraryQueryEndpoints.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public interface LibraryQueryEndpoints
2929
description = "Retrieve Library Queries in a dropdown format within Lowcoder, suitable for selection in user interfaces."
3030
)
3131
@GetMapping("/dropDownList")
32-
public Mono<ResponseView<List<LibraryQueryAggregateView>>> dropDownList(@RequestParam String name);
32+
public Mono<ResponseView<List<LibraryQueryAggregateView>>> dropDownList(@RequestParam(required = false) String name);
3333

3434
@Operation(
3535
tags = TAG_LIBRARY_QUERY_MANAGEMENT,
@@ -38,7 +38,7 @@ public interface LibraryQueryEndpoints
3838
description = "Retrieve a list of Library Queries for a specific Organization within Lowcoder."
3939
)
4040
@GetMapping("/listByOrg")
41-
public Mono<ResponseView<List<LibraryQueryView>>> list(@RequestParam String name);
41+
public Mono<ResponseView<List<LibraryQueryView>>> list(@RequestParam(required = false) String name);
4242

4343
@Operation(
4444
tags = TAG_LIBRARY_QUERY_MANAGEMENT,

0 commit comments

Comments
 (0)