I really appreciate the help, thank you
That website doesn't go anywhere for me. I do see there is an rc2
available, so I'll try that.
I'm not sure how to tell if the resource classes are on the classpath for
the swagger webapp. I'm attempting to embed the swagger webapp in our
existing webapp.
This is what my setup is - a war with servlets, the web.xml, etc. I've
added the swagger servlet to web.xml. I've added the swagger jars to the
war's lib. I also have the jaxrs webservices I want to document in the
war's lib as a jar. The jaxrs webservices jar is on the war's classpath.
Here's an example of one of my resources:
package myorg.resources;
import a.bunch.of.stuff
@GZIP()
@Path("/Tokens")
public class TokenResource extends BaseResource {
@Resource
protected WebServiceContext webServiceContext;
@Override
protected String getClientAppName(){
//impl
}
@Override
protected WebServiceContext getWebServiceContext() {
//impl
}
@Override
public Logger getLogger() {
//impl
}
@Override
protected String getWebServiceType() {
//impl
}
@GET
@Path("/ForgotPassword/{userId}")
@Produces({MediaType.APPLICATION_JSON})
public Response getPassword(@PathParam("userId") String userId, @Context
HttpServletRequest request) throws RemoteException {
//impl
}
@POST
@Produces({MediaType.APPLICATION_JSON})
public Response getToken(@FormParam("userid") String userId, @FormParam(
"password") String password,@Context HttpServletRequest request) throws
RemoteException{
//impl
}
}
On Thursday, March 15, 2018 at 9:21:30 AM UTC-8, Francesco Tumanischvili
wrote:
>
> As long as resources are JAX-RS annotated, this should work, RESTEast is
> fully supported (check out RESTEasy samples in https:/e
> /github.com/swagger-api/swagger-samples/tree/2.0/java
> <https://github.com/swagger-api/swagger-samples/tree/2.0/java/java-jaxrs2-openapiservlet>
> ).
>
> There have been quite some changes since rc1, so it's possible that some
> bug prevented it to work, while it's fixed in latest snapshot (and upcoming
> first release 2.0.0)
>
> Are the resource classes available in classpath for the "swagger" web app?
>
> Sonatype snapshot repo is the following:
>
> <repository>
> <id>sonatype-snapshots</id>
> <name>sonatype-snapshots</name>
> <url>
> https://nexus.swaggerhub.com/content/repositories/sonatype-snapshots/
> </url>
> <snapshots>
> <enabled>true</enabled>
> </snapshots>
> </repository>
>
>
>
> Two followups - is there a particular reason this wouldn't work in a
>> release candidate or stable version?
>>
>> and
>>
>> This is dumb, but where is the snapshot repository? I can't resolve it
>> automatically, so I'd need to add it to my list of repos to use it
>>
>
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.