# Generierung eines Clients

**URL:** <https://community.awork.com/t/generierung-eines-clients/4269>\
**Category:** Developer Forum\
**Tags:** api\
**Created:** [4. Dezember 2025 um 06:09 UTC](https://community.awork.com/t/generierung-eines-clients/4269 "2025-12-04T06:09:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wojciech](https://avatars.discourse-cdn.com/v4/letter/w/f08c70/32.png) [@Wojciech](https://community.awork.com/u/Wojciech)\
**Post date:** [4. Dezember 2025 um 06:09 UTC](https://community.awork.com/t/generierung-eines-clients/4269/1 "2025-12-04T06:09:39Z")

</div>

Hallo,  
ich benutze die OpenAPI-Spezifikation und lasse mir mit **nswag** einen C#-Client generieren.  
Die Einstellung für _“Operation Generation Mode”_ ist auf _MultipleClientsFromOperationId_.  
Ich bekomme dann folgende Methodennamen generiert:

```auto
LocationsAsync(string countryCode)
AbsenceregionsGETAsync(System.Guid absenceRegionId);
FilesDELETE3Async(System.Guid companyId, System.Threading.CancellationToken cancellationToken);

```

Diese Namen sind sehr inkonistent. Ich hätte gerne so etwas wie:

```auto
GetLocationAsync(string countryCode)
GetAbsenceRegionsAsync(System.Guid absenceRegionId); // Klein-Großschreibung
DeleteCompanyFilesAsync(System.Guid companyId, System.Threading.CancellationToken cancellationToken);

```

Durch keine andere Einstellung von “Operation Generation Mode” gelingt mir ein konsistentes Naming. Kann mir Jemand helfen?

Vielen Dank im voraus!

PS: In der Dokumentation steht bei [https://api.awork.com/api/v1/projects/:projectId/timeentries](https://api.awork.com/api/v1/projects/:projectId/timeentries)  
folgendes:

> The projectName parameter defines the main project of which to fetch the time entries.

Ich glaube es müsste projectId statt projectName heissen.

---

<div class="post-metadata">

**Author:** ![Sebastian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/sebastian/32/1305_2.png) [@Sebastian](https://community.awork.com/u/Sebastian)\
**Post date:** [4. Dezember 2025 um 08:58 UTC](https://community.awork.com/t/generierung-eines-clients/4269/2 "2025-12-04T08:58:10Z")

</div>

Hi @Wojciech and welcome to the forum. We have similar issues with the generated clients as they often only take a part of the route or the tags into consideration when generating the method name. What worked for us is to implement a name override, which allowed us to define a custom logic for the names. In nswag this is called `IOperationNameGenerator`. It’s not perfect but allows to create better names than the default generator does.

I will check the incorrect documentation, thank you!

---

<div class="post-metadata">

**Author:** ![Sebastian](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/sebastian/32/1305_2.png) [@Sebastian](https://community.awork.com/u/Sebastian)\
**Post date:** [4. Dezember 2025 um 09:23 UTC](https://community.awork.com/t/generierung-eines-clients/4269/3 "2025-12-04T09:23:38Z")

</div>

I think the problem is that we don’t generate `operation ids` in our OpenAPI docs. I’ll check if we can do this and whether that improves the generated client.

---

<div class="post-metadata">

**Author:** ![Wojciech](https://avatars.discourse-cdn.com/v4/letter/w/f08c70/32.png) [@Wojciech](https://community.awork.com/u/Wojciech)\
**Post date:** [4. Dezember 2025 um 19:06 UTC](https://community.awork.com/t/generierung-eines-clients/4269/4 "2025-12-04T19:06:58Z")

</div>

That would be great!  
Thanks!
