Skip to content

Releases: qualisero/openapi-endpoint

v0.21.1

15 Mar 14:25
c6dbd3f

Choose a tag to compare

Added

  • responseHeaders shallowRef on QueryReturn and LazyQueryReturn — exposes response headers (e.g. X-Pagination) from the last successful query
  • ShallowRef is now re-exported from the package entry point

v0.15.0: Remove QueryClientLike interface

24 Feb 12:54
36e1117

Choose a tag to compare

Breaking Change

Removed QueryClientLike interface - use QueryClient directly from @tanstack/vue-query.

Changes

Changed

  • createApiClient() now accepts QueryClient from @tanstack/vue-query instead of QueryClientLike
  • Eliminates need for type casts like as any when creating API clients
  • Internal casts removed from openapi-query.ts and openapi-mutation.ts
  • Updated EndpointConfig.queryClient to use QueryClient type

Removed

  • QueryClientLike interface from public API exports
  • Internal as QueryClient type casts

Added

  • Comprehensive typing and regression tests to prevent QueryClient casting issues
    • Runtime tests in tests/bugfix/queryclient-no-cast.test.ts (5 tests)
    • Type compatibility tests in tests/bugfix/queryclient-types.test.ts (3 tests)

Migration

  1. Remove any as any or as QueryClient type casts when calling createApiClient
  2. Regenerate API clients to get updated type signatures
  3. If using QueryClientLike type directly, replace with QueryClient from @tanstack/vue-query

Example

// Before
const api = createApiClient(axios, queryClient as any)

// After
const api = createApiClient(axios, queryClient)