Try to generate document.html and json with maven plugin and spring boot 1.3.0.M5
See original GitHub issueI try without any success to generate static files from swagger maven plugin.
<plugin>
<groupId>com.github.kongchen</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<apiSources>
<apiSource>
<springmvc>true</springmvc>
<locations>com.web.controler</locations>
<schemes>http</schemes>
<host>localhost:8080</host>
<basePath>/</basePath>
<info>
<title>Swagger sample</title>
<version>v2</version>
<description>
This is the Rest API Documentation
</description>
<contact>
<email>toto@mail.com</email>
<name>toto</name>
</contact>
</info>
<templatePath>${basedir}/src/test/resources/strapdown.html.hbs</templatePath>
<outputPath>${basedir}/generated/document.html</outputPath>
<swaggerDirectory>${basedir}/generated/swagger-ui</swaggerDirectory>
</apiSource>
</apiSources>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-core</artifactId>
<version>1.5.3</version>
</dependency>
Document.html and json are generated but without any API detected
I have my rest controller annotated like bellow
/**
* Handles requests for rest call.
*/
@Api(value = "/")
@RestController
public class RestController {
@ApiOperation(value = "Load pet parent tree", notes = "notes", response = Pet .class)
@RequestMapping(value = "/rest/tree/pet", method = RequestMethod.GET)
public Pet loadParentsTree(
@ApiParam(required = true, value = "petId") @PathVariable String petId
HttpServletResponse response) {
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
Spring Boot Reference Guide
Spring Boot Documentation. This section provides a brief overview of Spring Boot reference documentation. Think of it as map for the rest of...
Read more >Spring Boot Reference Guide
If you're just getting started with Spring Boot, or 'Spring' in general, this is the section for you! Here we answer the basic...
Read more >Spring Boot Reference Documentation
Try the How-to documents. They provide solutions to the most common questions. Learn the Spring basics. Spring Boot builds on many other Spring...
Read more >Spring Boot Reference Guide
Deploy Spring Boot Applications: Cloud Deployment | OS Service; Build tool plugins: Maven | Gradle; Appendix: Application Properties | Auto-configuration ...
Read more >Spring Boot Reference Guide
Spring Boot also provides an optional Maven plugin to create executable jars. ... Always try to use the equivalent Java-based configuration if possible....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Nice I am waiting to use it without swagger specific annotation (only spring mvc) is it possible ?
If you use Spring Boot you have to make sure that your
@RequestMapping
uses thevalue
attribute instead ofpath
. Otherwise, no API is detected.See: #467