Skip to content

Commit ab3e14a

Browse files
authored
Codegen: don't drop the method on a query unless it is 'GET' (#1738)
1 parent 9b4dd19 commit ab3e14a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/rtk-query-codegen-openapi/src/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ export async function generateApi(
353353
factory.createIdentifier('url'),
354354
generatePathExpression(path, pathParameters, rootObject)
355355
),
356-
isQuery
356+
isQuery && verb.toUpperCase() === 'GET'
357357
? undefined
358358
: factory.createPropertyAssignment(
359359
factory.createIdentifier('method'),

0 commit comments

Comments
 (0)