docusaurus-openapi-docs icon indicating copy to clipboard operation
docusaurus-openapi-docs copied to clipboard

Enum in allof does not show combobox

Open oto313 opened this issue 4 months ago • 0 comments

Describe the bug

I have parameter of GET method in openapi.json file:

 {
            "name": "Status",
            "in": "query",
            "schema": {
              "nullable": true,
              "allOf": [
                {
                  "$ref": "#/components/schemas/TestBatchStatus"
                }
              ]
            }
          }

Here is definition of TestBatchStatus type

 "TestBatchStatus": {
        "type": "string",
        "description": "",
        "x-enumNames": [
          "Enqueued",
          "Running",
          "Completed",
          "Cancelled"
        ],
        "enum": [
          "Enqueued",
          "Running",
          "Completed",
          "Cancelled"
        ]
      },

this renders the following output in mdx api field (decoded from Base64 GZip format)

{
      "name": "Status",
      "in": "query",
      "schema": {
        "nullable": true,
        "allOf": [
          {
            "type": "string",
            "description": "",
            "x-enumNames": ["Enqueued", "Running", "Completed", "Cancelled"],
            "enum": ["Enqueued", "Running", "Completed", "Cancelled"],
            "title": "TestBatchStatus"
          }
        ]
      }
    },

Expected behavior

It should show combobox where you can select enum item.

Current behavior

It shows only textbox

Image

Steps to reproduce

  1. Copy openapi.json to docusarus project

  2. run npm run gen-api-docs all or use following file batches-get-batches.api.mdx.txt

  3. npm run start

  4. Observe the result in get-batches endpoint

Your Environment

  • Version used: "docusaurus-plugin-openapi-docs": "^4.5.1", "docusaurus-theme-openapi-docs": "^4.5.1",
  • Environment name and version: Vivaldi | 7.6.3797.58 (Stable channel) (64-bit) Revision | bcffcee4f057080487ca205ded97fece274ce4bf OS | Windows 11 Version 23H2 (Build 22631.5624)

oto313 avatar Oct 08 '25 12:10 oto313