I'm generating asciidoc snippets using spring rest docs.
I can include the generated snippets in my doc page. However, I want to define the structure of each secion once in a seperate adoc file, and have a single line for each of those in my index file.
Currently my index.adoc file looks like this:
= My Http Api Docs
= GET /units/:id
== Path Parameters
include::{snippets}/units/get/path-parameters.adoc[]
== Response Fields
include::{snippets}/units/get/response-fields.adoc[]
I want it to be like this instead
index.adoc
= My Http Api Docs
usemytemplates::mytemplate.adoc[method='get', url='units', desc='/units/:id']
mytemplate.adoc
= {method} {desc}
== Path Parameters
include::{snippets}/{url}/{method}/path-parameters.adoc[]
== Response Fields
include::{snippets}/{url}/{method}/response-fields.adoc[]
Anyone know how something like this can be done?