react-query-lightbase-codegen 0.1.3 → 0.1.4

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,8 @@ 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
+ console.log(route);
330
331
  // Remove the last param of the route if we are in the DELETE case
331
332
  let lastParamInTheRoute = null;
332
333
  const componentName = (0, case_1.pascal)(operationId);
@@ -306,7 +306,8 @@ 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
+ console.log(route);
310
311
  // Remove the last param of the route if we are in the DELETE case
311
312
  let lastParamInTheRoute = null;
312
313
  const componentName = pascal(operationId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-query-lightbase-codegen",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "license": "MIT",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",