diff --git a/src/main/java/com/power/doc/controller/enums/EnumNoArgumentController.java b/src/main/java/com/power/doc/controller/enums/EnumNoArgumentController.java index d90554c..af3daea 100644 --- a/src/main/java/com/power/doc/controller/enums/EnumNoArgumentController.java +++ b/src/main/java/com/power/doc/controller/enums/EnumNoArgumentController.java @@ -2,6 +2,7 @@ import com.power.common.model.CommonResult; import java.util.List; +import java.util.Map; import lombok.Data; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -73,6 +74,16 @@ public CommonResult testBodyEnum(@RequestBody InnerClass innerClass) return null; } + /** + * 测试body map参数枚举 + * @param map 集合 + * @return 结果 + */ + @PostMapping("/enumNoArgument/testBodyMapEnum") + public CommonResult> testBodyEnum(@RequestBody Map map) { + return CommonResult.ok(map); + } + /** * 测试query+body参数枚举 * @param noArgumentEnum 无参数枚举参数 diff --git a/src/main/java/com/power/doc/controller/enums/EnumNoDataDictionariesController.java b/src/main/java/com/power/doc/controller/enums/EnumNoDataDictionariesController.java index 036e3c2..9e6167e 100644 --- a/src/main/java/com/power/doc/controller/enums/EnumNoDataDictionariesController.java +++ b/src/main/java/com/power/doc/controller/enums/EnumNoDataDictionariesController.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import com.power.common.model.CommonResult; import java.util.List; +import java.util.Map; import lombok.Data; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -74,6 +75,16 @@ public CommonResult testBodyEnum(@RequestBody InnerClass innerClass) return null; } + /** + * 测试body map参数枚举 + * @param map 集合 + * @return 结果 + */ + @PostMapping("/enumNoDataDictionaries/testBodyMapEnum") + public CommonResult> testBodyEnum(@RequestBody Map map) { + return CommonResult.ok(map); + } + /** * 测试query+body参数枚举 * @param noDataDictionariesEnum 无数据字典枚举参数 diff --git a/src/main/java/com/power/doc/controller/enums/EnumNoJsonValueController.java b/src/main/java/com/power/doc/controller/enums/EnumNoJsonValueController.java index 158f529..5afb2c8 100644 --- a/src/main/java/com/power/doc/controller/enums/EnumNoJsonValueController.java +++ b/src/main/java/com/power/doc/controller/enums/EnumNoJsonValueController.java @@ -2,6 +2,7 @@ import com.power.common.model.CommonResult; import java.util.List; +import java.util.Map; import lombok.Data; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -73,6 +74,16 @@ public CommonResult testBodyEnum(@RequestBody InnerClass innerClass) return null; } + /** + * 测试body map参数枚举 + * @param map 集合 + * @return 结果 + */ + @PostMapping("/enumNoJsonValue/testBodyMapEnum") + public CommonResult> testBodyEnum(@RequestBody Map map) { + return CommonResult.ok(map); + } + /** * 测试query+body参数枚举 * @param noJsonValueEnum 无JsonValue枚举参数 diff --git a/src/main/java/com/power/doc/controller/enums/InnerEnumController.java b/src/main/java/com/power/doc/controller/enums/InnerEnumController.java index 4d79d55..416c002 100644 --- a/src/main/java/com/power/doc/controller/enums/InnerEnumController.java +++ b/src/main/java/com/power/doc/controller/enums/InnerEnumController.java @@ -4,6 +4,7 @@ import com.power.common.model.CommonResult; import com.power.doc.enums.IEnum; import java.util.List; +import java.util.Map; import lombok.Data; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -75,6 +76,16 @@ public CommonResult testBodyEnum(@RequestBody InnerClass innerClass) return null; } + /** + * 测试body map参数枚举 + * @param map 集合 + * @return 结果 + */ + @PostMapping("/innerEnum/testBodyMapEnum") + public CommonResult> testBodyEnum(@RequestBody Map map) { + return CommonResult.ok(map); + } + /** * 测试query+body参数枚举 * @param innerEnum 内部枚举参数 diff --git a/src/main/resources/smart-doc.json b/src/main/resources/smart-doc.json index 2fe18a0..5dd0f1e 100644 --- a/src/main/resources/smart-doc.json +++ b/src/main/resources/smart-doc.json @@ -166,6 +166,9 @@ },{ "name": "Map测试", "apis": "com.power.doc.controller.map.*" + },{ + "name": "Enum测试", + "apis": "com.power.doc.controller.enums.*" } ], "revisionLogs": [