diff --git a/.changeset/rude-impalas-unite.md b/.changeset/rude-impalas-unite.md new file mode 100644 index 000000000..741b58d60 --- /dev/null +++ b/.changeset/rude-impalas-unite.md @@ -0,0 +1,5 @@ +--- +"swagger-typescript-api": patch +--- + +Remove unnecessary camel case conversion for query params. diff --git a/src/schema-routes/schema-routes.ts b/src/schema-routes/schema-routes.ts index 9ad602542..d53b72f22 100644 --- a/src/schema-routes/schema-routes.ts +++ b/src/schema-routes/schema-routes.ts @@ -512,21 +512,13 @@ export class SchemaRoutes { (objectSchema, schemaPart) => { if (!schemaPart || !schemaPart.name) return objectSchema; - let usageName = `${schemaPart.name}`; - - if (usageName.includes(".")) { - usageName = lodash.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 23585efa4..6d14845d2 100644 --- a/tests/spec/dot-path-params/__snapshots__/basic.test.ts.snap +++ b/tests/spec/dot-path-params/__snapshots__/basic.test.ts.snap @@ -241,7 +241,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 9c3300667..9ea980bae 100644 --- a/tests/spec/sortTypes-false/__snapshots__/basic.test.ts.snap +++ b/tests/spec/sortTypes-false/__snapshots__/basic.test.ts.snap @@ -1997,9 +1997,9 @@ export class Api extends HttpClient extends HttpClient