Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while working with context-path #61

Open
guilhermecgs opened this issue Jun 13, 2023 · 2 comments
Open

Error while working with context-path #61

guilhermecgs opened this issue Jun 13, 2023 · 2 comments

Comments

@guilhermecgs
Copy link

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

@guilhermecgs
Copy link
Author

Does springdoc works with context path well on spring boot 3?

@jjcosare
Copy link

jjcosare commented Apr 5, 2024

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants