I'm currently trying out the 5.2.0-alpha1 version with swagger jersey components in my springboot project.
I get the following error when I annotate more than one class with the @Api() swagger annotation:
@ApiDefinition(docsPath = "/api/docs", title = "...", version = "v1", prettyPrint = true)
@Api(value = "Trolley", consumes = "application/json", produces = "application/json")
@Path("Object")
public class SomeResource {
@ApiOperation("Just returns a JSON object.")
@ApiResponses(.....)
@GET
@Path("{objectId}")
public Response getObject(@PathParam("objectId") String templateVar){....}
}
@Api(value = "System Test", produces = "text/html")
@Component
@Path("system")
public class TestResource {
@ApiOperation("Just returns a HTML basic page with information.")
@ApiResponses(.....)
@GET
@Path("check")
public Response returnSomeHTMLTexT() {....}
}
The other question I have, as it is not clear in the documentation, must I add an @ApiDefinition to all resource classes in order to have them provide JSOn output at the same endpoint uri?