Generated server url is HTTP
See original GitHub issueDescribe the bug When deployed, the server URL is right, except for the scheme: it is using HTTP instead of HTTPS, hence resulting in “Fail to fetch” errors.
To Reproduce
- deploy the app on localhsot
- use nginx to make it available under https
- open swagger ui
Expected behavior
- the generated server URL should match the root of the documentation
Screenshots
As we can see, the root URL is https://bbdata.daplab.ch
, but the generated server URL is http://...
.
Additional context
I am using version 1.4.1
.
Here is the relevant part of my application.properties:
## Documentation
# Paths: UI at /docs/api, yaml at /docs/api/bbdata{.yaml}
springdoc.swagger-ui.path=/docs/api
springdoc.api-docs.path=/docs/api/bbdata
# do not expand tags
springdoc.swagger-ui.doc-expansion=none
# sort tags alphabetically
springdoc.swagger-ui.tags-sorter=alpha
springdoc.swagger-ui.operations-sorter=alpha
# show actuator endpoints
springdoc.show-actuator=true
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Wrong "Generated server url" in springdoc-openapi-ui ...
Spring Boot 2.2 application with springdoc-openapi-ui (Swagger UI) runs HTTP port. The application is deployed ...
Read more >API Server and Base Path - Swagger
In OpenAPI 3.0, you use the servers array to specify one or more base URLs for your API. servers replaces the host ,...
Read more >F.A.Q - Springdoc-openapi
Generating automatically server URL may be useful, if the documentation is not present. If the server annotations are present, they will be used...
Read more >springdoc-openapi: provide some possibility to open the ...
actually the generated application's OpenAPI documentation url and ... These URLs can have the default values (http://server:port/context-path/v3/api-docs ...
Read more >'Code First' API Documentation with Springdoc and Spring Boot
Then we can generate our documentation from the API we have already programmed. ... servers = @Server(url = "http://localhost:8080") ) class ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I was able to make it work be specifying the server url as
/
in the configuration:You’d just saved my whole career!