PaloAltoNetworks / PaloAltoNetworks/docusaurus-openapi-docs

spaceDelimited option is not working

Open
#750 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug roadmap
Dominant language
TypeScript
Stars
1.1k
Forks
315
Avg merge
7d 5h
Merged PRs (30d)
7

Description

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:
          - pin
          - liveness
  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

  • 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by reproducing the spaceDelimited query parameter case from the issue in the generated documentation, then trace the query-parameter serialization entry point; done means the URL uses a space-separated value such as pin liveness instead of pin,liveness.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
api, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.