Releases: qualisero/openapi-endpoint
Releases · qualisero/openapi-endpoint
v0.21.1
v0.15.0: Remove QueryClientLike interface
Breaking Change
Removed QueryClientLike interface - use QueryClient directly from @tanstack/vue-query.
Changes
Changed
createApiClient()now acceptsQueryClientfrom@tanstack/vue-queryinstead ofQueryClientLike- Eliminates need for type casts like
as anywhen creating API clients - Internal casts removed from
openapi-query.tsandopenapi-mutation.ts - Updated
EndpointConfig.queryClientto useQueryClienttype
Removed
QueryClientLikeinterface from public API exports- Internal
as QueryClienttype casts
Added
- Comprehensive typing and regression tests to prevent
QueryClientcasting 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)
- Runtime tests in
Migration
- Remove any
as anyoras QueryClienttype casts when callingcreateApiClient - Regenerate API clients to get updated type signatures
- If using
QueryClientLiketype directly, replace withQueryClientfrom@tanstack/vue-query
Example
// Before
const api = createApiClient(axios, queryClient as any)
// After
const api = createApiClient(axios, queryClient)