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

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

Open
TapaniRundgren opened this issue Nov 12, 2018 · 1 comment
Open
Assignees

Comments

@TapaniRundgren
Copy link

TapaniRundgren commented Nov 12, 2018

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

@TapaniRundgren
Copy link
Author

If I include just one additional server url with protocol like http://localhost:8080/v2, then it works

@zvonegit zvonegit self-assigned this Nov 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants