christianhelle / httpgenerator

Generate .http files from OpenAPI (Swagger) specifications
MIT License
86 stars 6 forks source link

Query string parameters are not included in the request URL #109

Closed christianhelle closed 4 months ago

christianhelle commented 4 months ago

Describe the bug Query string parameters are not included in the request URL

Support Key: ptbddgt

OpenAPI Specifications

  /pet/findByStatus:
    get:
      tags:
        - pet
      summary: Finds Pets by status
      description: Multiple status values can be provided with comma separated strings
      operationId: findPetsByStatus
      parameters:
        - name: status
          in: query
          description: Status values that need to be considered for filter
          required: false
          explode: true
          schema:
            type: string
            default: available
            enum:
              - available
              - pending
              - sold

Expected output

@contentType = application/json

######################################################################################
### Request: GET /pet/findByStatus
### Summary: Finds Pets by status
### Description: Multiple status values can be provided with comma separated strings
######################################################################################

### Query Parameter: Status values that need to be considered for filter
@status = str

GET /api/v3/pet/findByStatus?status={{status}}
Content-Type: {{contentType}}

Actual output


######################################################################################
### Request: GET /pet/findByStatus
### Summary: Finds Pets by status
### Description: Multiple status values can be provided with comma separated strings
######################################################################################

### Query Parameter: Status values that need to be considered for filter
@status = str

GET /api/v3/pet/findByStatus
Content-Type: {{contentType}}