title: How to describe this POST JSON request body in OpenAPI (Swagger)?
body: <p>I have a POST request that uses the following JSON request body. How can I describe this request body using OpenAPI (Swagger)?</p>
  <pre class="lang-js prettyprint-override"><code>{
    &quot;testapi&quot;:{
      &quot;testapiContext&quot;:{
        &quot;messageId&quot;:&quot;kkkk8&quot;,
        &quot;messageDateTime&quot;:&quot;2014-08-17T14:07:30+0530&quot;
      },
      &quot;testapiBody&quot;:{
        &quot;cameraServiceRq&quot;:{
          &quot;osType&quot;:&quot;android&quot;,
          &quot;deviceType&quot;:&quot;samsung555&quot;
        }
      }
    }
  }
  </code></pre>
  <p>So far I tried the following, but I'm stuck at defining the body <code>schema</code>.</p>
  <pre class="lang-yaml prettyprint-override"><code>swagger: &quot;2.0&quot;
  info:
    version: 1.0.0
    title: get camera
    license:
      name: MIT
  host: localhost
  basePath: /test/service
  schemes:
    - http
  consumes:
    - application/json
  produces:
    - application/json
  paths:
    /getCameraParameters:
      post:
        summary: Create new parameters
        operationId: createnew
        consumes:
          - application/json
          - application/xml
        produces:
          - application/json
          - application/xml
        parameters:
          - name: pet
            in: body
            description: The pet JSON you want to post
            schema:  # &lt;--- What do I write here?
              
            required: true
        responses: 
          200: 
            description: &quot;200 response&quot;
            examples: 
              application/json: 
               {
                 &quot;status&quot;: &quot;Success&quot;
               }
  </code></pre>
  <p>I want to define the input body inline, as a sample for documentation.</p>