kongchen / swagger-maven-plugin

JAX-RS & SpringMVC supported maven build plugin, helps you generate Swagger JSON and API document in build phase.
http://kongchen.github.io/swagger-maven-plugin/
Apache License 2.0
761 stars 451 forks source link

Security definitions issue #433

Open samalbiswatosh opened 7 years ago

samalbiswatosh commented 7 years ago

Hi, I am facing the following issue when trying to integrate with my existing project.

ERROR] Failed to execute goal com.github.kongchen:swagger-maven-plugin:3.1.2:ge nerate (default) on project pos-uiservice-rest: Unable to parse configuration of mojo com.github.kongchen:swagger-maven-plugin:3.1.2:generate for parameter json : Cannot find default setter in class com.github.kongchen.swagger.docgen.mavenpl ugin.SecurityDefinition -> [Help 1]

pom.xml

basicAuth basic /securityDefinition.json
          <swaggerDirectory>src/main/webapp/</swaggerDirectory>

          <!-- Support classpath or file absolute path here. 1) classpath e.g: "classpath:/markdown.hbs", "classpath:/templates/hello.html" 2) file e.g: "${basedir}/src/main/resources/markdown.hbs", 
            "${basedir}/src/main/resources/template/hello.html" -->
          <templatePath>${basedir}/templates/strapdown.html.hbs</templatePath>
          <outputPath>${basedir}/generated/document.html</outputPath>
          <swaggerApiReader>com.wordnik.swagger.jaxrs.reader.DefaultJaxrsApiReader</swaggerApiReader>
            <attachSwaggerArtifact>true</attachSwaggerArtifact>
         </apiSource>
      </apiSources>
    </configuration>
    <executions>
      <execution>
        <phase>compile</phase>
        <goals>
          <goal>generate</goal>
        </goals>
      </execution>
    </executions>
samalbiswatosh commented 7 years ago
com.github.kongchen
    <artifactId>swagger-maven-plugin</artifactId>
    <!-- <version>3.1.5-SNAPSHOT</version> -->
     <version>3.1.2</version>