react-query-lightbase-codegen 0.1.2 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -326,7 +326,7 @@ const generateRestfulComponent = ({ operation, verb, route, operationIds, parame
326
326
  throw new Error(`"${operationId}" is duplicated in your schema definition!`);
327
327
  }
328
328
  operationIds.push(operationId);
329
- route = route.replace(/\{/g, '${'); // `/pet/{id}` => `/pet/${id}`
329
+ route = route.replace(/\{/g, '${').replace('//', '/'); // `/pet/{id}` => `/pet/${id}`
330
330
  // Remove the last param of the route if we are in the DELETE case
331
331
  let lastParamInTheRoute = null;
332
332
  const componentName = (0, case_1.pascal)(operationId);
@@ -508,7 +508,7 @@ const generateRestfulComponent = ({ operation, verb, route, operationIds, parame
508
508
  use${componentName}Query.queryKey = (): QueryKey => use${componentName}Query.baseKey()
509
509
 
510
510
  use${componentName}Query.updateCache = (
511
- params: undefined,
511
+ _params: undefined,
512
512
  updater: Updater<${componentName}Return | undefined, ${componentName}Return>,
513
513
  options?: SetDataOptions | undefined
514
514
  ) => queryClient.setQueryData<${componentName}Return>(use${componentName}Query.queryKey(), updater, options);
@@ -306,7 +306,7 @@ export const generateRestfulComponent = ({ operation, verb, route, operationIds,
306
306
  throw new Error(`"${operationId}" is duplicated in your schema definition!`);
307
307
  }
308
308
  operationIds.push(operationId);
309
- route = route.replace(/\{/g, '${'); // `/pet/{id}` => `/pet/${id}`
309
+ route = route.replace(/\{/g, '${').replace('//', '/'); // `/pet/{id}` => `/pet/${id}`
310
310
  // Remove the last param of the route if we are in the DELETE case
311
311
  let lastParamInTheRoute = null;
312
312
  const componentName = pascal(operationId);
@@ -488,7 +488,7 @@ export const generateRestfulComponent = ({ operation, verb, route, operationIds,
488
488
  use${componentName}Query.queryKey = (): QueryKey => use${componentName}Query.baseKey()
489
489
 
490
490
  use${componentName}Query.updateCache = (
491
- params: undefined,
491
+ _params: undefined,
492
492
  updater: Updater<${componentName}Return | undefined, ${componentName}Return>,
493
493
  options?: SetDataOptions | undefined
494
494
  ) => queryClient.setQueryData<${componentName}Return>(use${componentName}Query.queryKey(), updater, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-query-lightbase-codegen",
3
- "version": "0.1.2",
3
+ "version": "0.1.5",
4
4
  "license": "MIT",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",