mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
- Fixed issue where similar model name and service name would result in filtering out the import
This commit is contained in:
parent
8485931b0a
commit
7e8d66b90a
@ -452,8 +452,8 @@ If you want to generate the Axios based client then you can specify `--client ax
|
||||
|
||||
`openapi --input ./spec.json --output ./dist --client axios`
|
||||
|
||||
The only downside is that this client needs some additional dependencies to work, due to the missing Blob and FormData
|
||||
classes in NodeJS.
|
||||
The only downside is that this client needs some additional dependencies to work (due to the missing Blob and FormData
|
||||
classes in NodeJS).
|
||||
|
||||
```
|
||||
npm install axios --save-dev
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "openapi-typescript-codegen",
|
||||
"version": "0.12.0-beta",
|
||||
"version": "0.12.0",
|
||||
"description": "Library that generates Typescript clients based on the OpenAPI specification.",
|
||||
"author": "Ferdi Koomen",
|
||||
"homepage": "https://github.com/ferdikoomen/openapi-typescript-codegen",
|
||||
|
||||
@ -7,8 +7,5 @@ import { unique } from './unique';
|
||||
* @param service
|
||||
*/
|
||||
export function postProcessServiceImports(service: Service): string[] {
|
||||
return service.imports
|
||||
.filter(unique)
|
||||
.sort(sort)
|
||||
.filter(name => service.name !== name);
|
||||
return service.imports.filter(unique).sort(sort);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user