This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
The following commit(s) were added to refs/heads/dev by this push:
new 3982a8f6b [Fix] swagger interface call back-end interface can not get
parameter values (#1601)
3982a8f6b is described below
commit 3982a8f6bf2f1ca57ffc664edb6ef2c0c7bd2919
Author: 木鱼和尚 <[email protected]>
AuthorDate: Wed Sep 14 11:19:15 2022 +0800
[Fix] swagger interface call back-end interface can not get parameter
values (#1601)
---
streampark-console/streampark-console-service/pom.xml | 2 +-
.../core/controller/ApplicationBuildPipelineController.java | 4 ++--
.../console/core/controller/ApplicationController.java | 12 ++++++------
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/streampark-console/streampark-console-service/pom.xml
b/streampark-console/streampark-console-service/pom.xml
index 817683135..31084132d 100644
--- a/streampark-console/streampark-console-service/pom.xml
+++ b/streampark-console/streampark-console-service/pom.xml
@@ -46,7 +46,7 @@
<CodeCacheSize>512m</CodeCacheSize>
<swagger.version>1.9.3</swagger.version>
- <springfox.version>3.0.0</springfox.version>
+ <springfox.version>2.9.2</springfox.version>
<swagger-models.version>1.5.24</swagger-models.version>
<commons-compress.version>1.21</commons-compress.version>
<javax-mail.version>1.4.7</javax-mail.version>
diff --git
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationBuildPipelineController.java
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationBuildPipelineController.java
index 85a9fcc8d..d31832a1c 100644
---
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationBuildPipelineController.java
+++
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationBuildPipelineController.java
@@ -67,12 +67,12 @@ public class ApplicationBuildPipelineController {
* @return Whether the pipeline was successfully started
*/
@ApiAccess
- @ApiOperation(value = "Launch application", notes = "Launch application",
tags = ApiDocConstant.FLINK_APP_OP_TAG, consumes = "x-www-form-urlencoded")
+ @ApiOperation(value = "Launch application", notes = "Launch application",
tags = ApiDocConstant.FLINK_APP_OP_TAG, consumes =
"application/x-www-form-urlencoded")
@ApiImplicitParams({
@ApiImplicitParam(name = "appId", value = "APP_ID", required = true,
paramType = "form", dataType = "Long"),
@ApiImplicitParam(name = "forceBuild", value = "FORCE_BUILD", required
= true, paramType = "form", dataType = "Boolean", defaultValue = "false"),
})
- @PostMapping("/build")
+ @PostMapping(value = "build", consumes =
"application/x-www-form-urlencoded")
@RequiresPermissions("app:create")
public RestResponse buildApplication(Long appId, boolean forceBuild) {
try {
diff --git
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationController.java
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationController.java
index 78ccb7c06..e8ebb1f0f 100644
---
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationController.java
+++
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationController.java
@@ -101,12 +101,12 @@ public class ApplicationController {
}
@ApiAccess
- @ApiOperation(value = "App Copy", notes = "App Copy", tags =
ApiDocConstant.FLINK_APP_OP_TAG, consumes = "x-www-form-urlencoded")
+ @ApiOperation(value = "App Copy", notes = "App Copy", tags =
ApiDocConstant.FLINK_APP_OP_TAG, consumes = "application/x-www-form-urlencoded")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "copy target app id", required
= true, paramType = "form", dataType = "Long"),
@ApiImplicitParam(name = "jobName", value = "name of the copied
application", required = true, paramType = "form", dataType = "String",
defaultValue = ""),
@ApiImplicitParam(name = "args", value = "commit parameters after
copying", required = false, paramType = "form", dataType = "String",
defaultValue = "")})
- @PostMapping("copy")
+ @PostMapping(value = "copy", consumes =
"application/x-www-form-urlencoded")
@RequiresPermissions("app:copy")
public RestResponse copy(@ApiIgnore Application app) throws IOException {
Long id = applicationService.copy(app);
@@ -164,14 +164,14 @@ public class ApplicationController {
}
@ApiAccess
- @ApiOperation(value = "App Start", notes = "App Start", tags =
ApiDocConstant.FLINK_APP_OP_TAG, consumes = "x-www-form-urlencoded")
+ @ApiOperation(value = "App Start", notes = "App Start", tags =
ApiDocConstant.FLINK_APP_OP_TAG, consumes = "application/x-www-form-urlencoded")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "app Id", required = true,
paramType = "form", dataType = "Long"),
@ApiImplicitParam(name = "savePointed", value =
"从savepoint或最新checkpoint恢复app", required = true, paramType = "form", dataType =
"Boolean", defaultValue = "false"),
@ApiImplicitParam(name = "savePoint", value =
"手动填写savepoint或最新checkpoint", required = true, paramType = "form", dataType =
"String", defaultValue = ""),
@ApiImplicitParam(name = "flameGraph", value = "flame Graph support",
required = true, paramType = "form", dataType = "Boolean", defaultValue =
"false"),
@ApiImplicitParam(name = "allowNonRestored", value = "ignore savepoint
then cannot be restored", required = true, paramType = "form", dataType =
"Boolean", defaultValue = "false")})
- @PostMapping("start")
+ @PostMapping(value = "start", consumes =
"application/x-www-form-urlencoded")
@RequiresPermissions("app:start")
public RestResponse start(@ApiIgnore Application app) {
try {
@@ -185,13 +185,13 @@ public class ApplicationController {
}
@ApiAccess
- @ApiOperation(value = "App Cancel", notes = "App Cancel", tags =
ApiDocConstant.FLINK_APP_OP_TAG, consumes = "x-www-form-urlencoded")
+ @ApiOperation(value = "App Cancel", notes = "App Cancel", tags =
ApiDocConstant.FLINK_APP_OP_TAG, consumes = "application/x-www-form-urlencoded")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "app Id", required = true,
paramType = "form", dataType = "Long"),
@ApiImplicitParam(name = "savePointed", value = "trigger savePoint
before taking stoping", required = true, paramType = "form", dataType =
"Boolean", defaultValue = "false"),
@ApiImplicitParam(name = "savePoint", value = "savepoint path",
paramType = "form", dataType = "String", defaultValue = "hdfs:///tm/xxx"),
@ApiImplicitParam(name = "drain", value = "send max watermark before
canceling", required = true, paramType = "form", dataType = "Boolean",
defaultValue = "false")})
- @PostMapping("cancel")
+ @PostMapping(value = "cancel", consumes =
"application/x-www-form-urlencoded")
@RequiresPermissions("app:cancel")
public RestResponse cancel(@ApiIgnore Application app) throws Exception {
applicationService.cancel(app);