Skip to content

Commit 319f8f1

Browse files
committed
fix: remove only first prefix
1 parent 7250032 commit 319f8f1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "saddleback-openapi-typescript-codegen",
3-
"version": "0.28.0",
3+
"version": "0.29.0",
44
"description": "Library that generates Typescript clients based on the OpenAPI specification.",
55
"author": "Ferdi Koomen",
66
"homepage": "https://github.com/ferdikoomen/openapi-typescript-codegen",

src/generateSaddlebackSpec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ export const generateSaddlebackSpec = async (config: Config) => {
5151
}
5252

5353
openApi.components.schemas = newSchemas;
54-
}
5554

56-
mapSwaggerRef(openApi, removeLodashPrefixFromRef);
55+
mapSwaggerRef(openApi, removeLodashPrefixFromRef);
56+
}
5757

5858
const list: OpenApi = openApi;
5959

src/utils/removeLodashPrefix.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export const removeLodashPrefix = (s: string): string => {
2-
return s.split('_').slice(-1)[0];
2+
return s.split('_').slice(1).join('_');
33
};

0 commit comments

Comments
 (0)