Skip to content
This repository was archived by the owner on Jul 15, 2026. It is now read-only.
This repository was archived by the owner on Jul 15, 2026. It is now read-only.

Express.js Query Parameter Handling Mismatch with OpenAPI Type Generation #35

Description

@ronenkapelian

When an Express.js route is defined to accept query parameters but is invoked without any, Express.js correctly returns an empty object {}. However, the corresponding OpenAPI specification generates the type for these query parameters as undefined instead of an empty object or a nullable object type. This discrepancy leads to type mismatches and potential errors when using OpenAPI-generated client code or validation tools.

Expected Behavior:

The OpenAPI specification should accurately reflect Express.js's behavior, generating a type that represents an empty object ({}) or a nullable object type for optional query parameters when they are not provided.

Actual Behavior:

The OpenAPI specification generates undefined for optional query parameters when they are not provided, leading to a mismatch with the actual Express.js behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    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