Skip to content

Conversation

lan-tripla
Copy link

@exoego
Copy link
Owner

exoego commented May 6, 2024

Could you add test for this

@lan-tripla lan-tripla force-pushed the array-query-params branch 2 times, most recently from 62cc737 to c64bbe7 Compare May 6, 2024 05:01
@lan-tripla lan-tripla force-pushed the array-query-params branch from c64bbe7 to 6769f2d Compare May 6, 2024 05:03
@lan-tripla
Copy link
Author

Could you add test for this

updated test, could you check?

@exoego exoego added enhancement New feature or request and removed enhancement New feature or request labels Feb 6, 2025
@exoego
Copy link
Owner

exoego commented Feb 6, 2025

@lan-tripla
Sorry for very late response.

I am skeptic to this change, since it is not mandatory to name array-type query parameters like foo[] in OpenAPI 3.0, IIUC.
Even an OpenAPI 3.0 example from https://editor.swagger.io/ shows the example of name without []:

  /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

The stackoverflow issue you cited appears very specific issue to node-express's implementation for OpenAPI support.

I am fine to accept this change if a new option is added to name query params with [] and the option defaults to disabled for compatibility

@exoego exoego added enhancement New feature or request need-change labels Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request need-change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants