title: open api error: request should have required property '.headers' - docker
body: <p>My nodejs app has an open-api.yaml file and <a href="https://www.npmjs.com/package/express-openapi-validate" rel="noreferrer">express-openapi-validate</a> validator. I'm doing a POST request which is  working and the api validator doesn't return any errors:</p>
  <pre><code>curl --request POST 'http://localhost:33004/my-app/settings' --data-raw '{&quot;serials&quot;:[&quot;1234&quot;,&quot;2355&quot;]}' -H 'Content-Type: application/json'
  </code></pre>
  <p>In my open-api.yaml I have:</p>
  <pre><code>openapi: '3.0.0'
  servers:
   - url: 'http://{host}/my-app'
     variables:
       host:
       enum:
         - 'localhost'
         ....
  ...
  paths:
      /settings:
        ...
        post:
          tags:
            - 'settings'
          operationId: 'postSettings'
          requestBody:
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    serials:
                      type: array
                      items:
                        type: string
  ...
  </code></pre>
  <p>Then I tried dockerizing my app - created a docker container, and ran it inside with the pm2-runtime. However, when I send the same request to the docker container when the app is running in it, I get <code>error while validating request: request should have required property '.headers'</code> . I have no property '.headers' mentioned in the open-api.yaml file.</p>
  <p>I tried removing the validator middleware, and the request went through just fine. Can you help me understand what is the validator complaining about?</p>
  <p>EDIT:</p>
  <p>I managed to find the error object:</p>
  <pre><code>{
    &quot;data&quot;: [
      {
        &quot;dataPath&quot;: &quot;&quot;,
        &quot;keyword&quot;: &quot;required&quot;,
        &quot;message&quot;: &quot;should have required property '.headers'&quot;,
        &quot;params&quot;: {
          &quot;missingProperty&quot;: &quot;.headers&quot;
        },
        &quot;schemaPath&quot;: &quot;#/required&quot;
      }
    ],
    &quot;name&quot;: &quot;ValidationError&quot;,
    &quot;statusCode&quot;: 400
  }
  </code></pre>
  <p>needless to say I have no required headers property...</p>