Skip to content

Commit bd52dcb

Browse files
committed
Fixes
1 parent de72535 commit bd52dcb

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@povio/openapi-codegen-cli",
3-
"version": "2.0.8-rc.14",
3+
"version": "2.0.8-rc.15",
44
"keywords": [
55
"codegen",
66
"openapi",

src/generators/generate/generateQueries.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,6 @@ function renderQueryJsDocs({
434434
endpoint: Endpoint;
435435
mode: "query" | "mutation" | "infiniteQuery";
436436
}) {
437-
// TODO(perf-migration): parity mismatch vs legacy HBS around infinite-query JSDoc param lines
438-
// for some endpoints; keep experimental renderer opt-in until this is resolved.
439437
const lines: string[] = ["/** "];
440438

441439
if (mode === "infiniteQuery") {
@@ -669,7 +667,6 @@ function renderQuery({
669667
lines.push(
670668
`export const ${getQueryName(endpoint)} = <TData>(${endpointParams ? `{ ${endpointArgs} }: { ${endpointParams} }, ` : ""}options?: AppQueryOptions<typeof ${importedEndpoint}, TData>${hasAxiosRequestConfig ? `, ${AXIOS_REQUEST_CONFIG_NAME}?: ${AXIOS_REQUEST_CONFIG_TYPE}` : ""}) => {`,
671669
);
672-
lines.push(" const queryConfig = OpenApiQueryConfig.useConfig();");
673670
if (hasAclCheck) {
674671
lines.push(` const { checkAcl } = ${ACL_CHECK_HOOK}();`);
675672
}
@@ -971,6 +968,7 @@ function renderInfiniteQuery({
971968
);
972969
lines.push(" },");
973970
lines.push(" ...options,");
971+
lines.push(" onError: options?.onError ?? queryConfig.onError,");
974972
lines.push(" });");
975973
lines.push("};");
976974
return lines.join("\n");

0 commit comments

Comments
 (0)