diff --git a/src/schema-routes/schema-routes.js b/src/schema-routes/schema-routes.js index 365f2328..8fd89628 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/expected.ts b/tests/spec/dot-path-params/expected.ts index ee03aac9..72bb654a 100644 --- a/tests/spec/dot-path-params/expected.ts +++ b/tests/spec/dot-path-params/expected.ts @@ -237,7 +237,7 @@ export class Api extends HttpClient diff --git a/tests/spec/dot-path-params/schema.ts b/tests/spec/dot-path-params/schema.ts index ee03aac9..72bb654a 100644 --- a/tests/spec/dot-path-params/schema.ts +++ b/tests/spec/dot-path-params/schema.ts @@ -237,7 +237,7 @@ export class Api extends HttpClient diff --git a/tests/spec/sortTypes-false/expected.ts b/tests/spec/sortTypes-false/expected.ts index 17f43d62..3198d8ad 100644 --- a/tests/spec/sortTypes-false/expected.ts +++ b/tests/spec/sortTypes-false/expected.ts @@ -1993,9 +1993,9 @@ export class Api extends HttpClient extends HttpClient extends HttpClient diff --git a/tests/spec/sortTypes/schema.ts b/tests/spec/sortTypes/schema.ts index 10eb562a..8e9fd137 100644 --- a/tests/spec/sortTypes/schema.ts +++ b/tests/spec/sortTypes/schema.ts @@ -1992,11 +1992,11 @@ export class Api extends HttpClient