Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 6 additions & 0 deletions samples/client/petstore/go/go-petstore-withXml/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions samples/client/petstore/go/go-petstore/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,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,
Expand Down
6 changes: 6 additions & 0 deletions samples/openapi3/client/petstore/go/go-petstore/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,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,
Expand Down