Alex
4eab5406c5
Added ModelInterface for PHP Models ( #6331 )
...
All Model classes include a set of methods - it makes sense to align them to a concrete interface to improve strict typing when referencing these models.
2017-09-05 22:22:18 +08:00
wing328
c1f5de91bb
add comment, update ruby, php samples
2017-09-03 23:20:55 +08:00
Manuel Kiessling
105fe4958e
[php] Fixed typo in codedocs (Swaagger -> Swagger). ( #6299 )
2017-08-12 21:36:19 +08:00
wing328
54d00084f7
update php, ruby petstore
2017-08-02 23:38:46 +08:00
wing328
e964702550
Merge remote-tracking branch 'origin/master' into 2.3.0
2017-07-12 21:54:23 +08:00
serezha93
140826b47f
minor fixes ( #5981 )
...
* Update configuration.mustache
added return tag in PHPDoc
* made sanitizeFilename as static method
* updated petstore
2017-07-09 16:23:18 +08:00
Akihito Nakano
4612c12560
[PHP] Add support for async requests ( #5771 )
...
* Add xxxAsyncWithHttpInfo
* Add xxxAsync
* Tweak doc comment
* apply DRY principle to the creation process for request
* Fix undefined variable $statusCode
* error handling
* Fix undefined variable $url
* Tweak syntax
* Update samples
run './bin/php-petstore.sh'
* Update samples (security)
run './bin/security/php-petstore.sh'
* Fix doc comment
xxx(Async|AsyncWithHttpInfo) returns \GuzzleHttp\Promise\PromiseInterface
* Update samples (./bin/php-petstore.sh)
* Update samples (./bin/security/php-petstore.sh)
* Add AsyncTest
2017-06-07 20:35:28 +08:00
wing328
87bbbc1a1b
Merge remote-tracking branch 'origin/master' into 230_merge_master
2017-06-05 23:27:11 +08:00
Arne Jørgensen
d5b3cc0534
[PHP] Fix date
format serialization ( #5754 )
...
* [PHP] Honor Swagger/OpenAPI 'date' format
Per spec
(https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types ),
DateTime instances defined as 'date' datatype need to be serialized as
defined by full-date - RFC3339, which has the format:
full-date = date-fullyear "-" date-month "-" date-mday
ref:
https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14
see #5531
fixes #5607
* [PHP] Add `date` and `date-time` serializer tests
See #5531
See #5607
* [PHP] Improve codestyle of generated code
* [PHP] Regenerate PHP Petstore sample
* [PHP] Regenerate PHP Security sample
2017-06-05 00:47:56 +08:00
baartosz
d7202a7c76
[php] 2.3 - fix form params json encoding ( #5701 )
...
* fixed tests expectations not compatible with phpunit 4
* added test and endpoint definition, updated template
* regenerated sample
* regenerated security sample
2017-06-05 00:36:40 +08:00
wing328
18e6440bcc
Merge remote-tracking branch 'origin/master' into 2.3.0
2017-05-30 00:12:34 +08:00
wing328
4d705081c8
[PHP] Fix broken links in the auto-generated documentation ( #5715 )
...
* remove trailing space in cpprest, update samples
* remove unused pom.xml in go pestore
* fix broken links in php api doc by fixing baseType
* fix csharp api doc
* fix php examples
* fix examples for abstract php generator
2017-05-26 21:47:49 +08:00
wing328
651a3e388b
Merge remote-tracking branch 'origin/master' into 2.3.0
2017-05-21 01:35:13 +08:00
wing328
8314f4e78a
Add removeOperationIdPrefix option ( #5674 )
...
* add removeOperationIdPrefix option
* remove removeOperationIdPrefix from cli option for generators
2017-05-21 01:28:06 +08:00
wing328
e1e5ac4d37
Merge remote-tracking branch 'origin/master' into 2.3.0
2017-05-17 22:00:06 +08:00
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
wing328
45ff39c237
Merge remote-tracking branch 'origin/master' into 2.3.0
2017-05-10 18:04:49 +08:00
mguan-trulia
918343b684
issue #3365 adding accept encoding for PHP ( #5525 )
2017-05-06 10:40:08 +08:00
Alexander
9212c21567
[PHP] Add default value to method signature if present in Swagger spec ( #5571 )
...
* Add default value to method signature if present in Swagger spec
* Update pet store PHP code
2017-05-06 10:39:14 +08:00
wing328
f7cbb2c0e6
Merge remote-tracking branch 'origin/master' into 2.3.0
2017-04-23 15:26:15 +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
wing328
7991cf75ae
Merge remote-tracking branch 'origin/master' into 2.3.0
2017-04-10 23:21:36 +08:00
Vincent Giersch
aef98f464e
fix(php): should not check enum value if not unspecified and optional (broken since #4886 ) ( #5357 )
...
Signed-off-by: Vincent Giersch <vincent@giersch.fr>
2017-04-10 23:21:14 +08:00
baartosz
2315ef2a7f
Php client using guzzle6 & psr7 instead of curl ( #5190 )
...
* reimplemented basic requests with httpplug
* added returning headers
* added query params support
* removed constant reference to model class
* some extra @throws; form params
* form and query params encoding
* file upload / form multipart
* added missing response headers in WithHttpInfo calls
* removed Store test From PetApiTest class
* removed configuration overriding test as its now task of client adapters
* updated store tests with new client initialization code
* updated composer.json template
* not using json_decode if response is string
* renamed some variables to camelCase
* removed ApiClient and Configuration classes
* added HeaderSelector template
* added ObjectSerializer injection
* regenerated all samples
* added AuthConfig and readded support for custom api keys
* readded support for oauth tokens
* readded basic auth; moved auth tests to separate test class
* readded header params
* readded support for collections in paths
* readded config option; readded exception handling
* file downloading; readded some Configuration properties removed earlier
* readded default headers
* made responses and return types work same way as earlier
* made all methods static in ObjectSerializer
* updated test.php, replaced autoload.php with composer's autoloader
* updated api doc template
* removed classes used for testing; regenerated Fake_classname_tags123Api
* replaced httplug with guzzle6
* updated required php version to 5.5
* clean up
* readded missing userAgent feature; removed default headers from Configuration
* updated test.php
* downgraded phpunit back to 4.8 to work with php5.5; fixed client initialization in some tests
2017-04-03 15:47:57 +08:00
wing328
cf8a9a0de0
Merge remote-tracking branch 'origin/master' into 2.3.0
2017-04-03 14:54:50 +08:00
Paŭlo Ebermann
ce41a343d8
Updating all samples (except feign) ( #5281 )
2017-04-02 17:01:15 +08:00
wing328
ad4de91d92
Merge remote-tracking branch 'origin/master' into 2.3.0
2017-03-30 09:57:07 +08:00
Paŭlo Ebermann
db71d97370
Updating samples after #5232 . ( #5243 )
...
* Updating samples after #5232 .
* Fix tests after #5232 .
* Fix Javascript client tests.
* JaxRS server: set serverPort only when not given from outside.
* Update JaxRS sample creator scripts to fix serverPort.
* Preliminary test fix for JaxRS server generators.
* Updating samples for JaxRS with Jersey1/2.
* Updating JaxRS samples again.
2017-03-30 01:28:53 +08:00
Paŭlo Ebermann
9be178b26a
Merge branch 'master' into new-sync-master-to-2.3.0
2017-03-13 21:42:41 +01:00
Paŭlo Ebermann
3a48ba8bfd
Update all the samples.
...
(except clojure + scalatra, because those are broken, will fixed with later master merge.)
2017-03-13 19:50:10 +01:00
baartosz
cffaaa027a
minor improvements to Configuration php template ( #4989 )
2017-03-09 17:28:19 +08:00
wing328
4fe79f0078
Remove default format (JSON) from API operations ( #4987 )
...
* remove default format (json) and update ruby petstore
* update python petstore sample
* update php petstore sample
* update android petstore sample
* update java petstore sample
* update objc sample
* remove default format (json) from perl
2017-03-09 11:12:01 +08: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
baartosz
26257daec3
fixed ApiException's methods return types ( #4845 )
2017-03-02 16:45:42 +08:00
wing328
acd10318f7
Merge remote-tracking branch 'origin' into sync_master_230
2017-02-10 23:31:36 +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
wing328
9a8ede4189
update php sample
2017-01-19 21:22:20 +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
William Cheng
ce899e3776
Merge remote-tracking branch 'origin/master' into 2.3.0
...
Conflicts:
appveyor.yml
modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaCodegen.java
modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractTypeScriptClientCodegen.java
modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java
modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SpringCodegen.java
modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/TypeScriptAngular2ClientCodegen.java
modules/swagger-codegen/src/main/resources/Java/libraries/feign/pom.mustache
modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/pom.mustache
modules/swagger-codegen/src/main/resources/TypeScript-Fetch/api.mustache
modules/swagger-codegen/src/main/resources/go/api.mustache
modules/swagger-codegen/src/main/resources/objc/api-body.mustache
modules/swagger-codegen/src/main/resources/objc/api-header.mustache
modules/swagger-codegen/src/main/resources/typescript-angular2/configuration.mustache
modules/swagger-codegen/src/main/resources/typescript-angular2/tsconfig.mustache
modules/swagger-codegen/src/test/java/io/swagger/codegen/swift/SwiftModelTest.java
modules/swagger-codegen/src/test/java/io/swagger/codegen/swift3/Swift3ModelTest.java
modules/swagger-codegen/src/test/java/io/swagger/codegen/typescript/typescriptangular2/TypeScriptAngular2ModelTest.java
samples/client/petstore-security-test/typescript-angular2/configuration.ts
samples/client/petstore/go/go-petstore/docs/FakeApi.md
samples/client/petstore/go/go-petstore/fake_api.go
samples/client/petstore/go/go-petstore/pet_api.go
samples/client/petstore/java/feign/pom.xml
samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeApi.java
samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/PetApi.java
samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java
samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/RFC3339DateFormat.java
samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Animal.java
samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/EnumTest.java
samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/FormatTest.java
samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeApi.java
samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/JSON.java
samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java
samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java
samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/FakeApi.java
samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/PetApi.java
samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeApi.java
samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeApi.java
samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/PetApi.java
samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.h
samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m
samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h
samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m
samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.h
samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m
samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.h
samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.h
samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.h
samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m
samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h
samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m
samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.h
samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m
samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.h
samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.h
samples/client/petstore/objc/default/SwaggerClient/Core/SWGJSONResponseSerializer.h
samples/client/petstore/qt5cpp/client/SWGPetApi.h
samples/client/petstore/qt5cpp/client/SWGStoreApi.h
samples/client/petstore/qt5cpp/client/SWGUserApi.h
samples/client/petstore/typescript-angular2/default/configuration.ts
samples/client/petstore/typescript-angular2/npm/README.md
samples/client/petstore/typescript-angular2/npm/configuration.ts
samples/client/petstore/typescript-angular2/npm/package.json
samples/client/petstore/typescript-angular2/npm/tsconfig.json
samples/client/petstore/typescript-fetch/builds/default/api.ts
samples/client/petstore/typescript-fetch/builds/es6-target/api.ts
samples/client/petstore/typescript-fetch/builds/with-npm-version/api.ts
samples/client/petstore/typescript-fetch/tests/default/test/PetApiFactory.ts
samples/client/petstore/typescript-fetch/tests/default/test/StoreApiFactory.ts
samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApi.java
samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApiService.java
samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java
samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApi.java
samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApiController.java
samples/server/petstore/springboot/src/main/java/io/swagger/api/FakeApi.java
samples/server/petstore/springboot/src/main/java/io/swagger/api/FakeApiController.java
2017-01-05 17:44:39 +08:00
wing328
4870cf4ab1
Merge branch 'Ignore_Javatypes_On_ModelPre_and_Suffixes' of https://github.com/d0x/swagger-codegen into d0x-Ignore_Javatypes_On_ModelPre_and_Suffixes
2016-12-20 17:46:52 +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
wing328
a6287bed1d
Merge branch '2.3.0' of https://github.com/swagger-api/swagger-codegen into 2.3.0
2016-10-02 17:24:37 +08:00
Dalibor Karlović
10d3dea89e
[PHP] fix PHPUnit invocation, add basic phpunit.xml.dist ( #3864 )
...
* feature(phpunit) fix PHPUnit invocation, add basic phpunit.xml.dist
* fix(phpunit) add proper paths relative to phpunit.xml.dist
2016-09-28 19:44:07 +08:00