Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] 能否支持@RequestBody @NotEmpty List<Integer> ids展示字段参数文档为"必须" #1156

Open
lins3000 opened this issue Aug 13, 2024 · 3 comments
Labels
status: work-in-progress Currently being worked on type: feature request Feature Enhancement Request

Comments

@lins3000
Copy link

能否支持@RequestBody @notempty List ids展示字段参数文档为"必须"

@lins3000 lins3000 added the type: feature request Feature Enhancement Request label Aug 13, 2024
@tangcent tangcent added the status: acknowledged This issue has been acknowledged and is under review. label Aug 16, 2024
@tangcent
Copy link
Owner

试了一下:

    @NotEmpty
    private List<String> ids;

结果是:
image
你的预期是什么?

@tangcent tangcent added status: feedback required feedback required and removed status: acknowledged This issue has been acknowledged and is under review. labels Aug 18, 2024
@lins3000
Copy link
Author

不是指在请求对象某个属性里加@notempty,是指整个body是个List,
例如:
public Result batchSave(@ApiParam(value = "Id列表", required = true) @Valid @RequestBody @notempty List ids) ,希望文档里展示ids字段"必须"

@tangcent
Copy link
Owner

知道你的意思了,是没考虑到这种情况。

@tangcent tangcent added status: work-in-progress Currently being worked on and removed status: feedback required feedback required labels Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: work-in-progress Currently being worked on type: feature request Feature Enhancement Request
Projects
None yet
Development

No branches or pull requests

2 participants