Skip to content

can't access property "push", paramsArray is undefined #1359

@Paolo7297

Description

@Paolo7297

Describe the bug

Hello, I was testing your latest canary build (0.0.0-1130, as it includes #1231 ), but I'm getting another error.
When I select a specific operation in the browser, i get:

This page crashed.

can't access property "push", paramsArray is undefined

The OpenAPI operation which triggers the issue is:

The OpenAPI snippet
        "/invoice-extract": {
            "get": {
                "operationId": "api_invoice-extract_get_collection",
                "tags": [
                    "InvoiceExtract"
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                },
                "summary": "Retrieves the collection of InvoiceExtract resources.",
                "description": "Retrieves the collection of InvoiceExtract resources.",
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "description": "The collection page number",
                        "required": false,
                        "deprecated": false,
                        "allowEmptyValue": true,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        },
                        "style": "form",
                        "explode": false,
                        "allowReserved": false
                    }
                ],
                "deprecated": false
            },
            "post": {
                "operationId": "invoice_extract_create",
                "tags": [
                    "InvoiceExtract"
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "400": {
                        "description": "Invalid input"
                    },
                    "201": {
                        "description": "InvoiceExtract resource created",
                        "content": {
                            "application/ld+json": {
                                "schema": {
                                    "$ref": "#/components/schemas/InvoiceExtract.InvoiceExtractOutput.jsonld"
                                }
                            },
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/InvoiceExtract.InvoiceExtractOutput"
                                }
                            }
                        },
                        "links": {}
                    },
                    "422": {
                        "description": "Unprocessable entity"
                    }
                },
                "summary": "Extract information from a PDF invoice",
                "description": "Upload a PDF invoice and get back the invoice converted to XML.\n\nThe received XML may not contain all the necessary information and the filled data must be validated before sending to the tax authority.",
                "parameters": [
                    {
                        "name": "file",
                        "in": "formData",
                        "description": "The PDF invoice to upload",
                        "required": true,
                        "deprecated": false,
                        "allowEmptyValue": false,
                        "schema": {
                            "type": "string",
                            "format": "binary"
                        },
                        "explode": false,
                        "allowReserved": false
                    },
                    {
                        "name": "conversion_configuration",
                        "in": "formData",
                        "description": "Conversion configuration",
                        "required": false,
                        "deprecated": false,
                        "allowEmptyValue": false,
                        "schema": {
                            "type": "string",
                            "format": "json"
                        },
                        "explode": false,
                        "allowReserved": false,
                        "examples": {
                            "example": {
                                "default_vat_rate": {
                                    "type": "number",
                                    "default": 22
                                },
                                "convert_amounts": {
                                    "type": "boolean",
                                    "default": true
                                }
                            }
                        }
                    }
                ],
                "requestBody": {
                    "description": "The new InvoiceExtract resource",
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/InvoiceExtract.InvoiceExtractInput"
                            }
                        }
                    },
                    "required": true
                },
                "deprecated": false
            }
        },

I'm attaching the generated page with the issue.

invoice-extract-create.zip

Expected behavior

Shows the operation like the others

Current behavior

Gives me the error reported above

Steps to reproduce

  1. Configure this plugin to use this OpenAPI spec
  2. Generate pages
  3. Start docusaurus
  4. Open the generated page /docs/api/gov-it/invoice-extract-create
  5. Page crashes

Context

I'm trying to add this openapi to my docusaurus, I already had issues so after the fix you published ( #1308 ) I tried the canary release to test if the solution provided worked for me. It did, but now another issue appeared, so I'm stuck again. I don't know if it's a known issue or maybe you know some workarounds.

Your Environment

  • Version used: Docusaurus 3.9.2 | docusaurus-openapi-docs 0.0.0-1130
  • Environment name and version: Node v24.8.0, zen-browser 1.19.5b
  • Operating System and version (desktop or mobile): MacOS
  • Link to your project: We don't have one yet

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions