Implement custom transports and middlewares
mainThe Swift OpenAPI Generator produces code designed for pluggable layers. You can extend the functionality of your generated client or server by implementing types that adopt one of the following protocols provided by the runtime library:
Client-side extensions
ClientTransport: Define how requests are actually sent over the network.ClientMiddleware: Implement logic that intercepts or modifies client requests and responses (e.g., logging, authentication, or retries).
Server-side extensions
ServerTransport: Define how the server receives incoming requests.ServerMiddleware: Implement logic that intercepts or modifies incoming server requests and outgoing responses.