Skip to content

[0.5.0] - 2025-08-13

Choose a tag to compare

@KeterVM KeterVM released this 12 Aug 20:13
· 7 commits to main since this release

Added

  • Full support for optional request and response schemas in endpoint definitions.
  • Runtime type info flags: hasRequestSchema and hasResponseSchema via extractTypeInfo().

Changed

  • Endpoint method signatures now conditionally require parameters only when a request schema exists.
  • Validation utilities (validateRequest, validateResponse, safeParseRequest, safeParseResponse) gracefully skip validation when schemas are undefined.
  • Type inference helpers (InferRequestType, InferResponseType) now conditionally infer void/unknown when schemas are missing.
  • .infer property on endpoint methods now reflects schema presence (e.g., infer.request is {} or undefined when no request schema).

Fixed

  • Client endpoint detection no longer requires request/response to exist for a valid endpoint.

Docs

  • New examples demonstrating endpoints with optional request/response schemas.
  • Updated schema extraction and description docs to handle optional schemas.

Migration

  • Existing endpoints remain compatible without changes.
  • For endpoints without a request schema, calling methods without arguments is now the canonical form. Passing undefined still works but is unnecessary.
  • If you previously assumed .infer.request always exists, update code to handle the optional shape.