From ed52fd8ef5fc7872dd9d3d7cd022e8df53ca6655 Mon Sep 17 00:00:00 2001 From: Matthew Messinger Date: Thu, 24 Aug 2023 14:14:11 -0400 Subject: [PATCH] fix: omit `cache` from `NitroFetchOptions` --- playground/pages/petStore.vue | 2 ++ src/runtime/types.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/playground/pages/petStore.vue b/playground/pages/petStore.vue index 68b7a22..d2e6f1b 100644 --- a/playground/pages/petStore.vue +++ b/playground/pages/petStore.vue @@ -9,6 +9,7 @@ const status = ref<'pending' | 'sold'>() const { data: user, execute } = usePetStoreData('user/{username}', { pathParams: { username: 'user1' }, + cache: true, }) async function updateUser() { @@ -20,6 +21,7 @@ async function updateUser() { body: { firstName: 'first name 2', }, + cache: false, }) await execute() } diff --git a/src/runtime/types.ts b/src/runtime/types.ts index 50e955c..ae68e45 100644 --- a/src/runtime/types.ts +++ b/src/runtime/types.ts @@ -55,7 +55,7 @@ export type OpenApiRequestOptions< M extends IgnoreCase = IgnoreCase, > = Omit< NitroFetchOptions>, - 'params' | 'query' | 'headers' | 'method' | 'body' + 'params' | 'query' | 'headers' | 'method' | 'body' | 'cache' > & RequestBody]> & PathParameters]> & QueryParameters]> & Method type MediaTypes = {