title: Wiremock bodyFileName templating
body: <p>I'm using Wiremock to stub out some API calls made by mobile clients.</p>
  
  <p>Struggling to get templated filename from request.</p>
  
  <p>Can anyone confirm if this should even work with Wiremock standalone pls?</p>
  
  <pre><code>"response": { "status": 200, "bodyFileName": "Account-{{jsonPath request.body '$.user.identity'}}.json”}
  </code></pre>
  
  <p>I've got static files to be returned fine, just seems like <code>bodyFileName</code> doesn't like templating.</p>
  
  <p>Example:</p>
  
  <p>I configure wm with following Json:</p>
  
  <pre><code>{
      "request": {
          "method" : "GET",
          "url": "/users/D8428899330"
      },
      "response": {
          "status": 200,
          "bodyFileName": "user-{{request.path.[1]}}.json"
      }
  }
  </code></pre>
  
  <p>Then when I attempt the url, <a href="http://localhost:9696/users/D8428899330" rel="noreferrer">http://localhost:9696/users/D8428899330</a> I get the following error,</p>
  
  <blockquote>
    <p>HTTP ERROR: 500 Problem accessing /users/D8428899330. Reason:</p>
    
    <p>java.lang.RuntimeException: java.io.FileNotFoundException:
    /Users/iainframe/Documents/__files/user-{{request.path.[1]}}.json (No
    such file or directory)</p>
  </blockquote>
  
  <p>Should indicate that the file <code>user-D8428899330.json resides</code> in the correct location as I've hard coded it and it returns it ok. The command to start WireMock is: </p>
  
  <pre><code> java -jar ~/Documents/wm.jar --port 9696 --global-response-templating --verbose --root-dir /Users/iainframe/Documents/ 
  </code></pre>