Skip to content

fix(admin)!: require all create-security body params#44

Merged
johnpmitsch merged 1 commit into
mainfrom
dx-5868-require-all-create-security-body-params-across-sdk-bindings
Jun 24, 2026
Merged

fix(admin)!: require all create-security body params#44
johnpmitsch merged 1 commit into
mainfrom
dx-5868-require-all-create-security-body-params-across-sdk-bindings

Conversation

@johnpmitsch

Copy link
Copy Markdown
Collaborator

Summary

The POST /endpoints/:id/security/* create endpoints reject requests with a 400 when a required body param is missing or blank. This makes those params required in the SDK's typed surface so callers get a compile/type error up front instead of a server-side rejection. It extends the same fix already applied to create_jwt's kid.

Required fields, now non-optional across core + all bindings:

Endpoint Required param
create_referrer referrer
create_ip ip
create_jwt public_key, name (plus kid, already required)
create_request_filter method (array)

create_token is unchanged (the token is server-generated).

This is a breaking change to the typed signatures (fix(admin)!). No client-side empty-string/empty-array validation is added; the server remains the source of truth for blank values.

Per-binding mechanics follow the existing kid precedent:

  • core: Option<String> -> String, Option<Vec<String>> -> Vec<String>
  • python: positional required args (no None defaults); stubs regenerated
  • node: required struct fields; index.d.ts regenerated
  • ruby: hash_require_string / hash_require_vec_string; RBS sigs updated
  • examples and all four per-language READMEs updated

Test plan

  • cargo check (all crates) and just lint pass
  • cargo test -p quicknode-sdk --lib — 211 passed
  • Rust example compiles (--features rust)
  • just python-build, just node-build, just ruby-build all pass; regenerated .pyi and index.d.ts show the params as required

Closes DX-5868

The POST /endpoints/:id/security/* create endpoints reject requests with
a 400 when a required body param is missing or blank. Reflect that in the
typed surface so callers get a compile/type error instead of a server-side
rejection, extending the same change already applied to create_jwt's kid.

- core: CreateReferrerRequest.referrer, CreateIpRequest.ip,
  CreateJwtRequest.public_key, CreateJwtRequest.name are now required
  String; CreateRequestFilterRequest.method is now required Vec<String>
- python: positional required args (no None defaults)
- node: required struct fields (regenerated index.d.ts)
- ruby: hash_require_string / hash_require_vec_string; rbs updated
- examples and all four per-language READMEs updated

create_token is unchanged (token is server-generated).
@johnpmitsch johnpmitsch merged commit 6c45a66 into main Jun 24, 2026
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