title: What is the schema type for JSON object in swagger 2.0
body: <p>I am writing a API document with the help of Swagger 2.0. I have generated one API where response is in array of books which is working fine.</p>
  
  <pre><code>[{
      "id": 1,
      "book_name": "The Complete Reference Java8",
      "author": "Herbert Schidt",
      "genre": "Technology"
  }, {
      "id": 2,
      "book_name": "C Programming",
      "author": "Dennis Ritchie",
      "genre": "Technology"
  }]
  </code></pre>
  
  <p><strong>Swagger</strong> </p>
  
  <pre><code>/fetchBooks:
  get:
    description: |
      Returns an array of book objects.
  
    responses:
      200:
        description: Successful response
        schema:
          title: ArrayOfBooks
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              book_name:
                type: string
              author:
                type: string
              genre:
                type: string
  </code></pre>
  
  <p>Well, I want to send only one book details in one API in <code>JSONObject</code> what schema type should I take for it as I tried object is not working.</p>
  
  <pre><code>{
      "id": 1,
      "book_name": "The Complete Reference Java8",
      "author": "Herbert Schidt",
      "genre": "Technology"
  }
  </code></pre>
  
  <p><strong>Swagger</strong></p>
  
  <pre><code>/fetchBook:
  get:
    description: |
      Returns a book object
  
    parameters:
      - name: id
        in: query
        description: Books Id's
        reqrequired: true
        type: integer
        format: int
  
    responses:  
      200:
        description: Successful response
        schema:
          type: object &lt;-- What type should I specify for JSONObject here
          items:
            type: object
            properties:
              id:
                type: integer
              book_name:
                type: string
              author:
                type: string
              genre:
                type: string
  </code></pre>
  
  <p>As object is not working, swagger is not showing <code>JSON</code> format. </p>
  
  <p>Current State :</p>
  
  <p><a href="https://i.stack.imgur.com/lM4ui.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lM4ui.png" alt="enter image description here"></a></p>
  
  <p>Expected State :</p>
  
  <p><a href="https://i.stack.imgur.com/997tK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/997tK.png" alt="enter image description here"></a></p>