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

Smart-doc does not fully recognize JSR validation information. #701

Closed
Ximenes07 opened this issue Jan 9, 2024 · 2 comments · Fixed by #755
Closed

Smart-doc does not fully recognize JSR validation information. #701

Ximenes07 opened this issue Jan 9, 2024 · 2 comments · Fixed by #755
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Ximenes07
Copy link

Ximenes07 commented Jan 9, 2024

Your Environment(您的使用环境)

  • smart-doc version:3.0.1
  • plugin version (e.g. smart-doc-maven-plugin or smart-doc-gradle-plugin):3.0.1
  • build tool version(maven or gradle):maven3.9.5
  • jdk version:1.8

Expected Behavior(您期望的结果)

Current Behavior(当前结果)

字段注解:
@Length(min = 3, max = 512)
private String name0;
@notblank
@SiZe(min = 3, max = 256)
private String name1;
@notblank
@min(3)
@max(50)
private String name2;

产生文档描述:
name0: Validate[max: 512; ]
name1: Validate[max: 256; ]
name2: 无描述

Possible Solution(bug解决建议)

Steps to Reproduce (Bug产生步骤,请尽量提供用例代码)

Context(Bug影响描述)

Smart-doc version 3.0.1 fails to recognize the 'min' attribute in JSR303 @Length and @SiZe annotations, as well as the @min and @max annotations.

smart-doc 3.0.1版本无法识别JSR303 @Length@SiZe 注解中的min属性,以及@min@max注解

@Ximenes07 Ximenes07 added the bug Something isn't working label Jan 9, 2024
@luo-zhan
Copy link

luo-zhan commented Jan 17, 2024

Additionally, the document description format is not very user-friendly. It is suggested to optimize it to: "Field annotation
Note: Min xx, Max xx". Support for internationalization would be even better.
+1
而且文档描述格式也不太友好,建议优化成:“字段注释<br>注:最小xx,最大xx”。如果能做国际化支持更好。

@snappyyouth
Copy link
Member

It doesn't seem like a very difficult issue, could I temporarily collect this issue to familiarize myself with the smart-doc project.

@shalousun shalousun changed the title smart-doc 3.0.1版本无法识别JSR303 @Length和@Size 注解中的min属性,以及@Min和@Max注解 Smart-doc does not fully recognize JSR validation information. Mar 6, 2024
@shalousun shalousun added this to the 3.0.3 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants