I’m doing documentation using Spring rest auto docs and AsciiDoc. Below is my error message
Error Message
Section snippet 'auto-method-path' is configured to be included in the section but no such snippet is present in configuration Section snippet 'auto-description' is configured to be included in the section but no such snippet is present in configuration
The auto-method-path is being generated so I have no idea where the warning comes from. But the auto-description is according to the documentation, the javaDoc of the controller so I have no idea why is this documentation not being generated.
JavaDoc
/** * Returns a Customer * * @param id the id of the customer * @return the customer */ @GetMapping(path = "api/customer/{id}", produces = HAL_JSON_VALUE)
Advertisement
Answer
Fixed. I Was Missing this on my Pom :
<execution> <id>generate-javadoc-json</id> <phase>compile</phase> <goals> <goal>javadoc-no-fork</goal> </goals> <configuration> <doclet>capital.scalable.restdocs.jsondoclet.ExtractDocumentationAsJsonDoclet</doclet> <docletArtifact> <groupId>capital.scalable</groupId> <artifactId>spring-auto-restdocs-json-doclet</artifactId> <version>2.0.9</version> </docletArtifact> <destDir>generated-javadoc-json</destDir> <reportOutputDirectory>${project.build.directory}</reportOutputDirectory> <useStandardDocletOptions>false</useStandardDocletOptions> <show>package</show> </configuration> </execution>