[Golang] Allow retrieving the underlying configuration for APIClient
* Allow retrieving the underlying configuration for APIClient
- Needed for dynamically changing the underlying implementations and
for testing
- Fixes and
* Added go-petstore-withXml changes suggested by circleci
* Add caution note about modifying configuration while live
@@ -169,6 +169,12 @@ func (c *APIClient) ChangeBasePath(path string) {
c.cfg.BasePath = path
}
+// Allow modification of underlying config for alternate implementations and testing
+// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
+func (c *APIClient) GetConfig() *Configuration {
+ return c.cfg
+}
+
// prepareRequest build the request
func (c *APIClient) prepareRequest(
ctx context.Context,
