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

建议knife4j文档支持接口字段长度的展示 #684

Open
Kumilo opened this issue Nov 17, 2023 · 5 comments
Open

建议knife4j文档支持接口字段长度的展示 #684

Kumilo opened this issue Nov 17, 2023 · 5 comments

Comments

@Kumilo
Copy link

Kumilo commented Nov 17, 2023

如下代码片段,@Schema注解中的minLength = 1, maxLength = 50无法在knife4j文档中展示

@Schema(description = "医院code", minLength = 1, maxLength = 50, requiredMode = Schema.RequiredMode.REQUIRED) @Length(min = 1, max = 50, message = "医院code(hospitalCode)长度限制[1,50]") @NotBlank(message = "医院code不能为空") private String hospitalCode;

@dylan-tao
Copy link

+1

@dylan-tao
Copy link

@xiaoymin

@xiaoymin
Copy link
Owner

xiaoymin commented Mar 6, 2024

长度的话用JSR-303注解

@su-yh
Copy link

su-yh commented Sep 13, 2024

都快一年了呀,我在API 的返回值里面可以看到长度限制,但是界面上却没有展示出来,这让我很头疼。还要让前端去response 里面找长度限制。有没有什么好的办法,可以看到这个长度限制,显示在页面上?

@su-yh
Copy link

su-yh commented Sep 13, 2024

长度的话用JSR-303注解

我用的就是这个JSR-303 注解呢

@SiZe(max = 200) 这样页面上也是没有显示的呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants