PaloAltoNetworks / docusaurus-openapi-docs

🦝 OpenAPI plugin for generating API reference docs in Docusaurus v2.
https://docusaurus-openapi.tryingpan.dev
MIT License
587 stars 199 forks source link

spaceDelimited option is not working #750

Open jerearaujo03 opened 3 months ago

jerearaujo03 commented 3 months ago

Describe the bug

The query param serialization with spaceDelimited option is not working as expected

Expected behavior

The query param values in the URL should be separated by spaces -> v2/authorize/?enrollment_amr_values=pin liveness

Current behavior

The query param values in the URL are separated by comma (',') ->v2/authorize/?enrollment_amr_values=pin,liveness

image

Steps to reproduce

  1. Define this param for a GET request
    
    - name: enrollment_amr_values
      in: query
      description: Specifies the methods to be used for the authorization
      schema:
        $ref: '#/components/schemas/enrollment_amr_values'
      style: spaceDelimited
      explode: false
      examples:
        Pin:
          value: pin
        Liveness:
          value: liveness
        Pin and Liveness:
          value: pin liveness
      required: false

...

components: schemas: enrollment_amr_values: type: array items: type: string uniqueItems: true default: [pin] enum:

  1. Go to the documentation page and select many values for the enrollment_amr_values param

image

Context

I'm working on an oauth2 provider

Your Environment

sserrata commented 4 days ago

Hi @jerearaujo03, thanks for reporting this issue. I'll include it in our roadmap - the goal would be to provide complete coverage of all OpenAPI parameter serialization options as specified here: https://swagger.io/docs/specification/serialization/