Skip to content

Commit

Permalink
fix: omit cache from NitroFetchOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmess1221 committed Aug 24, 2023
1 parent 5641d8f commit ed52fd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions playground/pages/petStore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const status = ref<'pending' | 'sold'>()
const { data: user, execute } = usePetStoreData('user/{username}', {
pathParams: { username: 'user1' },
cache: true,
})
async function updateUser() {
Expand All @@ -20,6 +21,7 @@ async function updateUser() {
body: {
firstName: 'first name 2',
},
cache: false,
})
await execute()
}
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export type OpenApiRequestOptions<
M extends IgnoreCase<keyof P & HttpMethod> = IgnoreCase<keyof P & 'get'>,
> = Omit<
NitroFetchOptions<any, Lowercase<M>>,
'params' | 'query' | 'headers' | 'method' | 'body'
'params' | 'query' | 'headers' | 'method' | 'body' | 'cache'
> & RequestBody<P[Lowercase<M>]> & PathParameters<P[Lowercase<M>]> & QueryParameters<P[Lowercase<M>]> & Method<M>

type MediaTypes<T, Status extends keyof any> = {
Expand Down

0 comments on commit ed52fd8

Please sign in to comment.