wing328
0a67696de8
Merge branch 'empty_classes' of https://github.com/bbdouglas/swagger-codegen into bbdouglas-empty_classes
2017-05-16 17:51:42 +08:00
Sergey Novikov
6685f18e5f
Reuse allowed values ( #5435 )
2017-04-22 00:30:52 +08:00
Benjamin Douglas
9058099e5b
Add alias type definitions for Java
...
When a spec defines a Model at the top level that is a non-aggretate type (such
as string, number or boolean), it essentially represents an alias for the simple
type. For example, the following spec snippet creates an alias of the boolean
type that for all intents and purposes acts just like a regular boolean.
definitions:
JustABoolean:
type: boolean
This can be modeled in some languages through built-in mechanisms, such as
typedefs in C++. Java, however, just not have a clean way of representing this.
This change introduces an internal mechanism for representing aliases. It
maintains a map in DefaultCodegen that tracks these types of definitions, and
wherever it sees the "JustABoolean" type in the spec, it generates code that
uses the built-in "Boolean" instead.
This functionality currenlty only applies to Java, but could be extended to
other languages later.
The change adds a few examples of this to the fake endpoint spec for testing,
which means all of the samples change as well.
2017-04-17 12:58:31 -07:00
baartosz
d21e156071
[PHP] error when deserializing enums #4032 ( #4886 )
...
* fixed enum template; added enum handling to ObjectSerializer
* regenerated templates
* improved InvalidArgumentException message
* regenerated sample client
* added value check of OuterEnum during sanitization
* regenerated samples
2017-03-08 19:08:42 +08:00
Ainun Nazieb
05eea2436c
[PHP] Validate parent's model first, if any ( #4659 )
...
* if model has parent, valid() & listInvalidProperties() will check the parents' first
* Run the ./bin/security/php-petstore.sh
2017-01-26 22:49:38 +08:00
Tony Tam
3476e83a36
fix for allowable values, #4645 ( #4646 )
...
* fix for allowable values, #4645
* fixed string values
* rebuilt for #4645
2017-01-25 12:11:49 +08:00
wing328
8e71dfb512
Fix model prefix/suffix with incorrect camelization ( #4621 )
...
* fix camelized name with suffix/prefix in java client
* fix php model name with prefix, suffix
* fix indentation in ts abstrat generator
* replace tab with spaces in ts abstract generator
2017-01-23 01:29:11 +08:00
Pete Holiday
2e4de0ca1e
Remove unnecessary call to setHost() in the constructor ( #4525 )
...
* Remove unnecessary call to setHost() in the constructor
The default host will be automatically set on the client by the ApiClient constructor.
* Updated PHP API Classes corresponding to template updates in #4525 .
* Additional changes generated by the petstore update unrelated to #4525 , but seem to have not been included yet.
* Add test to prevent regressions of #4525
2017-01-12 16:17:17 +08:00
Kevin Locke
df0c54d043
Support the empty string as an enumeration value ( #4450 )
...
When a string enumeration has the empty string as one of its available
values, the generated code for many languages is invalid because the
empty string can not be used as an identifier. As with numbers and
symbols, provide a mapping to an English name which can be used as a
replacement. In this case, "empty" for the empty string/empty value.
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2017-01-06 19:30:47 +08:00
wing328
7fd895b37d
fix isPrimitiveType for file
2016-12-18 19:02:26 +08:00
wing328
8153f0e89b
Fix test spec issue ( #4334 )
...
* fix issue with swagger spec (number => integer)
* remove space from spec
2016-12-07 16:46:41 +08:00
Robert Biehl
1ea9865a44
[PHP] Fix discriminator handling ( #4246 )
...
* [PHP] Fix discriminator handling
* [PHP] Fix discriminator handling (Update examples)
2016-11-25 16:12:41 +08:00
wing328
90512e6326
Remove Apache license from API client generators ( #4197 )
...
* remove php apache license
* remove apache license from C#
* remove apache license in objc code
* remove license from swift 3 code
* remove apache license from perl code
* remove license from scala code
* remove license from ts, go, android, cpp, scala
* remove license from java api client
* restore clojure petstore files
* remove license from travis file
* clean up apache-related terms in php, ruby, python mustache tempaltes
* remove license from JS API cilent
2016-11-16 21:44:49 +08:00
Dalibor Karlović
70fa2fb78e
[PHP] Better PSR2 compatibility ( #3863 )
...
* feature(php-cs-fixer) add php-cs-fixer support
* feature(php-cs-fixer) tweak Mustache templates to fit PSR2
* feature(php-cs-fixer) bin/php-petstore.sh output
2016-09-27 08:23:44 +08:00
Xavi Aparicio
31a3436a8e
Added !is_null condition in setter conditions for non-required properties
2016-09-14 13:41:05 +02:00
Ville Skyttä
735390f633
[Python, Ruby, PHP] Validate min/maxItems ( #3734 )
...
* python: Validate min/maxItems
* ruby: Validate min/maxItems
* lumen: Validate min/maxItems
* php: Validate min/maxItems
2016-09-08 17:33:59 +08:00
Ville Skyttä
91b7494e3e
Spelling fixes
2016-09-06 14:45:04 +03:00
Ville Skyttä
2af822677f
php: Fix syntax error when pattern contains a single quote
2016-09-02 10:42:08 +03:00
Ville Skyttä
e52a8e34cb
Spelling fixes
2016-09-01 17:39:30 +03:00
Arne Jørgensen
4008054209
[PHP] Regenerate petstore samples
2016-08-05 11:25:49 +02:00
wing328
1fde95f997
fix java okhttp (array of enum property)
2016-08-03 01:36:34 +08:00
wing328
25fa3e86f9
add enumName to store the enum prefix
2016-08-03 01:36:13 +08:00
wing328
0b8acb5b0c
set allowablevalues of inner enum's allowablevalues
2016-08-03 01:35:58 +08:00
Arne Jørgensen
aacc235665
[PHP] Regenerate petstore samples
2016-08-01 11:48:52 +02:00
Arne Jørgensen
0f8e1f8105
[PHP] Client properties validation #3457 ( #3480 )
...
* [PHP] Avoid validation of unset, optional parameters
Fixes #3457 .
* [PHP] Regenerate petstore samples
2016-08-01 15:24:47 +08:00
wing328
9489f7d3eb
clear import mapping for gnereators that do not use it
2016-07-26 14:40:29 +08:00
Arne Jørgensen
a4ec29000a
[PHP] Regenerate petstore samples
2016-06-30 07:12:28 +02:00
wing328
41636ae149
revert petstore-with-fake-endpoints-models-for-testing.yaml
2016-06-28 14:38:50 +08:00
wing328
ebd6ffaa4c
better handle of single quote to avoid code injectio in php
2016-06-28 00:54:06 +08:00
wing328
1638adb79e
avoid code injection in php api client
2016-06-27 21:51:27 +08:00
wing328
74239c422b
add enum class support, merged test cases for php
2016-06-26 17:41:29 +08:00
Arne Jørgensen
614e98a404
[PHP] Regenerate petstore sample
2016-06-13 23:22:31 +02:00
Arne Jørgensen
e41019fb2b
[PHP] Regenerate petstore sample
2016-05-26 00:13:45 +02:00
Mikolaj Przybysz
6aa821d76d
Rebuild php petstore sample client
2016-05-24 15:03:25 +02:00
Arne Jørgensen
1f02fd281f
[PHP] Regenerate petstore sample
2016-05-14 13:45:41 +02:00
wing328
0b7d0c34af
add debug switch to print out downloaded file info
2016-05-14 17:11:48 +08:00
wing328
e24405e706
Merge pull request #2861 from BeneficialName/php-fix-prop-name-as-var
...
[PHP] list_invalid_properties now don't call undefined variables
2016-05-13 17:35:18 +08:00
wing328
406357e3b8
Merge pull request #2854 from BeneficialName/php-cleanup
...
[PHP] Cleanup to make coding style more consistent
2016-05-13 17:31:36 +08:00
Kim Sondrup
7737a59705
Run ./bin/php-petstore.sh
2016-05-13 11:01:10 +02:00
wing328
26aa8e7c05
Merge pull request #2852 from BeneficialName/php-model-change
...
[PHP] method list_invalid_properties change to camelCase
2016-05-13 16:55:17 +08:00
Kim Sondrup
e31c71f685
[PHP] list_invalid_properties now don't call undefined variables
2016-05-13 10:54:29 +02:00
Kim Sondrup
840adb8aa3
[PHP] model list_invalid_properties change to camelCase
2016-05-12 20:05:55 +02:00
wing328
1cb1b0351c
update php sample
2016-05-10 22:38:21 +08:00
wing328
363c40ec55
update php petstore sample
2016-05-10 00:39:55 +08:00
wing328
d0529cffdb
Merge branch 'php-fix-array-handling-2' of https://github.com/arnested/swagger-codegen into arnested-php-fix-array-handling-2
...
Conflicts:
modules/swagger-codegen/src/main/resources/php/model.mustache
samples/client/petstore/php/SwaggerClient-php/README.md
samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php
samples/client/petstore/php/SwaggerClient-php/lib/Model/AnimalFarm.php
samples/client/petstore/php/SwaggerClient-php/lib/Model/ApiResponse.php
samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php
samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php
samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php
samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumClass.php
samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumTest.php
samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php
samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php
samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php
samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php
samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php
samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php
samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php
samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php
samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php
2016-05-10 00:29:13 +08:00
wing328
f30b32afc4
minor fix to mustache layout
2016-05-09 16:32:49 +08:00
wing328
cf6e8cffbb
Merge branch 'php_parameter_validation' of https://github.com/abcsun/swagger-codegen into abcsun-php_parameter_validation
...
Conflicts:
samples/client/petstore/php/SwaggerClient-php/README.md
samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumClass.php
samples/client/petstore/php/SwaggerClient-php/lib/Model/EnumTest.php
2016-05-09 16:21:40 +08:00
abcsun
9efef02d5f
formate the module.mustache
2016-05-07 18:12:28 +08:00
abcsun
df1d36cf47
modify the properties from container array
2016-05-07 15:55:38 +08:00
abcsun
0695708594
sync from origin master & do the parameters validation in model
2016-05-07 15:43:19 +08:00