This commit is contained in:
@@ -74,7 +74,7 @@ public class RestDocs extends HttpBaseServlet {
|
|||||||
final Map<String, Object> parammap = new LinkedHashMap<>();
|
final Map<String, Object> parammap = new LinkedHashMap<>();
|
||||||
final boolean isarray = param.type().isArray();
|
final boolean isarray = param.type().isArray();
|
||||||
final Class ptype = isarray ? param.type().getComponentType() : param.type();
|
final Class ptype = isarray ? param.type().getComponentType() : param.type();
|
||||||
parammap.put("name", param.value());
|
parammap.put("name", param.name());
|
||||||
parammap.put("radix", param.radix());
|
parammap.put("radix", param.radix());
|
||||||
parammap.put("type", ptype.getName() + (isarray ? "[]" : ""));
|
parammap.put("type", ptype.getName() + (isarray ? "[]" : ""));
|
||||||
parammap.put("src", param.src());
|
parammap.put("src", param.src());
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public abstract class HttpBaseServlet extends HttpServlet {
|
|||||||
@Documented
|
@Documented
|
||||||
protected @interface WebParam {
|
protected @interface WebParam {
|
||||||
|
|
||||||
String value(); //参数名
|
String name(); //参数名
|
||||||
|
|
||||||
Class type(); //参数的数据类型
|
Class type(); //参数的数据类型
|
||||||
|
|
||||||
|
|||||||
@@ -327,7 +327,7 @@ public final class Rest {
|
|||||||
final boolean iscookie = ((RestCookie) ps[9]) != null; //是否取getCookie
|
final boolean iscookie = ((RestCookie) ps[9]) != null; //是否取getCookie
|
||||||
|
|
||||||
AnnotationVisitor av2 = av3.visitAnnotation(null, webparamDesc);
|
AnnotationVisitor av2 = av3.visitAnnotation(null, webparamDesc);
|
||||||
av2.visit("value", (String) ps[1]);
|
av2.visit("name", (String) ps[1]);
|
||||||
av2.visit("type", Type.getType(Type.getDescriptor((Class) ps[2])));
|
av2.visit("type", Type.getType(Type.getDescriptor((Class) ps[2])));
|
||||||
av2.visit("radix", (Integer) ps[3]);
|
av2.visit("radix", (Integer) ps[3]);
|
||||||
av2.visitEnum("src", sourcetypeDesc, ishead ? HttpBaseServlet.ParamSourceType.HEADER.name()
|
av2.visitEnum("src", sourcetypeDesc, ishead ? HttpBaseServlet.ParamSourceType.HEADER.name()
|
||||||
|
|||||||
Reference in New Issue
Block a user