|
|
|
@ -27,6 +27,7 @@ import org.wso2.carbon.apimgt.api.model.Scope;
|
|
|
|
|
import org.wso2.carbon.device.mgt.common.permission.mgt.Permission;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.ServletContext;
|
|
|
|
|
import javax.ws.rs.Consumes;
|
|
|
|
|
import javax.ws.rs.DELETE;
|
|
|
|
|
import javax.ws.rs.GET;
|
|
|
|
|
import javax.ws.rs.HttpMethod;
|
|
|
|
@ -34,6 +35,7 @@ import javax.ws.rs.OPTIONS;
|
|
|
|
|
import javax.ws.rs.POST;
|
|
|
|
|
import javax.ws.rs.PUT;
|
|
|
|
|
import javax.ws.rs.Path;
|
|
|
|
|
import javax.ws.rs.Produces;
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.lang.annotation.Annotation;
|
|
|
|
@ -59,7 +61,6 @@ public class AnnotationProcessor {
|
|
|
|
|
|
|
|
|
|
private static final String STRING_ARR = "string_arr";
|
|
|
|
|
private static final String STRING = "string";
|
|
|
|
|
private static final String API_CLASS_NAME = org.wso2.carbon.apimgt.annotations.api.API.class.getName();
|
|
|
|
|
|
|
|
|
|
private static final String SWAGGER_ANNOTATIONS_PROPERTIES = "properties";
|
|
|
|
|
private static final String SWAGGER_ANNOTATIONS_EXTENSIONS = "extensions";
|
|
|
|
@ -126,7 +127,6 @@ public class AnnotationProcessor {
|
|
|
|
|
* @throws IOException
|
|
|
|
|
*/
|
|
|
|
|
public Set<String> scanStandardContext(String className) throws IOException {
|
|
|
|
|
if (API_CLASS_NAME.equals(className)) {
|
|
|
|
|
ExtendedAnnotationDB db = new ExtendedAnnotationDB();
|
|
|
|
|
db.addIgnoredPackages(PACKAGE_ORG_APACHE);
|
|
|
|
|
db.addIgnoredPackages(PACKAGE_ORG_CODEHAUS);
|
|
|
|
@ -137,8 +137,6 @@ public class AnnotationProcessor {
|
|
|
|
|
//Returns a list of classes with given Annotation
|
|
|
|
|
return db.getAnnotationIndex().get(className);
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Method identifies the URL templates and context by reading the annotations of a class
|
|
|
|
|