acacode / acacode/swagger-typescript-api

Remove options method

Open
#472 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.1k
Forks
436
PR merge metrics
No merged PRs in 30d

Description

Hi, im trying to clean the generated client, for example, i want to remove the options method
```
Module "api" already has method "optionsApi()"
⚠️ This method has been renamed to "optionsApi105()" to solve conflict names.
⚠️ Module "api" already has method "optionsApi()"
⚠️ This method has been renamed to "optionsApi106()" to solve conflict names.
⚠️ Module "api" already has method "optionsApi()"
⚠️ This method has been renamed to "optionsApi107()" to solve conflict names.
⚠️ Module "api" already has method "optionsApi()"
⚠️ This method has been renamed to "optionsApi108()" to solve conflict names.
⚠️ Module "api" already has method "optionsApi()"
⚠️ This method has been renamed to "optionsApi109()" to solve conflict names.
⚠️ Module "api" already has method "optionsApi()"
⚠️ This method has been renamed to "optionsApi110()" to solve conflict names.
⚠️ Module "api" already has method "optionsApi()"
⚠️ This method has been renamed to "optionsApi111()" to solve conflict names.
```
i tried using the hooks but still didnt find a way to do that
```
onInit: (configuration) => {
const { paths } = configuration.swaggerSchema;
for (const path in paths) {
if (Object.hasOwnProperty.call(paths, path)) {
const { options, ...rest } = paths[path];
if (options) { configuration.swaggerSchema.paths[path] = rest; }
}
}

return configuration;
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.