Yamini
Yamini

Reputation: 67

Swagger Annotations with Enunciate

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.

Upvotes: 0

Views: 1120

Answers (1)

Ryan Heaton
Ryan Heaton

Reputation: 1183

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

Upvotes: 0

Related Questions