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

property quarkus.swagger-ui.always-include doesn't work on Native mode. #14911

Closed
pjgg opened this issue Feb 8, 2021 · 4 comments · Fixed by #14939
Closed

property quarkus.swagger-ui.always-include doesn't work on Native mode. #14911

pjgg opened this issue Feb 8, 2021 · 4 comments · Fixed by #14939
Assignees
Labels
area/swagger-ui kind/bug Something isn't working
Milestone

Comments

@pjgg
Copy link
Contributor

pjgg commented Feb 8, 2021

Description

When I set up an application with quarkus.swagger-ui.always-include enabled, swagger-ui must be available. However on Native mode are not available.

example:

quarkus.http.root-path=/api
quarkus.swagger-ui.always-include=true 
  • Compile and run your app on native mode and then make the following query:
Request method:	GET
Request URI:	http://test-http-advanced-pablo-test.apps.ocp45.dynamic.quarkus/api/q/swagger-ui

HTTP/1.1 404 Not Found

Notes:

  • Tested with Rest assurance.

Jira Ref

@pjgg pjgg added the kind/bug Something isn't working label Feb 8, 2021
@ghost ghost added the area/swagger-ui label Feb 8, 2021
@ghost
Copy link

ghost commented Feb 8, 2021

/cc @phillip-kruger

@phillip-kruger phillip-kruger self-assigned this Feb 8, 2021
@phillip-kruger
Copy link
Member

Managed to recreate. This is only when using quarkus.http.root-path. Investigating.

@phillip-kruger
Copy link
Member

@kenfinnigan - I need some help please.
jar version works fine (fast-jar) so only when using -Pnative and only when adding quarkus.http.root-path
There is nothing obvious in the extension wrong (that I can see)

Can you assist ?

@pjgg
Copy link
Contributor Author

pjgg commented Feb 9, 2021

lets me give you a scenario!:
Use this application: https://github.com/pjgg/beefy-scenarios/tree/master/001-quarkus-getting-started
Add this dependency to his pom.xml

 <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-openapi</artifactId>
    </dependency>

And this property to his application.property

quarkus.http.root-path=api
quarkus.swagger-ui.always-include=true 

And now compile this app: mvn clean install -Dmaven.test.skip=true -Pnative (in native mode)

Then run the app, located in the target folder: ./001-quarkus-getting-started-1.0.0-SNAPSHOT-runner
Validate that is running: curl -v http://localhost:8080/hello
And try to load swagger-ui site: http://localhost:8080/api/q/swagger-ui/ and you will get a 404

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/swagger-ui kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants