Skip to content

Commit 739e5b5

Browse files
authored
add options to Method type in generateApiClient function (#56)
* add options to `Method` type in `generateApiClient` function * chore: add changeset
1 parent 146f110 commit 739e5b5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/tall-bees-impress.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"typed-openapi": minor
3+
---
4+
5+
Add options to `Method` type in `generateApiClient` function as fix for
6+
[#55](https://github.com/astahmer/typed-openapi/issues/55)

packages/typed-openapi/src/generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ export type EndpointParameters = {
234234
};
235235
236236
export type MutationMethod = "post" | "put" | "patch" | "delete";
237-
export type Method = "get" | "head" | MutationMethod;
237+
export type Method = "get" | "head" | "options" | MutationMethod;
238238
239239
type RequestFormat = "json" | "form-data" | "form-url" | "binary" | "text";
240240

0 commit comments

Comments
 (0)