Open rsoika opened 4 years ago
I finally figured it out and I wrote a short blog about it: https://ralph.blog.imixs.com/2020/05/08/microprofile-openapi-and-swagger-ui/
Nice blog. Only one thing, you are still using the old artifact I'd, see https://github.com/microprofile-extensions/openapi-ext/tree/master/openapi-ui#getting-started, rather use openapi-ui
openapi_ui_copyrightBy should work as a key in env car in docker
Thanks a lot for the hint - this all is very great work!
But now (maybe) I found something strange?
In my test environment I am running payara/micro:5.194 and also payara/micro:5.201.
With version 1.1.3 it works fine using the following dependecy:
<dependency>
<groupId>org.microprofile-ext.openapi-ext</groupId>
<artifactId>openapi-ui</artifactId>
<version>1.1.3</version>
</dependency>
But with the latest version 1.1.4 I see the following exception
Caused by: java.lang.reflect.InvocationTargetException
.....
training-service_1 | Caused by: java.lang.NoSuchMethodError: java.io.InputStream.readAllBytes()[B
training-service_1 | at org.microprofileext.openapi.swaggerui.Templates.getLogo(Templates.java:121)
training-service_1 | at org.microprofileext.openapi.swaggerui.Templates.afterCreate(Templates.java:46)
training-service_1 | ... 70 more
are you aware of this? I will try to see if I can find a reason....
Yea I think it might be jdk 11 specific
So I need a fix for jdk 8, or branch
Yes it is the jdk 10/11. I did not get my own maven projects working with jdk 10. I am still building all my project on jdk 1.8. I do not understand why this is such a big problem with maven and the compiler plugin. Which maven version are you using for dev? Maybe I should upgrade my maven...
I am using the latest maven, and jdk 11. But I do like to still support 8 as well so I'll look for a fix
ok great!
I am running the openapi-ext in Payara-micro on Docker. This works fine, but the server box shows only the internal docker host name:
How can I overwrite or add the external hostname (e.g. localhost) I read that it is possible to configure swagger ui with the microprofile config api, but I did not found an example how the config parameter have to look like.
I tried something like this in my docker-compose file:
But it did not work. Also I found no information how the server configuration variable should be named.