Spring REST Docs

The plugin supports the operation::[]-macro: It provides auto-complete for the editor and renders the contents in preview.

How it works

When writing documentation with Spring REST Docs, the preview plugin auto-detects the folder generated-snippets.

It looks relative to the pom.xml for target/generated-snippets or relative to build.gradle or build.gradle.kts for build/generated-snippets.

Once it finds this folder, it sets the snippets attribute and enables the operation::[] block macro.