Skip to content

Commit

Permalink
feat: upgrade openapi-typescript-helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed Jun 20, 2024
1 parent 936f243 commit 3d95a88
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"defu": "^6.1.4",
"ofetch": "^1.3.4",
"ohash": "^1.1.3",
"openapi-typescript-helpers": "0.0.8",
"openapi-typescript-helpers": "^0.0.9",
"pathe": "^1.1.2",
"scule": "^1.3.0",
"ufo": "^1.5.3"
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 2 additions & 11 deletions src/runtime/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,14 @@ import type { MaybeRefOrGetter } from 'vue'
import type { NuxtError } from 'nuxt/app'
import type {
ErrorResponse,
FilterKeys,
MediaType,
OperationRequestBodyContent,
ResponseObjectMap,
SuccessResponse,
} from 'openapi-typescript-helpers'

export type FetchResponseData<T> = FilterKeys<
SuccessResponse<ResponseObjectMap<T>>,
MediaType
>
export type FetchResponseError<T> = NuxtError<
FilterKeys<
ErrorResponse<ResponseObjectMap<T>>,
MediaType
>
>
export type FetchResponseData<T> = SuccessResponse<ResponseObjectMap<T>, MediaType>
export type FetchResponseError<T> = NuxtError<ErrorResponse<ResponseObjectMap<T>, MediaType>>

export type MethodOption<M, P> = 'get' extends keyof P ? { method?: M } : { method: M }

Expand Down

0 comments on commit 3d95a88

Please sign in to comment.