We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 721f09c commit 62f8d76Copy full SHA for 62f8d76
src/cli.js
@@ -50,9 +50,7 @@ const removePlaceholders = (query) => query.replace(/(?<=:)[pb]\./g, '');
50
51
// "/categories/:id" => "/categories/{id}"
52
// (used only with Golang's go-chi)
53
-const convertPathPlaceholders = (path) => {
54
- return path.replace(/:[^\/]+/g, (placeholder) => '{' + placeholder.slice(1) + '}');
55
-};
+const convertPathPlaceholders = (path) => path.replace(/:([^\/]+)/g, '{$1}');
56
57
const createEndpoints = async (destDir, lang, config) => {
58
const fileName = `routes.${lang}`
0 commit comments