diff --git a/src/Writing/PostmanCollectionWriter.php b/src/Writing/PostmanCollectionWriter.php index 71dade1d..f1f334ab 100644 --- a/src/Writing/PostmanCollectionWriter.php +++ b/src/Writing/PostmanCollectionWriter.php @@ -300,6 +300,16 @@ protected function generateUrlObject(OutputEndpointData $endpointData): array 'disabled' => !$parameterData->required && empty($parameterData->example), ]; } + // If there are no values, add one entry so the parameter shows up in the Postman UI. + if (empty($values)) { + $query[] = [ + 'key' => "{$name}[]", + 'value' => '', + 'description' => strip_tags($parameterData->description), + // Default query params to disabled if they aren't required and have empty values + 'disabled' => true, + ]; + } } else { $query[] = [ 'key' => urlencode($name),