Open BsBrabi opened 1 week ago
As we cannot modify the schema file we use, we want to override the retrofit interface name, which is currently by default Client.
Client
With our OpenApi example, the retrofit interface is named ClientClient. We propose a new parameter client_name which overrides the client name.
ClientClient
client_name
OpenApi example:
openapi: 3.0.0 info: title: Test-API version: 1.0.0 tags: - name: Test-API description: Test-API paths: "/ping": post: summary: Processes a ping operationId: processPing responses: '200': description: successful operation
Swagger parser config:
swagger_parser: schema_path: test.yaml output_directory: TestApi language: kotlin client_name: Test
The new parameter would name the retrofit interface TestClient instead of ClientClient:
TestClient
interface TestClient { /// Processes a ping @POST("/ping") suspend fun processPing() }
Use case
As we cannot modify the schema file we use, we want to override the retrofit interface name, which is currently by default
Client
.Proposal
With our OpenApi example, the retrofit interface is named
ClientClient
. We propose a new parameterclient_name
which overrides the client name.OpenApi example:
Swagger parser config:
The new parameter would name the retrofit interface
TestClient
instead ofClientClient
: