test
Some checks failed
API Parameter Change Check / api-param-check (push) Failing after 3s

This commit is contained in:
2026-06-03 15:02:21 +08:00
parent 2eacae577c
commit 556f5b8ab6
25 changed files with 2119 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
package com.aicheck;
import com.fasterxml.jackson.annotation.JsonInclude;
/**
* 单个接口参数的模型,对应 Controller 方法上的一个入参。
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ApiParameter {
/** 参数名称(@RequestParam / @PathVariable 的 value或字段名 */
private String name;
/** Java 类型,如 String、Long、Boolean */
private String type;
/** 是否必填(来自 required 属性或 @NotNull 等,默认 true */
private boolean required = true;
/** 参数来源query / path / body / header / form */
private String source;
/** 参数说明(来自 @ApiParam、@Parameter 等注解的 description */
private String description;
public ApiParameter() {
}
public ApiParameter(String name, String type, boolean required, String source) {
this.name = name;
this.type = type;
this.required = required;
this.source = source;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public boolean isRequired() {
return required;
}
public void setRequired(boolean required) {
this.required = required;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}