enzonotario / vitepress-openapi

Generate VitePress API Docs from OpenAPI specifications
https://vitepress-openapi.vercel.app
MIT License
54 stars 9 forks source link

Boolean query parameters are not displayed in variable list #83

Closed wspeirs closed 1 month ago

wspeirs commented 1 month ago

Current behavior

This is much like #11 If you have a query parameter that is a boolean, it will not be displayed in the Variables list; see image. Screenshot

However, if I change the type to string, it works as expected.

Here is the relevant snipit from the openapi file:

    use_csv:
      name: use_csv
      in: query
      required: true
      schema:
        type: boolean
        default: false
        example: false
      description: 'Uses the [legacy JSON](docs/Data-And-Requests/Legacy-JSON-Responses.md) format if ``false``.'

Desired behavior

I would expect this variable to appear (checkbox maybe?), and allow me to set it.

Reproduction

No response

Steps to reproduce

Just create a OAS with a query parameter of boolean

Logs and Error Messages

No response

Other Information

No response

enzonotario commented 1 month ago

Hi @wspeirs , it's now supported in v0.0.3-alpha.39.

Thanks for reporting!