Commit Graph

9417 Commits

Author SHA1 Message Date
wing328
96137e5677 add encodeURIComponent to encode path parameters (#6551) 2017-09-25 16:28:30 +08:00
wing328
419ee1cc79 Add class prefix to tag with numbers (#6561)
* add class prefix to tag with numbers, update java to default tag name

* update codegen test
2017-09-25 15:23:27 +08:00
wing328
672cc29f73 [Bash] Add test setting for Bash client (#6558)
* add pom.xml and travis.yml for bash

* create travis.yml.bak, test .travis.yml.bash

* restore travis.yml
2017-09-25 12:49:58 +08:00
Kenny Jones
4b0314498b Bugfix: Handle all different types of security (#6528)
The only special handling was for security definition type `apiKey`
in `query`. All the other security configurations should result in the
same generated code.
Moves the handling of the special query parameters outside of the
`parameters without specific cardinality` section.
To cover the scenario where `elif` was being used, simply leverage the
builtin `continue` statement to stop processing the specific query
parameter and continue to the next available query parameter, if any.

Manually test with multiple different combinations.

Resolves: #6526
2017-09-24 23:07:12 +08:00
wing328
e85353ddae Merge branch 'scala_ci' 2017-09-24 22:03:40 +08:00
wing328
53d34caa4f add scala test, rearrange test order 2017-09-24 21:32:28 +08:00
wing328
2d44d7f291 use parameter name as description if not defined (#6557) 2017-09-24 21:18:49 +08:00
wing328
c501103540 add ackintosh to php tech committee 2017-09-24 17:48:11 +08:00
wing328
f5bc5ecc04 [Scala] Decommission "async-scala" generator (#6552)
* remove async-scala generator

* remove async-scala related scripts
2017-09-24 16:43:42 +08:00
Akihito Nakano
b31a80448a [PHP] Improve Api template (#6507)
* Improve spacing in doc comment

* Improve grouping of parameter tags

* Improve line length

* Fix undefined variable $_tempBody

* Improve indent
2017-09-24 15:40:06 +08:00
Alex
ac99fe6b2d fix #6353 (#6514) 2017-09-24 14:47:40 +08:00
wing328
639f88918a [Java][RESTEasy] fix resteasy dependency issue in pom.xml (#6556)
* fix resteasy dependency issue

* add java resteasy petstore to circleci test
2017-09-24 12:49:43 +08:00
Akihito Nakano
8f8515486f [PHP] Improve Model template (#6460)
* Update samples

./bin/php-petstore.sh

* Remove unnecessary implements entry

ModelInterface, ArrayAccess are already implemented in parent

* Remove field `container` which is already defined in parent

* Change snake case to lower camel case

- invalid_properties
- allowed_values

* Improve doc commenct style

* Improve description length

* Improve length

* Doc comment short description must start with a capital letter

* Add a line between @param and @return

* Delete an additinal blank line at end of doc comment

* Udpate petstore-security-test
2017-09-23 21:36:05 +08:00
Esteban Marin
4a89d23619 [typescript-angular] apply encodeURIComponent to path-parameter (#6525)
* #6524: [typescript-angular] apply encodeURIComponent to path-parameter

* #6524: [typescript-angular2] update samples

* #6524: [typescript-angularjs] update samples
2017-09-23 17:23:45 +08:00
wing328
209158aa9d update ts jquery petstore samples 2017-09-23 17:07:21 +08:00
Jean-François Côté
1baa5fca45 [Typescript-jQuery] Fix for issue #6505 (#6541)
* Fix that prevented the default version to generate the model files

* Add generated samples
2017-09-23 16:57:48 +08:00
wing328
16678b8106 update ts angular v2, v4 petstore samples 2017-09-23 15:55:14 +08:00
stoetti
07df0759d3 [TypeScript][Angular] Better support for "Accept", "Content-Type" (#6454)
* add consumes and produces as corresponding headers if present

* add check for empty array
fix copy/paste error

* fix styling

* add isJsonMime
filter produces- and consumes-Arrays for json-mime items
2017-09-23 15:48:05 +08:00
wing328
b1e7a4f724 update cpprest petstore samples 2017-09-23 15:45:17 +08:00
WendellDuncan
8698444fb2 Propsed fix for the ApiClient runtime crash (#6523) 2017-09-23 15:34:12 +08:00
Brad Crumb
c5c639b62b Zend Expressive fix and upgrade to version 2 (#6461)
* upgraded zend-expressive from version 1 to 2

* Changed error handler for compatibility with Zend Expressive 2

* generated newest sample files for Petstore ze-ph

* removed ErrorMiddleware because it is never been used anymore. Regenerated samples

* removed ErrorMiddleware Template from Codegen

* remove ErrorMiddleware from petstore sample

* Fixed some code styles

* regenerated ze-ph samples with corrected code styles

* added new line at the end of the file
2017-09-23 15:31:20 +08:00
Hidetake Iwata
ccc980e619 Add link to Gradle Swagger Generator Plugin (#6481) 2017-09-23 15:24:37 +08:00
CK
c74c31bcfc produce correct enum for jaxrs resteasy eap (#6489) 2017-09-23 15:05:05 +08:00
wing328
ffd8c4adb6 update elasticsearch to elastic 2017-09-22 14:25:43 +08:00
Cliffano Subagio
6267869b3f Add Jenkins World 2017 talk. (#6542) 2017-09-22 12:37:31 +08:00
Jean-François Côté
bcfd14551a Fixing conversion when it's an item of a collection + add missing isUuid in objects (#6473) 2017-09-22 00:54:10 +08:00
wing328
e626afaf1a add https://www.elastic.co/ to list of co using sw 2017-09-21 21:05:17 +08:00
wing328
ae6d34d480 various readme update 2017-09-21 15:30:01 +08:00
wing328
d08149b7cc Fix abcsum with abcsun 2017-09-21 11:07:43 +08:00
lukoyanov
7f6bccb4ed [Java] Added Play! WS filters support for retrofit2 client (#6499)
* added play! ws filters support

* samples updated
2017-09-20 12:32:52 +08:00
Akihito Nakano
594b390e11 [PHP] Fix #6474: Bug with 'format: date' when using --model-name-prefix (#6510)
* Add test case which repeats the issue #6474

* Add "date" to type mapping

* Update samples

./bin/php-petstore.sh
./bin/security/php-petstore.sh
2017-09-19 18:07:37 +08:00
wing328
e27d4577c1 update perl petstore sample 2017-09-19 10:20:47 +08:00
Larry Bordowitz
65d788396b [6313] Add imports to perl objects. (#6500) 2017-09-19 10:11:38 +08:00
ehyche
146b107774 Eliminate all Java compilation warnings for swift4 codegen module (#6467) 2017-09-19 09:46:27 +08:00
stkrwork
5443c0a94c [QT5][CPP] Fixing issue with maps in models (#6479)
* [QT5][CPP] Fixing issue with maps in models

- Adjusted init function to init map correctly
- Adjusted cleanup function to cleanup maps correctly

* Fixed formatting for samples
2017-09-19 09:31:53 +08:00
Mehdy Bohlool
f3c41e866c [Python] Add configuration.{connection_pool_maxsize, assert_hostname} (#6508)
* Backport kubernetes client features:

- assert_hostname
- connection_pool_maxsize
- cleanups

* Update petstore sample
2017-09-19 01:25:33 +08:00
Jon Schoning
d928617b69 [haskell-http-client] use katip logger, default strict (#6478)
* change strictFields cli option default to True;

* use katip logging; add cli-option for monad-logger

* fix date parsing

* remove package.yaml
2017-09-19 01:24:38 +08:00
Barry Andrews
5f566255ac Add support for reserved-words-mappings to cpprest (#6501)
* Also handles automatic escaping for reserved words, i.e.
  by default, no need to provide a mapping.
Fix #6498
2017-09-19 01:14:47 +08:00
ehyche
b807f6ff96 Support object schemas with only additionalProperties. (#6492)
Previously, we had implemented the Codable protocol by simply claiming conformance, and making sure that each of our internal classes also implemented the Codable protocol. So our model classes looked like:

class MyModel: Codable {
   var propInt: Int
   var propString: String
}

class MyOtherModel: Codable {
   var propModel: MyModel
}

Previously, our additionalProperties implementation would have meant an object schema with an additionalProperties of Int type would have looked like:

class MyModelWithAdditionalProperties: Codable {
   var additionalProperties: [String: Int]
}

But the default implementation of Codable would have serialized MyModelWithAdditionalProperties like this:

{
  "additionalProperties": {
    "myInt1": 1,
    "myInt2": 2,
    "myInt3": 3
  }
}

The default implementation would put the additionalProperties in its own dictionary (which would be incorrect), as opposed to the desired serialization of:

{
  "myInt1": 1,
  "myInt2": 2,
  "myInt3": 3
}

So therefore, the only way to support this was to do our own implementation of the Codable protocol. The Codable protocol is actually two protocols: Encodable and Decodable.

So therefore, this change generates implementations of Encodable and Decodable for each generated model class. So the new generated classes look like:

class MyModel: Codable {
   var propInt: Int
   var propString: String

   // Encodable protocol methods

   public func encode(to encoder: Encoder) throws {

        var container = encoder.container(keyedBy: String.self)

        try container.encode(propInt, forKey: "propInt")
        try container.encode(propString, forKey: "propString")
    }

    // Decodable protocol methods

    public required init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: String.self)

        propInt = try container.decode(Int.self, forKey: "propInt")
        propString = try container.decode(String.self, forKey: "propString")
    }

}

class MyOtherModel: Codable {
   var propModel: MyModel

   // Encodable protocol methods

   public func encode(to encoder: Encoder) throws {

        var container = encoder.container(keyedBy: String.self)

        try container.encode(propModel, forKey: "propModel")
    }

    // Decodable protocol methods

    public required init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: String.self)

        propModel = try container.decode(MyModel.self, forKey: "propModel")
    }

}
2017-09-19 01:04:50 +08:00
ehyche
8067612e06 Handle when response is a file URL. (#6469)
This is the equivalent change in the swift4 module which was made in the swift3 module in this PR:

https://github.com/swagger-api/swagger-codegen/pull/6274

This updates AlamofireImplementations.mustache to handle when the response is an URL. It also makes changes in the generated sample code for:

* default configuration (no promisekit or rxswift)
* promisekit
* rxswift

Also, in order to build, the generated code needed to be updated with the change in CodableHelper which changes dataDecodingStrategy to ".base64" from its previous definition in earlier Xcode 9 betas.
*
2017-09-12 14:37:39 +08:00
wing328
d639b38d0d fix link to fehguy twitter account 2017-09-12 14:17:29 +08:00
wing328
591149bcb7 Better logic to handle tags with special characters (#6466)
* better logic to handle tag with special characters

* update test cases

* comment out swift test cases

* restore the swift tests
2017-09-12 11:41:14 +08:00
wing328
9e0911b376 [ObjC] fix NPE when getting swagger type (#6465)
* fix npe in swagger type (objc)

* remove trailing spaces
2017-09-11 17:39:12 +08:00
Lance Hannestad
a6d6432e6d [Python][Flask] Upgraded connxion to 1.1.15 (now supports multi collection format arrays) (#6463)
* [Python][Flask] Upgraded connxion to 1.1.15 (now supports multi collection format arrays)

* Was modified by ./bin/python-petstore.sh
2017-09-11 10:23:38 +08:00
wing328
f6787539c0 add more blog posts 2017-09-11 10:09:16 +08:00
wing328
753ba935f1 add https://pycon.jp/2017/ja/ presentation 2017-09-11 03:15:12 +08:00
wing328
665545a2b4 add more links to presentations, blog posts, etc 2017-09-11 03:08:00 +08:00
wing328
5b004de20d add R to the list of supported languages 2017-09-11 02:44:59 +08:00
wing328
afb75d64d0 fix NPE in get swagger type (#6462) 2017-09-10 02:16:08 +08:00
wing328
29bd1d92f2 add square blog post by roykachouh, retrofit post 2017-09-10 00:31:57 +08:00