conditional include in asciidoc
<p>I am using Spring RestDoc together with AsciiDoc to describe my rest api. RestDoc generates different files depending if there are request parameters described / response fields etc. I would like to have one template conditionally including whatever file exists.</p>

<p>something like this:</p>

<pre><code>Request:

include::{reqresPath}/http-request.adoc[]

Response:
include::{reqresPath}/http-response.adoc[]

Parameters:
ifeval::[{{reqresPath}/request-parameters.adoc}.exists]
  include::{reqresPath}/request-parameters.adoc[]
endif::[]
ifeval::[{{reqresPath}/request-parameters.adoc}.exists]
  include::{reqresPath}/request-parameters.adoc[]
endif::[]
</code></pre>

<p>or at least exclude warnings in case of a missing file. But I could not figure out how to suppress these.</p>