public ResponseEntity<Document> fetchRep(
@Parameter(name = "fromDate", description = "${AbcController.fromDate.ApiParam.value}",
required = true,
example = "2023-01-11", schema = @Schema(type = "String"),
allowEmptyValue = false) @RequestHeader(value = "fromDate", required = true) String fromDate,
@Parameter(name = "toDate", description = "${AbcController.toDate.ApiParam.value}",
required = true,
example = "2023-01-11",
schema = @Schema(type = "String"), allowEmptyValue = false) @RequestHeader(value = "toDate", required = true) String toDate
yaml 文档 -
AbcController:
fromDate:
ApiParam:
value: 'Holds the date from which the report data is generated. [yyyy-mm-dd]'
toDate:
ApiParam:
value: 'Holds the date till which the report data is generated [yyyy-mm-dd]'
您能告诉我为什么会收到此验证错误吗?
改变
@Schema(type = "String")
到
@Schema(type = "string")
注意“string”中的小写“s”。