Swagger Annotations with Enunciate

1k views Asked by At

Can Swagger Annotations be used with enunciate and maven. I am trying to add swagger annotations but its not working instead picking up default java doc comments.

Tried adding parameters like scan or resourcePackage to swagger tag of enunciate.xml which exists in Swagger BaseConfig class but looks like it doesnt support those parameters.

Dependencies defined in pom:

<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.21</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-core</artifactId>
<version>1.5.21</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jaxrs</artifactId>
<version>1.5.21</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>1.5.21</version>
</dependency>

Plugin for Enunciate: groupId: com.webcohesion.enunciate artifactId: com.webcohesion.enunciate

Config for swagger in enunciate.xml

  <swagger disabled="false" basePath="/test-web-service/rest">
        <scheme>https</scheme>
        <scheme>http</scheme>
        </swagger>

Swagger Annotation should pick up but its not working.

1

There are 1 answers

1
Ryan Heaton On

Currently there is partial support for some Swagger annotations. See #433