title: how to set the springfox.documentation.swagger.v2.path from application.properties
body: <p>I am using Swagger2 in my Java based REST API. The basepath of the API has been set from the <code>application.properties</code> file</p>
  
  <pre class="lang-none prettyprint-override"><code>server.contextPath=/myapi/v1/
  </code></pre>
  
  <p>I could access the endpoints using my Swagger UI in localhost as in the following URL:</p>
  
  <pre class="lang-none prettyprint-override"><code>http://localhost:8080/myapi/v1/swagger-ui.html
  </code></pre>
  
  <p>And my end points work fine. But I am not able to access the JSON API doc from the following URL:</p>
  
  <pre class="lang-none prettyprint-override"><code>http://localhost:8080/myapi/v1/api-docs
  </code></pre>
  
  <p>The JSON API doc has been shown in:</p>
  
  <pre class="lang-none prettyprint-override"><code>http://localhost:8080/myapi/v1/v2/api-docs
  </code></pre>
  
  <p>An extra path <code>v2</code> is showing now. I read certain articles saying that this is because of the Swagger2 default api-docs path and we can override the path using  <code>springfox.documentation.swagger.v2.path</code> property in application property.</p>
  
  <p>How can I set the <code>v2</code> path to <code>http://localhost:8080/myapi/v1/api-docs</code>
  ? Through the <code>application.properties</code>? I have been trying different paths but not getting the right result.</p>