[Golang][client] Allow access to APIClient.cfg.HTTPClient & APIClient.cfg.BasePath
Created by: grokify
Description
There are scenarios where using the raw *HTTP.Client
is desirable. This includes:
- Scenarios where API definition is not currently supported by OpenAPI Generator and a fallback to native
*HTTP.Client
withBasePath
is necessary. Examples include:
- requests with multiple
multipart/form-data
files. Today only one file is supported inAPIClient.prepareRequest
-
multipart/mixed
responses. This is not handled inclient.go
'sdetectContentType
- Scenarios where a third-party library uses a
*HTTP.Client
Providing access to the *HTTP.Client and Configuration.BasePath is useful in these scenarios.
Of course, we should support the API use cases, but sometimes more invasive changes take longer to implement.
openapi-generator version
master
OpenAPI declaration file content or url
-
name: "attachment"
in: "formData"
description: "File to upload"
required: false
type: "array"
items:
type: "file"
Command line used for generation
n/a
Steps to reproduce
n/a
Related issues/PRs
Suggest a fix/enhancement
Either:
- Provide an accessor to
APIClient.cfg
- Provide accessors to
APIClient.cfg.HTTPClient
andAPIClient.cfg.BasePath