Skip to content

New client proposition #532

Closed
Closed
@lperdereau

Description

@lperdereau

In my case I want to generate a client to interact with cloud-hypervisor.
This means, the generated OA Client has to query a socket and not a common HTTP server. I saw your project is using httpx, with whom it is possible to query a socket when specifying a special transport type doc, but it is currently not possible to specify a specific transport type when generating a client.

We could make a new client generation allowing us to take adventage of httpx's features.
As an example, it could be interesting to generate something like this :

from cloud_hypervisor_api_client import Client as CloudHypervisorClient
transport = httpx.HTTPTransport(uds="/var/run/docker.sock")

client = CloudHypervisorClient(transport=transport, base_url="https://api.example.com")
client.vm.get()
client.vm.list()
client.vm.create(VMObject)
client.vm.delete(VMObject)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions