Skip to content

openapi.json is empty if ServerUrl uses relative addressing #3

@TapaniRundgren

Description

@TapaniRundgren

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"}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions