title: Nested json as a request body Input using swagger-ui in node js
body: <p>I am new to node js and swagger-ui.</p>
  
  <p>I want to pass below input body to my web service using swagger-ui,</p>
  
  <p>I am able to pass normal json like:</p>
  
  <pre><code>{
  "username":"abc",
  "password":"******"
  }
  </code></pre>
  
  <p>but I want to give following input to my web service using swagger-ui.</p>
  
  <pre><code>{
  "data":
  {"username":"abc",
  "password":"******"
  }
  }
  </code></pre>
  
  <p>my api-docs.json file is below:</p>
  
  <pre><code>{
    "info": {
      "title": "Node Swagger API",
      "version": "1.0.0",
      "description": "Demonstrating how to describe a RESTful API with Swagger"
    },
    "host": "localhost:5002",
    "basePath": "/",
    "swagger": "2.0",
    "paths": {
  
      "/login": {
        "post": {
          "description": "user login",
          "produces": [
            "application/json"
          ],
          "parameters": [
            {
              "name": "userName",
              "description": "username to get userType",
              "required": true,
              "type": "string",
              "in": "formData"
            },
            {
              "name": "password",
              "description": "password to get userType",
              "required": true,
              "type": "string",
              "in": "formData"
            }
  
  
  
          ],
          "responses": {
            "0": {
              "description": "Access token has been expired. Please login again."
            },
            "200": {
              "description": "Successfully returns the response"
            },
            "400": {
              "description": "Invalid input Parameters"
            },
            "401": {
              "description": "Invalid Access Token"
            },
            "404": {
              "description": "No data found"
            },
            "500": {
              "description": "Internal Server Error"
            }
          }
        }
      }
    },
    "definitions": {},
    "responses": {},
    "parameters": {},
    "securityDefinitions": {},
    "tags": []
  }
  </code></pre>
  
  <p>So How can pass below input using swagger-ui to my web service:</p>
  
  <pre><code>{
      "data":
      {"username":"abc",
      "password":"******"
      }
      }
  </code></pre>
  
  <p>Any Help will be appreciable.</p>
  
  <p>Thanks In Advance.</p>