Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No such snippet is present in configuration warning

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)
like image 930
Rui Fernandes Avatar asked Dec 15 '25 04:12

Rui Fernandes


1 Answers

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>
like image 120
Rui Fernandes Avatar answered Dec 16 '25 19:12

Rui Fernandes



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!