title: Expected type object but found type string
body: <p>I am having trouble with setting up my API. The error I am getting is as follows:</p>
  
  <pre><code>[
    {
      "message": "Wrong data in the response. ",
      "error": [
        {
          "code": "INVALID_TYPE",
          "params": [
            "object",
            "string"
          ],
          "message": "Expected type object but found type string",
          "path": "#/"
        }
      ],
      "content": "{\"success\":true,\"payload\":{\"userId\":47}}"
    }
  ]
  </code></pre>
  
  <p>With response headers:</p>
  
  <pre><code>connection: keep-alive  
  content-length: 233  
  content-type: application/json; charset=utf-8  
  date: Fri, 17 Apr 2020 08:09:38 GMT  
  etag: W/"e9-2OFjPp0RZp8asoi4T2vo8yXiZxE"  
  x-powered-by: Express 
  </code></pre>
  
  <p>Now I expected this to work, as this very same code worked when using Swagger 2.0 instead of the oas-tools 3.0.1. This is my swagger file:</p>
  
  <pre><code>openapi: 3.0.1
  info:
    title: Swagger test
    version: 0.0.1
  servers:
  - url: http://localhost:8081/
  paths:
    /add-user:
      post:
        x-router-controller: 'addUser'
        description: Adds a user to the database
        operationId: add
        requestBody:
          $ref: '#/components/requestBodies/AddUser'
        responses:
          201:
            description: Successfully added the user to the database
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    success:
                      type: boolean
                    payload:
                      type: object
                      properties:
                        userId:
                          type: integer
  </code></pre>
  
  <p>And this is my node script in which I send the response back:</p>
  
  <pre><code>db
  .query(insert_user_query, [username, password])
  .then(function(result) {
      var response = {
          "success": true,
          "payload": {
              "userId": result.rows[0].user_id
          }
      }
  
      res.status(201).json(response)
  })
  </code></pre>
  
  <p>Now I am completely lost, as I am building the JSON in the response variable, and I am setting response code 201 and sending it as json (which adds the application/json content-type), and yet Swagger interprets is as a string instead of an object.</p>
  
  <p>Anyone here who could please point me in the right direction?</p>