@Schema type的字符串类型为string
This commit is contained in:
parent
aa2e74e96b
commit
89f4394b29
@ -34,7 +34,7 @@ public class LocalAndRemoteRetryController {
|
||||
"📢查看任务列表: http://preview.easyretry.com/#/retry-task/list"
|
||||
)
|
||||
public void remoteRetryWithLocalRemote(@Parameter(name = "params", description = "测试参数",
|
||||
schema = @Schema(type = "String", description = "测试参数", defaultValue = "test")
|
||||
schema = @Schema(type = "string", description = "测试参数", defaultValue = "test")
|
||||
)
|
||||
@RequestParam("params") String params) {
|
||||
localRemoteService.remoteRetryWithLocalRemote(params);
|
||||
|
@ -64,7 +64,7 @@ public class LocalRetryController {
|
||||
"下面参数可以指定:NullPointerException, ParamException"
|
||||
)
|
||||
public void localRetryIncludeException(@Parameter(name = "type", description = "异常类型", in = ParameterIn.QUERY,
|
||||
schema = @Schema(type = "String", description = "异常类型")) @RequestParam("type") String type) {
|
||||
schema = @Schema(type = "string", description = "异常类型")) @RequestParam("type") String type) {
|
||||
localRetryService.localRetryIncludeException(type);
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ public class ManualRetryExecutorController {
|
||||
+ "📢查看任务列表: http://preview.easyretry.com/#/retry-task/list"
|
||||
)
|
||||
@GetMapping("/retry")
|
||||
public void remoteRetryWithCallback(@Parameter(name = "params", description = "测试参数", schema = @Schema(description = "测试参数", defaultValue = "test"))
|
||||
public void remoteRetryWithCallback(@Parameter(name = "params", description = "测试参数", schema = @Schema(type = "string", description = "测试参数", defaultValue = "test"))
|
||||
@RequestParam("params") String params) {
|
||||
manualRetryExecutorMethodService.myExecutorMethod(params);
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.example.easy.retry.controller;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -42,6 +43,7 @@ public class RemoteRetryController {
|
||||
|
||||
/**
|
||||
* 一个最简单的远程调用案例
|
||||
* schema = @Schema(type = "String", defaultValue = "test", description = "测试参数", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
*/
|
||||
@GetMapping("/retry/sync")
|
||||
@Operation(
|
||||
@ -50,7 +52,7 @@ public class RemoteRetryController {
|
||||
"📢查看任务列表: http://preview.easyretry.com/#/retry-task/list"
|
||||
)
|
||||
public void remoteSync(@Parameter(name = "params", description = "测试参数",
|
||||
schema = @Schema(type = "String", defaultValue = "test", description = "测试参数"))
|
||||
schema = @Schema(type = "string", defaultValue = "test", description = "测试参数"))
|
||||
@RequestParam("params") String params) {
|
||||
remoteRetryService.remoteSync(params);
|
||||
}
|
||||
@ -86,7 +88,7 @@ public class RemoteRetryController {
|
||||
@GetMapping("/retryWithSingleParamIdempotentGenerate")
|
||||
public void retryWithSingleParamIdempotentGenerate(
|
||||
@Parameter(name = "params", description = "测试参数",
|
||||
schema = @Schema(type = "String", description = "测试参数", defaultValue = "test"))
|
||||
schema = @Schema(type = "string", description = "测试参数", defaultValue = "test"))
|
||||
@RequestParam("params") String params) {
|
||||
remoteRetryService.retryWithSingleParamIdempotentGenerate(params);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user