From 98ad9a13ca29d01941f9c1477b2f6f0c5d5d0ee5 Mon Sep 17 00:00:00 2001 From: Anbraten <6918444+anbraten@users.noreply.github.com> Date: Mon, 3 Jun 2024 17:16:47 +0200 Subject: [PATCH 1/2] fix: handle body data with dashes --- src/schema-routes/schema-routes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/schema-routes/schema-routes.js b/src/schema-routes/schema-routes.js index 81a73a8f..a9a96007 100644 --- a/src/schema-routes/schema-routes.js +++ b/src/schema-routes/schema-routes.js @@ -641,9 +641,9 @@ class SchemaRoutes { return { paramName: - requestBodyName || + camelCase(requestBodyName || (requestBody && requestBody.name) || - DEFAULT_BODY_ARG_NAME, + DEFAULT_BODY_ARG_NAME), contentTypes, contentKind, schema, From 1f2a6554cec5a9a85ee6acd1fc70ca39aec4416d Mon Sep 17 00:00:00 2001 From: Anbraten <6918444+anbraten@users.noreply.github.com> Date: Mon, 3 Jun 2024 17:19:04 +0200 Subject: [PATCH 2/2] fix format --- src/schema-routes/schema-routes.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/schema-routes/schema-routes.js b/src/schema-routes/schema-routes.js index a9a96007..059837ef 100644 --- a/src/schema-routes/schema-routes.js +++ b/src/schema-routes/schema-routes.js @@ -640,10 +640,11 @@ class SchemaRoutes { } return { - paramName: - camelCase(requestBodyName || - (requestBody && requestBody.name) || - DEFAULT_BODY_ARG_NAME), + paramName: camelCase( + requestBodyName || + (requestBody && requestBody.name) || + DEFAULT_BODY_ARG_NAME, + ), contentTypes, contentKind, schema,