asciidocasciidoctorspring-restdocs

How to fail gradle build if asciidoctor got generating warning


I'm using spring-restdocs to generate docs.

I'm wondering if any property to fail the asciidoctor task while getting similar warnings when building the doc.

Snippet http-response not found at ../../../build/generated-snippets/find-list-configuration-fixed-assets-source-response/http-response.adoc for operation find-list-configuration-fixed-assets-source-response
Snippet path-parameters not found at ../../../build/generated-snippets/update-currency/path-parameters.adoc for operation update-currency

Solution

  • Unfortunately, this is not possible. There is an open issue https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/154 since 2015. If you read through this issue you will find a workaround. Maybe it will help you. :-)