diff --git a/src/SwaggerProvider.DesignTime/OperationCompiler.fs b/src/SwaggerProvider.DesignTime/OperationCompiler.fs index b3ee49aa..ebc37e87 100644 --- a/src/SwaggerProvider.DesignTime/OperationCompiler.fs +++ b/src/SwaggerProvider.DesignTime/OperationCompiler.fs @@ -365,7 +365,10 @@ type OperationCompiler(schema: OpenApiDocument, defCompiler: DefinitionCompiler, |> Seq.map(fun (name, value) -> $"{name}={value}") |> String.concat ";" - ("Cookie", cookieHeader) :: (%headers) + if String.IsNullOrEmpty cookieHeader then + %headers + else + ("Cookie", cookieHeader) :: (%headers) @> (path, queryParams, headers')