I was using spring-restdocs with SB2.7.9
Now we migrated to SB3.0.6. I am using gradle plugin (kotlin DSL) id("org.asciidoctor.jvm.convert") version "3.3.2"
Libraries are versions:
spring-restdocs-asciidoctor-3.0.0.jar
spring-restdocs-core-3.0.0.jar
spring-restdocs-mockmvc-3.0.0.jar
I have my custom template under <project_path>/src/test/resources/org/springframework/restdocs/templates/request-parameters.snippet
During execution of gradle task asciidoctor i am getting WARNING: rest/my_complex_adoc_file.adoc: line 9: Snippet request-parameters not found at <project_path>/build/generated-snippets/zip-cities-find/request-parameters.adoc for operation zip-cities-find (and yes, they are not really there)
And in <project_path>/documentation/rest/my_complex_adoc_file.adoc i have it like
operation::zip-cities-find[snippets='http-request,request-parameters,http-response,response-fields,links']
Gradle looks like:
val documentationDir = file("documentation")
val documentationSnippetsDir = file("build/generated-snippets")
"asciidoctor"(AsciidoctorTask::class) {
setConfigurations(listOf("asciidoctorExtensions"))
setOutputDir(file("build/documentation"))
inputs.dir(documentationSnippetsDir)
setSourceDir(documentationDir)
setBaseDir(documentationDir)
attributes(mapOf("snippets" to documentationSnippetsDir))
baseDirFollowsSourceFile()
asciidoctorj {
fatalWarnings(listOf(missingIncludes()))
}
}
With SB2.7.9 was working correctly, now I can't find where is the problem.
Any help is appreciated
Support for documenting request parameters has been removed in Spring REST Docs 3.0 and replaced with support for documenting form and query parameters separately:
In addition to updating your tests to adapt to this change, you should also update your
.adocfile to reference thequery-parametersand/orform-parameterssnippet in place of therequest-parameterssnippet.