springdoc-openapi-maven-plugin
springdoc-openapi-maven-plugin copied to clipboard
Error while working with context-path
After adding a single line:
server.servlet.context-path=/mytest
I start receiving an error on (mvn clean verify)
[INFO]
[INFO] --- springdoc-openapi-maven-plugin:1.4:generate (integration-test) @ demo ---
[ERROR] An error has occured: Response code 404
[INFO]
[INFO] --- spring-boot-maven-plugin:3.1.0:stop (default) @ demo ---
See here. Just clone to reproduce
https://github.com/guilhermecgs/demo/commit/1865f486a53316bac0938a863c2c27573b1d1249
Does springdoc works with context path well on spring boot 3?
Somehow it doesn't detect automatically so we had to update the default:
<plugin>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<apiDocsUrl>http://localhost:8080${server.servlet.context-path}/v3/api-docs</apiDocsUrl>
</configuration>
</plugin>