Repository navigation
fix(product): allow explicit false for generated boolean fields (from #83) - #94
Merged
Merged
Conversation
Keep bare `--flag` spelling for true while accepting explicit `--flag true`, `--flag false`, `--flag=true`, and `--flag=false` on generated scalar boolean fields. Omitted optional booleans remain absent from the JSON body, preserving server defaults. Co-authored-by: Divyam Talwar <[email protected]> Co-authored-by: Hanzo Dev <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebases and lands fork PR #83 onto current
main(resolving formatting/line drift insrc/commands/product/) with full Rust test and clippy verification.Changes
Ty::Boolarguments infield_argfromArgAction::SetTruetoArgAction::Setwithnum_args(0..=1),default_missing_value("true"), andclap::value_parser!(bool).m.get_one::<bool>(f.id).copied().map(Value::Bool)so omitted flags stay absent while explicitfalseis sent to update endpoints.--enabled,--enabled --name ...,--enabled true/false, and--enabled=true/false.Verification
cargo test --locked commands::product::: 49 passed, 0 failed (includingevery_coordinate_parses_and_dispatches_to_its_own_route)cargo clippy --locked --all-targets -- -D warnings: 0 warningsrustfmt --edition 2021 --check: cleanSupersedes #83 (with full attribution to @DivyamTalwar).