Currently, query parameters intended to represent boolean values (e.g., departed=true, dev=true) are treated as strings instead of being parsed as actual booleans. This limitation arises because the backend does not support query parameter transformations to boolean types. For instance, the dev flag is defined as joi.string() instead of joi.boolean() in the validation layer, causing boolean-like inputs to remain as strings.
This behavior leads to inconsistent handling of boolean parameters and increases the risk of errors in processing such values. Supporting actual boolean parsing for query parameters will require transformations in the backend to convert "true"/"false" strings to their respective boolean values.
While this is not a critical issue, it is better addressed as an enhancement task to align with expected behaviors.
Expected Behavior
The API should accept query parameters as proper booleans instead of strings ("true" or "false") for flags like departed and dev. The backend should automatically transform and validate these parameters using joi.boolean().
Current Behavior
Currently, query parameters intended to be booleans (e.g., departed, dev) are handled as strings ("true" or "false"). There is no native boolean support in query parameters, and the transformation to actual booleans is not implemented.
Screenshots
Current validation schema showing the dev flag and profile param handled as a string instead of a boolean.
Reproducibility
[x] This issue is reproducible
[ ] This issue is not reproducible
Steps to Reproduce
Pass a boolean query parameter (departed=true) to the API.
Observe that it is treated as a string instead of a boolean.
Severity/Priority
[ ] Critical
[ ] High
[ ] Medium
[x] Low
Additional Information
The current implementation uses Joi validation but does not enforce joi.boolean() transformations for query parameters.
This enhancement would require backend updates to handle the conversion seamlessly and consistently across all endpoints.
It also aligns with improving type safety and API usability.
Checklist
[x] I have read and followed the project's code of conduct.
[x] I have searched for similar issues before creating this one.
[x] I have provided all the necessary information to understand and reproduce the issue.
[x] I am willing to contribute to the resolution of this issue.
Issue Description
Currently, query parameters intended to represent boolean values (e.g., departed=true, dev=true) are treated as strings instead of being parsed as actual booleans. This limitation arises because the backend does not support query parameter transformations to boolean types. For instance, the dev flag is defined as
joi.string()
instead ofjoi.boolean()
in the validation layer, causing boolean-like inputs to remain as strings.This behavior leads to inconsistent handling of boolean parameters and increases the risk of errors in processing such values. Supporting actual boolean parsing for query parameters will require transformations in the backend to convert "true"/"false" strings to their respective boolean values.
While this is not a critical issue, it is better addressed as an enhancement task to align with expected behaviors.
Expected Behavior
The API should accept query parameters as proper booleans instead of strings ("true" or "false") for flags like
departed
anddev
. The backend should automatically transform and validate these parameters usingjoi.boolean()
.Current Behavior
Currently, query parameters intended to be booleans (e.g., departed, dev) are handled as strings ("true" or "false"). There is no native boolean support in query parameters, and the transformation to actual booleans is not implemented.
Screenshots
Current validation schema showing the dev flag and profile param handled as a string instead of a boolean.
Reproducibility
Steps to Reproduce
Severity/Priority
Additional Information
joi.boolean()
transformations for query parameters.Checklist