Skip to content

W-17655986 Ensure Default Boolean Values Are Loaded from Schema #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

alexpmule
Copy link
Contributor

@alexpmule alexpmule commented Feb 7, 2025

Problem Description

It was detected that the component was not correctly loading the default values defined in the schema specification. As a result, boolean parameters that should have had a predefined value were instead left undefined or incorrectly handled.

Solution

  • Added logic to check if the schema item is a boolean (isBool).
  • If isBool is true, the default value (defaultValue) from the schema is now assigned to result.value.
  • Ensured that this logic does not interfere with explicitly set values.
Impact
  • Default boolean values defined in the schema are now correctly assigned when the component initializes.
  • Prevents cases where boolean query parameters were missing due to uninitialized values.
  • Improves consistency with the API specification and expected behavior.

Testing

  • Verified that boolean parameters correctly inherit default values when no explicit value is set.

Video:

Screen.Recording.2025-02-07.at.10.07.36.PM.mov

@alexpmule alexpmule self-assigned this Feb 8, 2025
@alexpmule alexpmule changed the title W-17655986 Add default value to booleans params W-17655986 Ensure Default Boolean Values Are Loaded from Schema Feb 8, 2025
@alexpmule alexpmule merged commit 1ce1f48 into main Feb 8, 2025
4 checks passed
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.

2 participants