Closed saeidrastak closed 4 years ago
This line skips empty sections: AutoDocumentation.sectionBuilder().snippetNames(snippets).skipEmpty(true).build()
. If you want to include them anyway, change it to false
.
Regarding the include, if you add request-parameters
to snippets collection, it means classic SRD snippet will be added to the section snippet (hence the include
pointing to that, not to auto-request-parameters
). That one doesn't use skipEmpty
flag so it will be included every time.
If you add auto-request-parameters
to snippet collection, that one is SARD snippet and thus will honor global flags (such as skipEmpty) and you'll see that it was used in
include:`.
I document with mockMvc and create a custom document method as below:
Sample Generated section.adoc file for a sample request is:
which the request-parameters part is missing. when I change
snippets.add("auto-request-parameters");
tosnippets.add("request-parameters");
then generated section.adoc file will change like this:As you see the Query parameters part is added but with wrong path to
include::request-parameters.adoc[]
instead ofinclude::auto-request-parameters.adoc[]
. (The file auto-request-parameters.adoc is created.)