mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
14 lines
548 B
TypeScript
14 lines
548 B
TypeScript
import type { Service } from '../client/interfaces/Service';
|
|
import { postProcessServiceImports } from './postProcessServiceImports';
|
|
import { postProcessServiceOperations } from './postProcessServiceOperations';
|
|
|
|
export function postProcessService(service: Service): Service {
|
|
const clone = { ...service };
|
|
clone.operations = postProcessServiceOperations(clone);
|
|
clone.operations.forEach(operation => {
|
|
clone.imports.push(...operation.imports);
|
|
});
|
|
clone.imports = postProcessServiceImports(clone);
|
|
return clone;
|
|
}
|