Conversation
|
obarcelonap
left a comment
There was a problem hiding this comment.
Check sanitizeRequestEntries because I believe it silently drops boolean values because of the following validation,
aio-commerce-sdk/packages/aio-commerce-lib-config/source/config-utils.ts
Lines 262 to 266 in 146598b
Probably is the moment to try to attend that TODO comment.
There was a problem hiding this comment.
I think we might need to do some further changes around this code
EDIT: Didn't see @obarcelonap comment above, but we are referring to the same
| const BooleanSchema = v.object({ | ||
| ...BaseOptionSchema.entries, | ||
| type: v.literal("boolean", "Expected the type to be 'boolean'"), | ||
| default: v.optional(v.boolean("Expected a boolean for the default value")), |
There was a problem hiding this comment.
Except for the SingleValueList schema type, which requires a mandatory default as we can't infer it at configuration time, all other field types have a default value for the default value (see text fields example). What should we have as default for this? Maybe false?
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: