Skip to content

Conversation

@elaine-mattos
Copy link
Contributor

@elaine-mattos elaine-mattos commented Jan 2, 2026

Description

This PR addresses query parameter type handling changes introduced by Express 5. (see #1340)

Express 5 introduced a breaking change where req.query is now a read-only getter instead of a writable property. This means that custom middleware can no longer reassign req.query to convert types, causing schema validation to fail when expecting any type but a string.

The solution uses Ajv's built-in coerceTypes feature to handle type conversion during schema validation.

Changes made

1 - Enabled Ajv type coercion: allows for automatic type conversion of query string values;
2 - Removed custom querystring middleware and its tests: no longer needed since Ajv handles type coercion;

@elaine-mattos elaine-mattos changed the title feat: Add Ajv type coercion for Express 5 query parameter compatibility fix: Add Ajv type coercion for Express 5 query parameter compatibility Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant