Description
Hello.
First of all, congratulations for the good job on Restlet, and the new support for Swagger.
I've been trying to play with this new extension (org.restlet.gae:org.restlet.ext.swagger
) through Restlet v2.3-SNAPSHOT
. Here is a feedback regarding issues that I've been facing:
- the POM references the
javax.ws.rs:javax.ws.rs-api:2.0.0
which does not exist ; the one existing seems to bejavax.ws.rs:javax.ws.rs-api:2.0
: this makes the compilation tedious, and my work-around was to add directly thejavax.ws.rs:javax.ws.rs-api:2.0
artefact directly in my project POM ; - the POM references the
org.restlet.gae:org.restlet.lib.org.restlet.lib.org.eclipse.e4.core.contexts:jar:${lib-e4-version}
artefact: thelib-e4-version
property does not seem to be defined, which causes a compilation issue. My work-around was to use the Maven-Dlib-e4-version=0.12.RC1
command-line option ; - the document at http://restlet.com/learn/guide/2.3/extensions/swagger seems out-dated compared to the latest version of the source-code ;
- I tried to declare a "SwaggerApplication" in my project, and ran it on a GAE development server and got the following exception stack trace:
[INFO] Avertissement: Exception or error caught by status service
[INFO] java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.reflect.generics.reflectiveObjects")
[INFO] at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)
[INFO] at java.security.AccessController.checkPermission(AccessController.java:559)
[INFO] at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
[INFO] at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:429)
[INFO] at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1529)
[INFO] at java.lang.Class.checkPackageAccess(Class.java:2265)
[INFO] at java.lang.Class.checkMemberAccess(Class.java:2245)
[INFO] at java.lang.Class.getDeclaredFields(Class.java:1805)
[INFO] at org.restlet.ext.swagger.internal.reflect.ReflectUtils.getAllDeclaredFields(ReflectUtils.java:59)
[INFO] at org.restlet.ext.swagger.internal.info.RepresentationInfo.introspect(RepresentationInfo.java:117)
[INFO] at org.restlet.ext.swagger.internal.reflect.Introspector.toDefinition(Introspector.java:682)
[INFO] at org.restlet.ext.swagger.internal.reflect.Introspector.<init>(Introspector.java:841)
[INFO] at org.restlet.ext.swagger.internal.reflect.Introspector.<init>(Introspector.java:828)
[INFO] at org.restlet.ext.swagger.SwaggerSpecificationRestlet.getDefinition(SwaggerSpecificationRestlet.java:169)
[INFO] at org.restlet.ext.swagger.SwaggerSpecificationRestlet.getResourceListing(SwaggerSpecificationRestlet.java:201)
[INFO] at org.restlet.ext.swagger.SwaggerSpecificationRestlet.handle(SwaggerSpecificationRestlet.java:243)
Update: this exception occurs with the class sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
argument on line 59 of the ReflectUtils
class. I've trying to understand why this happens…
It seems that the Restlet Swagger ReflectUtils
class uses an introspection which is not compliant with Google App Engine. I'm surprised because I actually use the GAE flavor of Restlet, hence is this due to the fact that I run the code in a GAE development server? Could you confirm that this Restlet Swagger extension is supposed to be compliant with the GAE, please? If yes, do you also intend to support the JaxRsApplication
restlets?
Thank you for your time and support. Regards,
Édouard