title: Change API path name while listing API's
body: <p>We are documenting all the API's from the application for this we are using <a href="https://github.com/swagger-api/swagger-ui" rel="nofollow noreferrer">swagger UI</a></p>
  <p>Here is sample code for it</p>
  <pre><code>exports.people = {
    'spec':
    {
      path : &quot;/people&quot;,
      method: &quot;POST&quot;,
      summary : &quot;Create new person&quot;,
      notes : &quot;Create new person&quot;,
      nickname : &quot;people&quot;,    
      parameters : [param.query(&quot;email&quot;, &quot;email&quot;, &quot;string&quot;, true), 
                    param.query(&quot;firstName&quot;, &quot;firstName&quot;, &quot;string&quot;, true),
                    param.query(&quot;lastName&quot;, &quot;lastName&quot;, &quot;string&quot;, true)]   
    },
    'action': function(req, res)
    {
  
          -----code----
    }
  }
  </code></pre>
  <p>it generating Request URL as</p>
  <pre><code>http://localhost:8080/rest/api/people
  </code></pre>
  <p>So it is generating path for people as <code>/people</code> but we have to change it to &quot;/create_people' so how can we implement this functionality.</p>
  <p>we tried this by changing &quot;path&quot; of the <code>spec</code> here is the code</p>
  <pre><code>exports.people = {
    'spec':
    {
      path : &quot;/create_people&quot;,
      .....// rest of code
  </code></pre>
  <p>it is working but it creating different redirect url as follow</p>
  <pre><code>http://localhost:8080/rest/api/create_people 
  </code></pre>
  <p>which is wrong we have to change only API name not request URL.</p>
  <p>here is the pictorial representation. <img src="https://i.stack.imgur.com/FlIdp.jpg" alt="enter image description here" /></p>
  <p>we are using <strong>swagger-ui</strong> and <strong>node.js</strong></p>