openapi-to-postman
openapi-to-postman copied to clipboard
Config to disable params by default
It'd be nice if the collection disables params, and certain headers, by default.
Ideally, the initial state of the converted collection should disable any optional things, and enable any required things.
@drjonnicholson Are you talking about any parameters that don't have required: true
being added to the request/collection, but in the disabled state?
Yep. I think the most common use of an endpoint is to have no parameters provided (except for required ones). It would highlight which things are necessary to hit an endpoint and reduce time from import to use (in some cases we had something like 10 parameters to disable, all being optional, plus some optional headers)
@abhijitkane even if they are declared as required: false
the result is the parameter enabled by default in Postman. This would be a very welcome enhacement.
This can be provided behind an option disableOptionalParameters
. When set to true, the collection imported in postman will have all optional parameters(not marked as required: true) in the disabled state.
@shreys7
I tried this option but I dont see any difference in my postman Collection that is generated? Is this option available?
If I debug the "options" in the library, I only get the following:
{
"requestNameSource": "Fallback",
"indentCharacter": "Space",
"collapseFolders": true,
"requestParametersResolution": "Example",
"exampleParametersResolution": "Example",
"folderStrategy": "Tags",
"schemaFaker": true,
"shortValidationErrors": false,
"validationPropertiesToIgnore": [],
"showMissingInSchemaErrors": true,
"detailedBlobValidation": false
}
@thim81 Yes, This option is not available yet. We will be picking this up soon.
@abhijitkane is this feature added if not i could try
Following this case, as I would love to have this feature added when possible. The API I am developing has quite a lot of optional parameters for each endpoint, and having them disabled by default would vastly lighten the burden on consumers.
+1
+1, having to disable them all manually is a lot of effort for big APIs
Hi everyone, we have introduced a new option Disable optional parameters
. When set to ON, it will make sure only required parameters are enabled. You should find it under the Show advanced settings
dropdown menu.
Try it out and feel free to add any feedback on this thread.

Awesome, thanks guys for your work on this! 🎉
@VShingala What's the equivalent option for this library?
@rohit-gohri You can find all documentation regarding option here. For using it in CLI you can useid
field mentioned in there (which is disableOptionalParameters
for this option).
Hi everyone, we have introduced a new option
Disable optional parameters
. When set to ON, it will make sure only required parameters are enabled. You should find it under theShow advanced settings
dropdown menu.Try it out and feel free to add any feedback on this thread.
![]()
Hi! Im not able to see this option anymore (I would say that I was able to see it some time ago...). There has been any update changing this?
Yes, we either need to reopen this issue or create a new one, since that option has apparently been removed.
@kevinv21 @lb-wilson It seems this option has been removed due to some regression with App v10.12. We're working on fixing this, meanwhile, as a workaround, you can use this module via CLI to generate the collection.
You can find the documentation for this here: https://github.com/postmanlabs/openapi-to-postman#usage. Use enableOptionalParameters=true
along with other options as required.