fix(security)!: require create-security params for quicknode-sdk 0.4 (DX-5869)#45
Merged
johnpmitsch merged 1 commit intoJun 24, 2026
Conversation
…(DX-5869) quicknode-sdk 0.4.0 flips five previously-optional fields to required across the four create-security request structs (referrer, ip, jwt public_key/name, request-filter method). Drop the `Some(...)` wrappers at the call sites in endpoint/security.rs so the CLI compiles against 0.4. `endpoint security jwt add --name` becomes a required flag, matching the API contract: users get a clear arg-parser error instead of a server 400. Empty-but-present values still round-trip to the server's 400. Updates the jwt-add test to pass --name, adds a test asserting --name is required (zero requests reach the mock), and backfills the previously untested create paths for `ip add` and `request-filter create`.
ErikTech
approved these changes
Jun 24, 2026
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.
Summary
Adapts the CLI to quicknode-sdk 0.4.0, which flips five previously-optional fields to required across the four create-security request structs:
CreateReferrerRequestreferrerCreateIpRequestipCreateJwtRequestpublic_key,nameCreateRequestFilterRequestmethodDrops the
Some(...)wrappers at the call sites insrc/commands/endpoint/security.rsso the CLI compiles against 0.4. The CLI already collected these as required types at the arg layer, with one exception:endpoint security jwt add --namewas optional. It's now a required flag, matching the API contract, so users get a clear arg-parser error instead of a server 400. Empty-but-present values still round-trip to the server's 400.Test plan
endpoint_security_jwt_add_with_kidto pass--nameand assert it in the body.endpoint_security_jwt_add_requires_name(omitting--nameexits non-zero, zero requests reach the mock).endpoint security ip addandendpoint security request-filter create, with exactbody_jsonmatchers.cargo test(117 lib + all integration),cargo clippy --all-targets -- -D warnings,cargo fmt --check,cargo build --releaseall pass.qn endpoint security jwt add ep-1 --public-key pk --kid kid-1now errors--name <NAME>required.Closes DX-5869