Hi,
I have the following SwaggerDefinition annotation in my JAX-RS resource (among plenty of other Swagger annotations that work fine):
@SwaggerDefinition(
basePath = "/rest/alerts",
info = @Info(
. . . . . . . . . . .
@Api(value="/rest/alerts")
public class AlertsSubresource
The main objective for SwaggerDefinition annotation is to specify base path for my JAX-RS resource, instead of using @Path on the resource class level (that would break JAX-RS routing).
The resource compilation works fine (I use swagger-core v 1.5.3) but when I run swagger-maven-plugin on this resource, the data from @SwaggerDefinition, including info, doesn't show up in the generated json and html. Is there something specific I need to do in the swagger-maven-plugin definition? I have it plain as:
<plugin>
<groupId>com.github.kongchen</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<apiSources>
<apiSource>
<springmvc>false</springmvc>
<locations>com.hp.storage.pml.mgmt.indexservice.impl.jaxrs;com.hp.storage.pml.mgmt.eatlas.alerts.impl.jaxrs;</locations>
<schemes>https</schemes>
<host></host>
<basePath>/</basePath>
<info>
<title>PML Mgmt. Services Rest API</title>
<version>v1</version>
<description>The definition of the REST API surfaced by the PML management service plugins over https on port 9443.</description>
</info>
<templatePath>${basedir}/templates/strapdown.html.hbs</templatePath>
<outputPath>${basedir}/target/generated/document.html</outputPath>
<swaggerDirectory>target/generated</swaggerDirectory>
</apiSource>
</apiSources>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
Thanks in advance,
Sasha