TOSIT-IO / tdp-server

REST API for tdp-lib orchestration
2 stars 2 forks source link

Simplify long `operationId` values in the generated OpenApi schema #124

Open sergkudinov opened 1 year ago

sergkudinov commented 1 year ago

When generating OpenApi schema, it generates very long values in operationId parameters. Exampl:

...
"/api/v1/service/{service_id}": {
      "get": {
        "tags": ["services"],
        "summary": "Get Service",
        "description": "Gets service identified by its id",
        "operationId": "get_service_api_v1_service__service_id__get",
...

Eventually, on the tdp-ui side it generates API client methods which are really hard to read and understand (for example, useGetServiceApiV1ServiceServiceIdGetQuery).

Solution

Simplify operationId so that generated API clients have simpler function names. The documentation is here.