Arne Jørgensen
bbe12c1658
[PHP] Use parentSchema instead parent to detect inheritance
...
`parent` in a model is set not only when the model inherits from another
model but also when a parent container exists.
So We will now use `parentSchema` to check whether a parent class
exists. If si we still use `parent` to output the class name because
that has been converted to a proper model name and `parentSchema`
hasn't.
2016-04-27 21:00:58 +02:00
Arne Jørgensen
357cb70795
[PHP] Update PHP dependencies
...
Updated minimum supported PHP version to 5.4.
Updated development requirements to newest versions supporting PHP 5.4.
2016-04-19 21:30:00 +02:00
Kevin Glinski
2beeabb33a
fixing typeos
2016-04-14 08:22:56 -04:00
Arne Jørgensen
65d677c385
Set discriminator property in constructor
...
When using inheritance let the constructor set the discriminator
property to the model name.
This avoids redundant and error prone stuff like:
```
$animal = new \Swagger\Client\Model\Dog();
$animal->setClassName('Dog');
```
2016-04-09 21:05:18 +02:00
wing328
02ac7d93c5
minor php code improvement
2016-04-09 17:59:28 +08:00
wing328
20f1e97df3
fix typo in readme
2016-03-30 20:58:18 +08:00
Arne Jørgensen
0196cdd558
[PHP] Use parent constructor when inheriting
2016-03-28 11:30:27 +02:00
wing328
97e821af6b
update php readme
2016-03-19 16:15:41 +08:00
wing328
95cd8b73a6
update sample code, update test case
2016-03-19 16:03:36 +08:00
Arne Jørgensen
07630c18eb
Add polymorphism in the PHP client API
2016-03-18 00:48:50 +01:00
Arne Jørgensen
64454a16e0
Add inheritance in the PHP client model
2016-03-18 00:48:49 +01:00
wing328
05a8c47a36
update docstring to include default value
2016-03-17 17:43:21 +08:00
wing328
b40603d274
update readme, add getting started
2016-03-17 16:53:09 +08:00
Arne Jørgensen
3823612674
Use PHP's DateTime::ATOM for true ISO-8601 support
...
Currently we use PHP's DateTime::ISO8601 for the date-time properties
but according to
http://php.net/manual/en/class.datetime.php#datetime.constants.iso8601
it is actually not compatible with ISO-8601.
Instead we should use DateTime::ATOM.
2016-03-16 11:18:26 +01:00
wing328
c101c1204e
add php documentation
2016-03-16 16:14:04 +08:00
wing328
259d113d35
Merge branch 'master' of https://github.com/swagger-api/swagger-codegen into php_api_doc
2016-03-16 11:42:27 +08:00
wing328
45bc15257e
Merge pull request #2378 from arnested/feature/php-empty-datetime
...
Handle empty date-time gracefully
2016-03-15 20:45:59 +08:00
Arne Jørgensen
65b78f7ffe
Handle empty date-time gracefully
...
Some API's return an invalid, empty string as a date-time property.
DateTime::__construct() will return the current time for empty input
which is probably not what is meant.
The invalid empty string is probably to be interpreted as a missing
field/value.
Let's handle this graceful.
2016-03-15 06:46:51 +01:00
wing328
be7a49385f
set default user default for ruby, php, python, java
2016-03-15 11:41:47 +08:00
wing328
532d22c5a3
add api documentation to php
2016-03-14 17:25:11 +08:00
wing328
637bdd2f50
add git_push and gitignore to most client generators
2016-03-12 17:35:25 +08:00
wing328
b5c0f17a02
update php to handle object type and add more test case
2016-03-05 14:25:01 +08:00
wing328
a92a9f2a03
Merge pull request #1990 from expectedbehavior/php-raw-string
...
[PHP] Use String instead of Byte Array
2016-03-04 10:57:59 +08:00
Elijah Miller
74536af3b9
Map binary to string in PHP since ByteArray is no longer in use.
2016-03-03 11:01:13 -05:00
Elijah Miller
6698c532e6
Keep PHP binary responses as strings for easier manipulation.
2016-03-03 11:01:13 -05:00
wing328
7e63226ed4
update wording for test file, minor tweats to petstore test
2016-03-03 20:19:37 +08:00
wing328
f27d2534a6
update php readme
2016-02-19 23:37:35 +08:00
wing328
bb59ad95cf
add readme and travis
2016-02-19 22:08:58 +08:00
Christian Kaps
618351c11c
Namespace is missing for SplFileObject reference
2016-01-22 12:17:58 +01:00
wing328
b21c5f08a7
Merge pull request #1921 from wing328/php_generate_test
...
[PHP] generate files for unit testing models and API files
2016-01-20 10:05:20 +08:00
wing328
8927c1dc0f
add test template for php
2016-01-19 14:49:32 +08:00
wing328
dcd2c00fe6
fix empty object serialization issue
2016-01-18 21:42:24 +08:00
wing328
9fd4f39c8c
update tostring to use sanitizeforserialization
2016-01-18 21:27:29 +08:00
wing328
fee8acef97
fix isBinary, CodegenParameter copy, add isBinary to php api client
2016-01-15 11:43:02 +08:00
wing328
f54185c66d
add binary support for php response
2016-01-15 11:43:02 +08:00
wing328
eebf743fad
better filename handling in objectseralizer (php)
2016-01-11 16:16:49 +08:00
wing328
a8f5809370
replace httpHeader with httpHeaders in php object serializer
2016-01-08 14:04:10 +08:00
wing328
61e6cbef66
fix httpHeader (remove s)
2016-01-08 10:37:48 +08:00
wing328
64427a16d1
add more test case for php (array of array, map of map)
2016-01-08 10:34:19 +08:00
Ron
3a2ad9e2e4
Happy new year!
2016-01-06 16:04:16 -08:00
Arne Jørgensen
d71d164843
Accept arrays as arguments to collection parameters.
2016-01-03 22:45:07 +01:00
Ron
9a54371ca9
Swagger Spec -> OpenAPI Spec
2015-12-30 14:52:15 -08:00
Arne Jørgensen
6a45111e10
Handle wildcard response codes correct in PHP
...
Wildcard response codes was handled like all other response codes
resulting in a misleading construction like this:
```
switch ($e->getCode()) {
case 0:
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\Error', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
```
This commit fixes it to use the default fallback of the PHP switch
statement:
```
switch ($e->getCode()) {
default:
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\Error', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
```
2015-12-27 15:17:18 +01:00
wing328
9faf6f4068
add php profiler for petstore, fix empty/null string check
2015-12-10 18:55:28 +08:00
wing328
36dfa15f93
Merge pull request #1680 from wing328/php_default_value
...
[PHP] add default value to PHP model
2015-12-09 15:39:34 +08:00
wing328
4b656c516f
add default value to php model
2015-12-08 15:59:46 +08:00
wing328
340e60002e
more style change for php client
2015-12-07 00:52:30 +08:00
wing328
442f87c19a
minor style change for php functions
2015-12-07 00:42:25 +08:00
wing328
11466570f7
php add test case for withinfo method returnig void
2015-12-07 00:30:17 +08:00
wing328
b282d4fbea
add http_parse_headers, update test case
2015-12-06 23:58:25 +08:00