-
Notifications
You must be signed in to change notification settings - Fork 6k
Open
Milestone
Description
Description
Problem
swagger: "2.0"
info:
title: TEST API
version: ""
host: aaa.example.com
basePath: /private
$c = new Swagger\Client\Configuration();
$c->getHost();// string "http://aaa.example.com/private"
// `/private` WILL BE LOST...
$c->setHost('http://bbb.example.com');
$c->getHost();// string "http://bbb.example.com"
$api = new Swagger\Client\Api\TestApi(null, $c);
$api->getXXX();
// 404 Not Found
I'd like to improve Configuration
as follows.
- new methods
Configuration::setBasePath()
Configuration::getBasePath()
Configuration::getBaseUrl()
/*
* setter
*/
// Only the `host` is changed.
$c->setHost('http://bbb.example.com');
// If we want to change the `basePath`, like this.
$c->setBasePath('/public');
/*
* getter
*/
$c->getHost();
// string "http://bbb.example.com"
$c->getBasePath();
// string "/public"
$c->getBaseUrl();
// string "http://bbb.example.com/public"
Swagger-codegen version
2.3.0
Please let me know what you think.
Thank you.