[Question] How to remove 'host' field from generated docs?
See original GitHub issueSpringfox version: 3.0.0-SNAPSHOT.
The response of my /v2/api-docs
looks like this:
{
"swagger": "2.0",
"host": "localhost:8888",
"basePath": "/"
}
But I want to remove the host
field. This would allow to use “Try it out” from /swagger-ui.html
relative to the current host. The swagger reference (Omitting host and scheme) says, that it’s allowed. So resulting JSON would look like this:
{
"swagger": "2.0",
"basePath": "/"
}
I found no way to do this in the springfox configuration. I tried to set Docket.host(null)
, but in this case, it will use default empty-string value. I’m using SNAPSHOT version, but it wouldn’t work in stable versions too.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:7 (1 by maintainers)
Top Results From Across the Web
About default fields (host, source, sourcetype, and more)
About default fields (host, source, sourcetype, and more). When Splunk software indexes data, it tags each event with a number of fields.
Read more >Protect your domain with a TXT record - Google Help
Switch to the tab with your registrar's web site and create a new TXT record. · Enter @ in the Name field. This...
Read more >Exploring data in Looker | Google Cloud
Click the selected field in the field picker or click Remove from the column's gear menu. Click Run to re-run the query. You...
Read more >URL removal explained, Part I: URLs and directories
To request removal of a directory or site, click on the site in question, then go to Site configuration > Crawler access >...
Read more >About documentation - dbt Developer Hub
dbt provides a way to generate documentation for your dbt project ... a DAG of your project, any tests you've added to a...
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
it is possible to use:
@ClaudenirFreitas thanks for that