|
@@ -8,6 +8,7 @@ import org.apache.ibatis.javassist.*;
|
|
|
import org.apache.ibatis.javassist.bytecode.AnnotationsAttribute;
|
|
|
import org.apache.ibatis.javassist.bytecode.ConstPool;
|
|
|
import org.apache.ibatis.javassist.bytecode.annotation.Annotation;
|
|
|
+import org.apache.ibatis.javassist.bytecode.annotation.BooleanMemberValue;
|
|
|
import org.apache.ibatis.javassist.bytecode.annotation.StringMemberValue;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.core.annotation.Order;
|
|
@@ -79,7 +80,8 @@ public class MapApiReader implements ParameterBuilderPlugin {
|
|
|
ConstPool constPool = ctClass.getClassFile().getConstPool();
|
|
|
AnnotationsAttribute attr = new AnnotationsAttribute(constPool, AnnotationsAttribute.visibleTag);
|
|
|
Annotation ann = new Annotation("io.swagger.annotations.ApiModelProperty", constPool);
|
|
|
- ann.addMemberValue("example", new StringMemberValue(property.example(), constPool));
|
|
|
+ ann.addMemberValue("value", new StringMemberValue(property.description(), constPool));
|
|
|
+ ann.addMemberValue("required", new BooleanMemberValue(property.required(), constPool));
|
|
|
attr.addAnnotation(ann);
|
|
|
ctField.getFieldInfo().addAttribute(attr);
|
|
|
return ctField;
|