Skip to content

Fix query parameters not added to URL when path parameters exist#300

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-bugs-in-code-base
Draft

Fix query parameters not added to URL when path parameters exist#300
Copilot wants to merge 3 commits intomainfrom
copilot/fix-bugs-in-code-base

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

Description:

Fixed critical bug where query parameters were defined but never appended to URLs when path parameters were present. Also addressed minor issues: resource leak, dead code, and incomplete attribute.

Bug fixes:

  • Query params missing from URL: Logic incorrectly treated path and query params as mutually exclusive. Endpoints like POST /pet/{petId} with query params name and status would generate URLs missing the query string entirely.
  • HttpClientHandler leak: Added disposeHandler: true to ensure proper disposal
  • Dead code: Removed unused IsYaml() method in OpenApiDocumentFactory.cs
  • AllowedValues incomplete: Added OneFilePerTag to match description and actual functionality

Example OpenAPI Specifications:

paths:
  '/pet/{petId}':
    post:
      summary: Updates a pet in the store with form data
      parameters:
        - name: petId
          in: path
          required: true
          type: integer
        - name: name
          in: query
          type: string
        - name: status
          in: query
          type: string

Example generated .http file contents

Before (bug):

POST {{baseUrl}}/pet/{{petId}}
Content-Type: {{contentType}}

After (fixed):

POST {{baseUrl}}/pet/{{petId}}?name={{name}}&status={{status}}
Content-Type: {{contentType}}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • demo.netbox.dev
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.deps.json /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/testhost.dll --port 35783 --endpoint 127.0.0.1:035783 --role client --parentprocessid 4061 --telemetryoptedin false (dns block)
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.deps.json /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/testhost.dll --port 38503 --endpoint 127.0.0.1:038503 --role client --parentprocessid 5051 --telemetryoptedin false (dns block)
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.deps.json /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/testhost.dll --port 39295 --endpoint 127.0.0.1:039295 --role client --parentprocessid 7011 --telemetryoptedin false (dns block)
  • developers.intellihr.io
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.deps.json /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/testhost.dll --port 35783 --endpoint 127.0.0.1:035783 --role client --parentprocessid 4061 --telemetryoptedin false (dns block)
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.deps.json /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/testhost.dll --port 38503 --endpoint 127.0.0.1:038503 --role client --parentprocessid 5051 --telemetryoptedin false (dns block)
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.deps.json /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/testhost.dll --port 39295 --endpoint 127.0.0.1:039295 --role client --parentprocessid 7011 --telemetryoptedin false (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Find and resolve bugs and issue in the current code base. Be as thorough as possible


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…ameters exist, fix HttpClientHandler resource leak, remove unused IsYaml method, add missing OneFilePerTag to AllowedValues

Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com>
using var httpMessageHandler = new HttpClientHandler
{
AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => true

Check failure

Code scanning / SonarCloud

Server certificates should be verified during SSL/TLS connections High

Enable server certificate validation on this SSL/TLS connection See more on SonarQube Cloud
Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com>
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
D Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copilot AI changed the title [WIP] Fix bugs and issues in the current code base Fix query parameters not added to URL when path parameters exist Jan 30, 2026
Copilot AI requested a review from christianhelle January 30, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants