@kubb/plugin-vue-query 5.0.0-beta.75 → 5.0.0-beta.77
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.
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -225,6 +225,17 @@ var Url = class Url {
|
|
|
225
225
|
return path.replace(/\{([^}]+)\}/g, ":$1");
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
228
|
+
* Rewrites OpenAPI placeholder names while keeping the `{...}` braces, so the generated `url`
|
|
229
|
+
* literal aligns with the grouped `path` request option that the runtime client interpolates by
|
|
230
|
+
* key.
|
|
231
|
+
*
|
|
232
|
+
* @example
|
|
233
|
+
* Url.toCasedTemplate('/projects/{project_id}', { casing: 'camelcase' }) // '/projects/{projectId}'
|
|
234
|
+
*/
|
|
235
|
+
static toCasedTemplate(path, { casing } = {}) {
|
|
236
|
+
return path.replace(/\{([^}]+)\}/g, (_, name) => `{${transformParam(name, casing)}}`);
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
228
239
|
* Converts an OpenAPI/Swagger path to a TypeScript template literal string.
|
|
229
240
|
* `prefix` is prepended inside the literal, `replacer` transforms each parameter name,
|
|
230
241
|
* and `casing` controls parameter identifier casing.
|