This works fine:
@ApplicationPath("v2")
@OpenAPIDefinition(info = @Info(title = "XYZ API", version = "v2.0.0", contact = @Contact(), license = @license(), description = "XYZ REST API"),
servers = {@server(url = "http://localhost:8080/v2")} , security = @securityrequirement(name = "openid-connect"))
This does not (produces empty json file) and this message during build: WARNING: no protocol: /v2
@ApplicationPath("v2")
@OpenAPIDefinition(info = @Info(title = "XYZ API", version = "v2.0.0", contact = @Contact(), license = @license(), description = "XYZ REST API"),
servers = {@server(url = "/v2")} , security = @securityrequirement(name = "openid-connect"))
This is the json file content:
{"openapi":"3.0.1"}