title: Springfox/Swagger : Documenting HashMap object
body: <p>People, I am trying to generate documentation for the spring services and I have one service which is like</p>
  
  <pre><code> @RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
  
    public ResponseEntity&lt;Map&lt;String, Object&gt;&gt; getAccountList(
      HttpServletRequest request, HttpServletResponse response,
        ) {
  
      // Get account associate with user.
      List&lt;Account&gt; accounts =
          accountDB.findAccountForUser(user.getId());
  
      // Create response object.
      Map&lt;String, Object&gt; responseObject = new LinkedHashMap&lt;String, Object&gt;();
      responseObject.put(StringConstants.RESPONSE_TYPE, StringConstants.SUCCESS);
      responseObject.put(StringConstants.STATUS, HttpStatus.OK.value());
      responseObject.put(StringConstants.ITEMS, mapAccountList(accounts));
  
      return new ResponseEntity&lt;Map&lt;String, Object&gt;&gt;(responseObject, HttpStatus.OK);
    }
  
    private List&lt;Map&lt;String, String&gt;&gt; mapAccountList(List&lt;Account&gt; accountList) {
      List&lt;Map&lt;String, String&gt;&gt; accountMapList = new ArrayList&lt;Map&lt;String, String&gt;&gt;();
      // Iterate over accountList and create map.
      for (Account account : accountList) {
        Map&lt;String, String&gt; accountMap = mapAccount(account);
        accountMapList.add(accountMap);
      }
      return accountMapList;
    }
  </code></pre>
  
  <p>Here, the problem is swagger is not generating a response information. In a case of POJO it works fine, but when I return a hashmap it does not. </p>
  
  <p>Can any one help?</p>
  
  <p>~Thanks.</p>