acacode / acacode/swagger-typescript-api

Remove options method

Offen
#472 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
4.1k
Forks
436
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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;
}
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.