mirror of
https://gitee.com/ssssssss-team/magic-api.git
synced 2026-06-09 18:32:16 +08:00
Swagger中RequestBody改为非必填
This commit is contained in:
@@ -96,7 +96,7 @@ public class SwaggerProvider {
|
||||
try {
|
||||
Object object = mapper.readValue(info.getRequestBody(), Object.class);
|
||||
if ((object instanceof List || object instanceof Map) && BooleanLiteral.isTrue(object)) {
|
||||
parameters.add(new SwaggerEntity.Parameter(true, "body", "body", object instanceof List ? "array" : "object", null, object));
|
||||
parameters.add(new SwaggerEntity.Parameter(false, "body", "body", object instanceof List ? "array" : "object", null, object));
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user