You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.