Skip to content

Commit

Permalink
build: release version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lkqm committed Nov 20, 2022
1 parent e1945fb commit 0d37f21
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group 'com.github.jetplugins'
version '0.9.7'
version '1.0.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava.options.encoding = "UTF-8"
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/io/yapix/parse/parser/MockParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.util.Objects;
import java.util.Properties;
import java.util.stream.Collectors;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;

/**
Expand Down Expand Up @@ -86,7 +85,7 @@ public String parseMock(Property property, PsiType type, PsiField field, String
}

// 数字类型从最大、最小值
if (property.isNumberOrIntegerType() && ObjectUtils.anyNotNull(property.getMinimum(), property.getMaximum())) {
if (property.isNumberOrIntegerType() && (property.getMinimum() != null || property.getMaximum() == null)) {
List<String> params = Lists.newArrayList();
if (property.getMinimum() != null) {
params.add(property.getMinimum().toPlainString());
Expand All @@ -111,7 +110,7 @@ public String parseMock(Property property, PsiType type, PsiField field, String
}

// 长度
if (property.isStringType() && ObjectUtils.anyNotNull(property.getMinLength(), property.getMaxLength())) {
if (property.isStringType() && (property.getMinLength() != null || property.getMaxLength() != null)) {
List<String> params = Lists.newArrayList();
if (property.getMinLength() != null) {
params.add(property.getMinLength().toString());
Expand Down
14 changes: 6 additions & 8 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@
</actions>

<change-notes><![CDATA[
1.0.0: <br>
- feat: 支持更多常量枚举解析<br>
- feat: 支持更多JSR303校验注解、分组校验<br>
- feat: 支持更多Jackson注解<br>
- fix: 修复无法上传Eolinker问题<br>
<br>
0.9.7: <br>
- feat: 支持导出为OpenApi3.0<br>
- fix: 修复无法上传Eolinker问题<br>
Expand All @@ -86,14 +92,6 @@
0.9.5: <br>
- fix: 修复插件兼容性,支持IDEA 2022.2<br>
- feat: 支持配置LocalDate, LocalTime时间类型格式<br>
<br>
0.9.4: <br>
- fix: 修复Controller注解无法识别问题<br>
<br>
0.9.3: <br>
- feat: 支持@JsonIgnore注解<br>
- feat: 支持组合自定义@Controller注解<br>
- fix: 修复@RequestMapping无法解析method参数<br>
]]></change-notes>

</idea-plugin>

0 comments on commit 0d37f21

Please sign in to comment.