I am trying to get the following output in my /openApi URL of my Quarkus Rest service.
servers:
- url: 'https://serviceproxy.sun.ac.za/sunstudent-api'
description: The production environment base
- url: 'https://serviceproxy-test.sun.ac.za/sunstudent-api'
description: The test environment base url
- url: 'https://serviceproxy-dev.sun.ac.za/sunstudent-api'
description: The development environment base url
I can get the result using the @OpenAPIDefinition tag in my actual class, but I already have a bunch of OpenAPI-specific things defined in my application.properties file (mp.openapi.extensions.smallrye.info.title, mp.openapi.extensions.smallrye.info.version, etc.)
I can get a list of servers by specifying the following property:
mp.openapi.servers=https://serviceproxy-dev.sun.ac.za/sunstudent-api,https://serviceproxy-test.sun.ac.za/sunstudent-api,https://serviceproxy.sun.ac.za/sunstudent-api
That property returns the following in my /openApi:
servers:
- url: https://serviceproxy-test.sun.ac.za/sunstudent-api
- url: https://serviceproxy-dev.sun.ac.za/sunstudent-api
- url: https://serviceproxy.sun.ac.za/sunstudent-api
I'm just trying to figure out how to also add the description tags for the various servers.
I have seen there is also a property called quarkus.smallrye-openapi.servers but that also just specifies a list of servers.