Skip to content

Commit 7e8d66b

Browse files
committed
- Fixed issue where similar model name and service name would result in filtering out the import
1 parent 8485931 commit 7e8d66b

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,8 @@ If you want to generate the Axios based client then you can specify `--client ax
452452

453453
`openapi --input ./spec.json --output ./dist --client axios`
454454

455-
The only downside is that this client needs some additional dependencies to work, due to the missing Blob and FormData
456-
classes in NodeJS.
455+
The only downside is that this client needs some additional dependencies to work (due to the missing Blob and FormData
456+
classes in NodeJS).
457457

458458
```
459459
npm install axios --save-dev

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openapi-typescript-codegen",
3-
"version": "0.12.0-beta",
3+
"version": "0.12.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/utils/postProcessServiceImports.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,5 @@ import { unique } from './unique';
77
* @param service
88
*/
99
export function postProcessServiceImports(service: Service): string[] {
10-
return service.imports
11-
.filter(unique)
12-
.sort(sort)
13-
.filter(name => service.name !== name);
10+
return service.imports.filter(unique).sort(sort);
1411
}

0 commit comments

Comments
 (0)