Commit Graph

8554 Commits

Author SHA1 Message Date
harishchoragudi
2d008be181 Fix for issue#5788 -CPPRest generated models are not using inheritance as specified in contract (#5791)
* fixed map to use value instead of mapentry while doing fromJson.

* cpprest models now use inheritance properly instead of always extending from ModelBase

* cpprest models now use inheritance properly instead of always extending from ModelBase

* removed a sysout used for debugging

* toJson() and fromJson() now leverages parent class's corresponding methods

* virtual is not needed as override essentially does the same thing.

* added docstring for getModelByName

* corrected the javadoc

* fixed @param issue in javadoc

* fixed @param uncapitalized P in param in javadoc
2017-06-09 01:41:20 +08:00
Romain d'Alverny
73f5266596 [Swift3] Set more liberal Swift3 decoder, behind lenientTypeCast option (#5795)
* [Swift3] Add lenientTypeCast option

When set to true, this generates a client JSON decoder
that will accept and cast mistyped values.

Here:
 - String => Bool ("true" instead of true),
 - String => Int ("123" instead of 123),
 - NSNumber => String (123 instead of "123").

The point is to allow the same client code to handle several
server implementations that may (sadly) not be up to spec,
or still be "evolving".

The conversion is not guaranteed if the input

Not a perfect/complete solution, not sure if it should be
activated along other casts, so kept behind an option.

* Update Petstore client code
2017-06-08 09:10:21 +08:00
wing328
691c14fa1a add --rm=false to circleci docker build commands 2017-06-07 23:09:08 +08:00
wing328
e43595a0a1 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-06-07 20:04:12 +08:00
wing328
544b7b77ac comment out docker update while we're working on the issue 2017-06-07 20:03:48 +08:00
Ralph Langendam
ec19e8f407 Fixed minor compiler error and warning (#5762)
* 5762 Fixed minor compiler error and warning

* 5762 Regenerated cpprest petstore client
2017-06-07 18:37:45 +08:00
Julien - JuH
9f81aa4bfc StaticHtml2Gen | Speed up appDescription rendering (#5722) 2017-06-07 18:35:17 +08:00
Trent Albright
676e2a04f5 Fix issue with buffered sink handling in OkHttp (#5786)
* Fix issue with buffered sink handling in okhttp

Fixes unexpected end of stream exceptions when using the okhttp-gson library
and making asynchronous calls.

* update petstore samples for okhttp-gson

$ ./bin/java-petstore-okhttp-gson.sh
$ ./bin/security/java-petstore-okhttp-gson.sh

* WIP: trigger ci
2017-06-07 18:15:06 +08:00
wing328
2bef56c7bd add env variables for circleci 2017-06-07 18:01:36 +08:00
Jean-François Côté
ccf2f2ff07 Add basic support for collection. (#5776) 2017-06-07 17:12:30 +08:00
Vlad Frolov
6a986975e4 [javascript] Fixed fs files support for Electron (#5765) 2017-06-07 17:01:47 +08:00
Kevin Murphy
6239ec0807 [javascript] Mark "fs" package as absent in browser in package.mustache (#5768) 2017-06-06 17:09:50 +08:00
Kevin Murphy
9b93d3363f Fix bug in ES6 ApiClient.mustache (#5766)
ES6 static properties cannot self-reference.
2017-06-06 16:19:35 +08:00
Kevin Murphy
151d1b2783 [javascript] Fix documentation for ES6 ApiClient (#5783) 2017-06-06 16:03:36 +08:00
wing328
f770477d48 Merge branch 'objc_xcpretty' 2017-06-06 16:02:54 +08:00
wing328
0b998f0684 add xcpretty to objc test output 2017-06-06 15:23:15 +08:00
wing328
c3ea24cefa Merge branch 'objc_ci' 2017-06-06 00:20:31 +08:00
wing328
d6743b4597 uncomment objc tests 2017-06-05 23:35:17 +08:00
wing328
6ee332a513 [Swift] Fix issue with Swift Petstore integration tests due to pod install (#5774)
* add pod file for swift3

* skip pod install

* avoid pod install in swift3 petstore (promisekit,rxswift)

* use https instead of http for cocoapod spec

* avoid timeout in swift3 test
2017-06-05 22:22:56 +08:00
wing328
3cbe96f3c6 comment out pod repo update 2017-06-05 18:03:20 +08:00
wing328
bbe019a3ce move docker tasks from travis to circleci 2017-06-05 17:54:25 +08:00
wing328
faf082589d Enable Travis CI tests for Swift, ObjC clients and move some tests to CircleCI (#5687)
* enable travis CI tests for swift, objc, move some tests to circleci

* fix comment in xml file

* use xcode8.3

* use ruby 2.2.5

* fix objc core data pom.xml

* use cocoapods 1.2.1

* use xcpretty for clearer test results

* fix pom with relative path to script

* comment out objc test

* fix xcpretty exit code

* add && exit ${PIPESTATUS[0]} for swift3 xcodebuild script

* use xcode 8.2

* update promisekit version for swift 2x, 3x

* add pod repo update

* remove Pods directory

* update swift dependencies to the latest version

* update podfile.lock

* rollback Alamofire to 4.0 for swift3

* fix swift3 rxswift api cliiet

* fix testDeletePet test in Swift3 rxswift petstore

* update clojure petstore

* comment out clojure test in travis (already covered in circleci)

* run pestore server locally

* use wing328/swagger-samples to run petstore

* run petstore server in the background

* test ruby petstore client

* add /Users/travis/.cocoapods/repos/master to cache

* add back ruby test, use public pestore server

* add back bash client test

* add npm config set registry to avoid time out

* use docker branch in swagger samples

* remove bash test

* show go version, reorder

* debug go petstore client

* reinstall go

* comment out pod repo update

* uncomment pod repo update

* test go in circleci

* remove go from travis test

* brew install sbt
2017-06-05 15:43:20 +08:00
wing328
40163b26d2 update objc petstore to use petstore.json 2017-06-05 12:25:51 +08:00
Zack Lemmon
f3da691a72 Fix typo in Ruby examples/mustache files (#5773) 2017-06-05 11:19:29 +08:00
wing328
4fd52d17c5 minor build warning fix for C# client 2017-06-05 01:05:19 +08:00
Jim Schubert
bc8fe0fd03 [csharp] date proper format (#5734)
* [csharp] 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 #5513
see #5531

* [csharp] Regenerate sample

* [csharp] Include date format test
2017-06-05 00:57:00 +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
davidgri
00f2dc422d Issue5613 (#5616)
* Fixed Issue5162 consumes in GET-Methods

* Fixed Issue5613

* Ran the shell scripts under bin

* Tab removed
2017-06-05 00:38:43 +08:00
Cliffano Subagio
9bc8f37aa6 [javascript] Fix empty response body when schema type is string (#5759)
* [javascript] Fix response body when return type is String.

* [javascript] Regenerate javascript petstores with fixed String return type.
2017-06-05 00:20:11 +08:00
Jim Schubert
ef07a02a01 [kotlin] Support nested enums in models (#5769)
* [kotlin] Add model enum support

Model variables marked isEnum=true are nested class enums. Top-level
enums will not be isEnum=true, but rather have a datatype specific to
the enum's type.

* [kotlin] Regenerate client sample
2017-06-05 00:04:58 +08:00
wing328
879149bb69 Revert "[javascript] Added README section for Webpack configuration (closes #3466) (#5767)" (#5770)
This reverts commit 54f5d73ee2.
2017-06-04 16:52:50 +08:00
Vlad Frolov
54f5d73ee2 [javascript] Added README section for Webpack configuration (closes #3466) (#5767) 2017-06-04 15:42:41 +08:00
wing328
034fc44bdd add Play Framework 2017-06-03 01:14:08 +08:00
sdoeringNew
ffc0d32b9c #5712 put @JsonValue to appropriate place in generated enum, add TypeAdapter for Gson enums, enhance tests (#5713) 2017-06-02 16:03:32 +08:00
wing328
71d1d05b98 add owner for restbed 2017-06-02 14:51:43 +08:00
stkrwork
b53a668517 [C++] Restbed Server Stub Code Generator (#5742)
* - Added Restbed Generator

* - Added Json processing functions to model
- Removed unnused code from restbed codegen class
- Added response header processing to api template

* Changed it to respect alphabetical order

* Made the string joining java 7 compatible

* Added samples
2017-06-02 14:40:07 +08:00
Alexander Popiak
e0e5bdde76 fix cpprest model source mustache template (#5716)
(which was generating code that doesn't compile because of a wrong variable name)
2017-06-02 00:40:32 +08:00
Johnny-Bee
fa8e8fdc3c Update README.md (#5757) 2017-06-01 21:10:43 +08:00
Tony Tam
77555bfab1 Merge pull request #5749 from swagger-api/issue-5748-2.2.x
Updated parser to v1.0.29
2017-05-31 12:45:19 -07:00
Tony Tam
bd9142150e updated to 1.0.29 2017-05-31 10:44:24 -07:00
wing328
9070c7133c minor code format enhancement to ZipUtil.java 2017-05-31 23:14:37 +08:00
wing328
bda5f1a5d5 add npm config set to avoid time out 2017-05-31 17:39:58 +08:00
Jonathan Leitschuh
d6f2424152 Fix spring generated controller annotations only generating for first return type (#5399)
Fixes the spring java code generator so that the ApiResponse fields are populated correctly
on the controller.

Related to #4693
2017-05-31 17:27:32 +08:00
imgx64
bee999056a [typescript-angular2] Avoid tslint "Unused import" warnings (#5723)
Move the tslint comment that disables `no-unused-variable` to before the
import statements, to avoid "Unused import" warnings
2017-05-31 17:13:22 +08:00
Casey Fulton
31a8ac6987 [docker] Run as non-root user, fixes permissions. (#5702) 2017-05-31 16:17:42 +08:00
wing328
34b742355b Merge branch 'jimschubert-kotlin-api-model-docs' 2017-05-31 00:28:30 +08:00
wing328
6473949737 Merge branch 'kotlin-api-model-docs' of https://github.com/jimschubert/swagger-codegen into jimschubert-kotlin-api-model-docs 2017-05-31 00:28:08 +08:00
Jim Schubert
23cf641e8a Kotlin client lists (#5729)
* [kotlin] array->List instead of Array

Serialization to/from primitive arrays can cause issues with valid
responses. This commit considers swagger 'array' types as 'List' which,
although not as memory efficient should provide a cleaner interface for
users (and avoid serialization issues).

Also, updates README.md to list new generator and excludes
folder at samples/client/kotlin/bin/, which is not used.

* [kotlin] Move sample under conventional directory

samples/client/kotlin/ -> samples/client/petstore/kotlin/

Updated new.sh to generate client/server/docs into similar structure.
Current documentation generators (cwiki, html, html.md, html2) aren't
following a convention like client/server generators.
2017-05-31 00:18:37 +08:00
wing328
9282098d72 remove unused folder 2017-05-30 22:07:53 +08:00
wing328
51f9874da6 update appveyor to use java-jersey-jaxrs-ci 2017-05-30 16:11:01 +08:00