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

quarkus.swagger-ui.path doesn't accept environment variables as its value #4172

Closed
limadelrey opened this issue Sep 24, 2019 · 7 comments
Closed
Labels
kind/bug Something isn't working
Milestone

Comments

@limadelrey
Copy link

Hey,

I'm using quarkus-smallrye-openapi maven dependency to take advantage of automatic OpenApi specifications and Swagger UI. In order to do that I've coded the following configurations on application.properties file:

quarkus.smallrye-openapi.path=/open-api
quarkus.swagger-ui.path=${PATH:default-path}

OpenApi is working fine. However, Swagger UI is being retrieved on {{host}}/default-path (which is the default value for $PATH environment variable) when it should be retrieved by {{host}}/{{PATH}} (e.g. http://localhost:8080/swagger-ui).

This is specially important because I'm deploying this Quarkus application behind an Ingress controller on a Kubernetes cluster and Swagger UI can't aggregate Ingress path without changing its quarkus.swagger-ui.path property dynamically.

Is there any workaround?

Thank you in advance.

@limadelrey limadelrey added the kind/bug Something isn't working label Sep 24, 2019
@gsmet
Copy link
Member

gsmet commented Sep 24, 2019

@dmlloyd looks like we have a new one for the environment variable issue :).

@geoandri
Copy link
Contributor

The same configuration parameters cannot be overridden via a runner jar as well.
java -jar -Dquarkus.swagger-ui.path=/test-path/swagger-ui target/using-openapi-swaggerui-1.0-SNAPSHOT-runner.jar does not work.

@gsmet
Copy link
Member

gsmet commented Sep 25, 2019 via email

@geoandri
Copy link
Contributor

geoandri commented Sep 26, 2019

Yes, you 're right. It works as expected in this case.

@gsmet gsmet added this to the 1.1.0 milestone Nov 23, 2019
@sirAlexanderT
Copy link

Hey,

I'm using quarkus-smallrye-openapi maven dependency to take advantage of automatic OpenApi specifications and Swagger UI. In order to do that I've coded the following configurations on application.properties file:

quarkus.smallrye-openapi.path=/open-api
quarkus.swagger-ui.path=${PATH:default-path}

OpenApi is working fine. However, Swagger UI is being retrieved on {{host}}/default-path (which is the default value for $PATH environment variable) when it should be retrieved by {{host}}/{{PATH}} (e.g. http://localhost:8080/swagger-ui).

This is specially important because I'm deploying this Quarkus application behind an Ingress controller on a Kubernetes cluster and Swagger UI can't aggregate Ingress path without changing its quarkus.swagger-ui.path property dynamically.

Is there any workaround?

Thank you in advance.

I'm currently facing the same issue, on both quarkus 1.5.2.Final and 1.6.0.CR1. Would appreciate if anyone could point me to a fix. Thanks.

@sirAlexanderT
Copy link

@limadelrey How did you get around this?

@limadelrey
Copy link
Author

@sirAlexanderT Regarding OpenAPI & Swagger UI, there's a second issue that's been already addressed by Quarkus team: #4200.

Is your problem about the usage of environment variables as properties?

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

No branches or pull requests

4 participants