# When importing OpenApi spec in postman Optional parameters are by default enabled

**URL:** <https://community.postman.com/t/when-importing-openapi-spec-in-postman-optional-parameters-are-by-default-enabled/49526>\
**Category:** Help Hub\
**Tags:** collections, openapi, openapi-to-postmanv2\
**Created:** [July 13, 2023, 2:39pm UTC](https://community.postman.com/t/when-importing-openapi-spec-in-postman-optional-parameters-are-by-default-enabled/49526 "2023-07-13T14:39:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![telecoms-technolog10](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@telecoms-technolog10](https://community.postman.com/u/telecoms-technolog10)\
**Post date:** [July 13, 2023, 2:39pm UTC](https://community.postman.com/t/when-importing-openapi-spec-in-postman-optional-parameters-are-by-default-enabled/49526/1 "2023-07-13T14:39:57Z")

</div>

**My question:**  
I imported an OpenAPI spec via the postman directly and in that collection, all header parameters are by default enabled. In the OpenAPI spec, I have clearly defined that the relevant parameters are optional.

**Details (like screenshots):**

_Headers defined as optional in OpenApi spec,_

```auto
"parameters": [
          {
            "name": "If-Match",
            "in": "header",
            "description": "E-Tag",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Prefer",
            "in": "header",
            "description": "Prefer: return=minimal",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "return=minimal"
                ]
              }
            }
          }
        ]

```

Corresponding output when importing the spec in Postman,

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/b/a/ba33db2c275e819ca105cdf9e3516fe7aebeb185.png)

_Expected result,_

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/0/e/0ee3d564632bebe247e766f29d0add03bc0d0e46.png)

**I’ve already tried:**

I tried converting the same OpenApi spec through openapi-to-postmanv2 tool. And then after importing the collection, I was able to see the same unexpected result as mentioned above.

I went through the collection.json which was the output by the openapi-to-postmanv2 tool and I could observe the following highlighted property which must be _true_ in order to disable the optional header parameters.

.

![image](https://us1.discourse-cdn.com/getpostman/original/3X/a/d/ad4af6ba164c30d0af2b22b30e05f221568eec52.png)
