diff --git a/src/schema-routes/schema-routes.js b/src/schema-routes/schema-routes.js index 81a73a8f..7d17f623 100644 --- a/src/schema-routes/schema-routes.js +++ b/src/schema-routes/schema-routes.js @@ -10,7 +10,6 @@ const { RESERVED_PATH_ARG_NAMES, RESERVED_QUERY_ARG_NAMES, } = require("../constants.js"); -const { camelCase } = require("lodash"); const CONTENT_KIND = { JSON: "JSON", @@ -543,21 +542,13 @@ class SchemaRoutes { (objectSchema, schemaPart) => { if (!schemaPart || !schemaPart.name) return objectSchema; - let usageName = `${schemaPart.name}`; - - if (usageName.includes(".")) { - usageName = camelCase(usageName); - } - return { ...objectSchema, properties: { ...objectSchema.properties, - [usageName]: { + [schemaPart.name]: { ...schemaPart, ...(schemaPart.schema || {}), - $origName: schemaPart.name, - name: usageName, }, }, }; diff --git a/tests/spec/dot-path-params/__snapshots__/basic.test.ts.snap b/tests/spec/dot-path-params/__snapshots__/basic.test.ts.snap index e4aad5ec..2b7f7622 100644 --- a/tests/spec/dot-path-params/__snapshots__/basic.test.ts.snap +++ b/tests/spec/dot-path-params/__snapshots__/basic.test.ts.snap @@ -240,7 +240,7 @@ export class Api extends HttpClient diff --git a/tests/spec/sortTypes-false/__snapshots__/basic.test.ts.snap b/tests/spec/sortTypes-false/__snapshots__/basic.test.ts.snap index 00daa650..71f94feb 100644 --- a/tests/spec/sortTypes-false/__snapshots__/basic.test.ts.snap +++ b/tests/spec/sortTypes-false/__snapshots__/basic.test.ts.snap @@ -1995,10 +1995,10 @@ export class Api extends HttpClient extends HttpClient