docusaurus-openapi-docs
docusaurus-openapi-docs copied to clipboard
spaceDelimited option is not working
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
Steps to reproduce
- 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:
- pin
- liveness
- Go to the documentation page and select many values for the
enrollment_amr_valuesparam
Context
I'm working on an oauth2 provider
Your Environment
- Version used:
docusaurus-plugin-openapi-docs:3.0.0-beta-5@docusaurus/core:3.1.1 - Environment name and version: Chrome 122.0.6261.129 , node 20.11.0
- Operating System and version: macOS 14.0
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/
@sserrata Hi:)
I also ran into this problem, my multi-select query params are not being "exploded" as they should.
Is there an ETA on a fix for this? It currently renders many of my routes incorrect when trying to launch from the browser and/or copying a snippet.
Thanks!