forked from loafle/openapi-generator-original
call setHost using API baspath when no apiclient is provided
This commit is contained in:
parent
e598384d97
commit
6f11092a57
@ -28,9 +28,9 @@ class ApiClient {
|
||||
protected $defaultHeaders = array();
|
||||
|
||||
/**
|
||||
* The host (from basePath)
|
||||
* The host
|
||||
*/
|
||||
protected $host = '{{basePath}}';
|
||||
protected $host = 'http://localhost';
|
||||
|
||||
/*
|
||||
* @var string timeout (second) of the HTTP request, by default set to 0, no timeout
|
||||
|
@ -39,7 +39,7 @@ class {{classname}} {
|
||||
|
||||
function __construct($apiClient = null) {
|
||||
if ($apiClient == null) {
|
||||
$apiClient = new ApiClient();
|
||||
$apiClient = (new ApiClient())->setHost('{{basePath}}');
|
||||
}
|
||||
|
||||
$this->apiClient = $apiClient;
|
||||
|
Loading…
x
Reference in New Issue
Block a user