This commit is contained in:
@@ -8,6 +8,7 @@ package org.redkale.boot;
|
|||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.lang.reflect.*;
|
import java.lang.reflect.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import javax.persistence.Column;
|
||||||
import org.redkale.convert.json.JsonConvert;
|
import org.redkale.convert.json.JsonConvert;
|
||||||
import org.redkale.net.http.*;
|
import org.redkale.net.http.*;
|
||||||
import org.redkale.util.*;
|
import org.redkale.util.*;
|
||||||
@@ -97,7 +98,12 @@ public class ApiDocs extends HttpBaseServlet {
|
|||||||
fieldmap.put("type", field.getType().isArray() ? (field.getType().getComponentType().getName() + "[]") : field.getGenericType().getTypeName());
|
fieldmap.put("type", field.getType().isArray() ? (field.getType().getComponentType().getName() + "[]") : field.getGenericType().getTypeName());
|
||||||
|
|
||||||
Comment comment = field.getAnnotation(Comment.class);
|
Comment comment = field.getAnnotation(Comment.class);
|
||||||
if (comment != null) fieldmap.put("comment", comment.value());
|
if (comment != null) {
|
||||||
|
fieldmap.put("comment", comment.value());
|
||||||
|
} else {
|
||||||
|
Column col = field.getAnnotation(Column.class);
|
||||||
|
if (col != null) fieldmap.put("comment", col.comment());
|
||||||
|
}
|
||||||
|
|
||||||
if (servlet.getClass().getAnnotation(Rest.RestDynamic.class) != null) {
|
if (servlet.getClass().getAnnotation(Rest.RestDynamic.class) != null) {
|
||||||
if (field.getAnnotation(RestAddress.class) != null) continue;
|
if (field.getAnnotation(RestAddress.class) != null) continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user