I have a issue changing the Swagger-Ui URL. I integrated swager2 and swagger-ui using below dependencies in my project and using DOCKET to get all apis
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.4.0</version>
</dependency>
Right now i am able to access to swagger Ui using : http://localhost:8080//rest/swagger-ui.html
So i want to change that URL to : http://localhost:8080/swagger or http://localhost:8080//swagger.
Can any one help me with this.
Have you read the docs? There are notes on how to do this. also please use 2.5.0
@dilipkrish I went through it, and tried to do below modifications.
@Bean
UiConfiguration uiConfig() {
return new UiConfiguration(
"http://localhost:8080/swagger",
"none",
"alpha",
"schema",
UiConfiguration.Constants.DEFAULT_SUBMIT_METHODS,
false,
true);
}
But it didn't work for me. I am new to swagger so, can you please tell what i need to change?
Thanks
Where is the document does it say how to change the path to the swagger-ui.html?
I see this:
Since swagger ui is a static resource it needs to rely on known endpoints to configure itself at runtime. So these 鈽濓笍 are *cool uris that cannot change. There is some customization that is possible, but swagger-ui needs to be available at the root of the webcontext.
so is it not possible to make it be in a different folder than the root of the web context? I want it one level deeper than the webcontext.