Commit Graph

3142 Commits

Author SHA1 Message Date
Paŭlo Ebermann
b275b8f9da Updating samples for spring-stubs, springboot-delegate, springboot-delegate-j8. (#5211) 2017-03-27 15:24:18 +08:00
Paŭlo Ebermann
ee1ef2c1f6 Update samples for okhttp-gson-parcelableModel. (#5208) 2017-03-27 14:22:56 +08:00
Paŭlo Ebermann
4ec23e6694 Update samples for Ruby-Client + Rails server. (#5214) 2017-03-27 13:27:13 +08:00
Paŭlo Ebermann
200b10e2da Update samples for QT5. (#5216) 2017-03-27 11:48:16 +08:00
Paŭlo Ebermann
356774ceb2 Update samples for clojure + dynamic-html. (#5217) 2017-03-27 11:47:56 +08:00
wing328
b37a7c81b0 add comments to csharp methods (#5206) 2017-03-27 11:43:14 +08:00
Paŭlo Ebermann
c812d81e9a Issue #3084: remove timestamps from bash samples. (#5192) 2017-03-26 22:56:34 +08:00
Paŭlo Ebermann
9b25c0f529 Update samples for JaxRS/CXF. (#5201) 2017-03-26 22:55:55 +08:00
Julien Dupouy
e50e653e3d Binary support for javascript client (#5194) 2017-03-26 22:53:35 +08:00
Paŭlo Ebermann
a3e639ccee Issue #3084: remove timestamps from C# .NET2 samples. (#5197) 2017-03-26 22:48:20 +08:00
Paŭlo Ebermann
8c575b0f0c Update samples for ObjC&core-data. (#5202) 2017-03-26 22:44:18 +08:00
Paŭlo Ebermann
f8c3a69ebe Update samples for Swift3. (#5200) 2017-03-26 22:44:00 +08:00
Benjamin Douglas
65b6660c55 Fixes a bug in #5142 for multi-word parameters (#5185)
In the convenience class defined for generating a Map of query parameters, the
parameter name was mistakenly being set to the Java variable name, not the
actual parameter name. These are often the same, but can be different in the
case of multi-word parameters, such as in the sample API's `enum_query_string`
vs `enumQueryString`.
2017-03-24 22:04:11 +08:00
Joseph Moore
b7fc11b089 Modify retrofit OAuth templates for #5039 (#5082)
The updateAccessToken method returns `true` when it means `false` and
vice versa.
2017-03-23 23:27:04 +08:00
Paŭlo Ebermann
9dc8cf3fa6 Update samples for java/jersey2-java6 (and fix artifact ID) (#5118)
* Update samples for java/jersey2-java6.

* Let the sample generation script set the right name for jersey2-java6.

This is the equivalent change to #5095, for jersey2-java6.

* Update samples for Java/Jersey2-java6.
2017-03-23 15:22:14 +08:00
Benjamin Douglas
55b7db3456 #5142: Add @QueryMap support for Feign API (#5143)
* use builder pattern for operations

* @QueryMap parameter only for query parameters

The previous iteration had replaced all parameters (body, path, query, etc)
within a single @QueryMap. But Feign only supports this style of parameter
passing for query parameters. Besides, for the case of a body parameter (like
soxhlet uses) it only added extra verbosity. With this change, the query
parameters are gathered together in a single @QueryMap and the other parameters
are left alone.

* Adding template for generating test code

* Make javadoc consistent with rest of file's conventions/indents

* Update samples

The files in src/main were generated by running

  $ bin/java-petstore-feign.sh

The files in src/test were manually fixed.

* Correct capitalization of @QueryMap class in feign

Adds a field operationIdCamelCase (a la operationIdLowerCase) to the
CodegenOperation container and uses it in the feign-generated classes
with @QueryMap parameters. Also re-generated the feign samples.

* Adding hyphen to javadocs for extra readability.

* Adding (not replacing) api method with @QueryParam overload.

In order to keep backwards compatibility, switched to adding a new method to
the interface instead of replacing the old call.

* Adding newline to generated source for readability.
2017-03-23 15:01:07 +08:00
wing328
df2f406849 update csharp generator help text (#5140) 2017-03-22 16:18:59 +08:00
wing328
1c329483e4 [TypeScript] fix class filename in TS Angular2 template (#5131)
* fix class filename in ts angular2 template

* remove trailing comma in ts angular2 template
2017-03-21 23:48:35 +08:00
wing328
e45284806f add gradle cache 2017-03-21 21:48:40 +08:00
Ben Herila
42a7110d90 Fix Bug/4952 by explicitly implementing IValidatableObject (#4954)
* Explicitly implement IValidatableObject interface to avoid conflict with potential ValidationResult classes

* Missed one

* Rebuilt tests
2017-03-21 15:57:56 +08:00
Paul English
59fe50dd74 Ensure identifiers get sanitized; Ensure model names also have the same formatting (#5098) 2017-03-21 14:35:38 +08:00
Paŭlo Ebermann
9e38621266 Update samples for javascript-closure-angular. (#5117) 2017-03-21 14:31:18 +08:00
fumito_ito
c1a9b7313e fix #2159 dataformatter error for iOS Swift (#5008)
* fix #2159 dataformatter error for iOS Swift

When trying to parse 24-hour time to 12-hour time, date formatter throws fatal error.
It's caused by lack of settings locale for date formatter.

* update sample code
2017-03-21 14:22:18 +08:00
Gronsak
580745ef43 [C#] Adding support for generating .NET Standard 1.3 client library (#4955)
* [CsharpNetStandard] Added C# .NET Standard Client Generation

Added language CsharpNetStandard.
Everything copied from csharp Client Generator.
Dependancies switched from Restsharp to Restsharp.Portable.
Changes made where nececary to replicate Restsharp functionallity.
Project type changed to .NET Standard protable library.

* [CsharpNetStandard] Removed client prop validation due to incompability

* [CsharpNetStandard] Minor fixes

Changed leftover RestSharp.Method to Method
Changed to .Net Standard 1.3 for compability reasons
Changed excludeTests to default to true due to tests not being implemented yet

Removed unnecessary targetFramework property
Removed leftover UWP stuff

* [CsharpNetStandard] More fixes

Added correct dependencies to Readme
Added correct supported frameworks to Readme
Added slightly better placeholder for installation instructions in Readme

Removed leftover dependencies from project.json
Removed leftover SupportsAsync stuff
Removed references to build.bat/-.sh since they're not yet being generated

Todo implement test generation

* [CsharpNetStandard] Added forgoten git_push.sh

* [C#-netstandard] Renamed option to csharp-netstandard

Also added .bat file for test generation

* [C# Net Standard] fixed path in .bat file

* [C# NET Standard] fixes to enum generation

Fixed issues with enum generation due to tired programmer

* [C# NET Standard] Generated sample client library

Sample library generated

Fixes:
Class actually works again
.bat - minor inconsistency fixed

* [C# NET Standard] Error corrected in how timeout is set

Configuration Timeout property changed to TimeSpan type and code corrected around that

* [C#] Merged .NET Standard generator into csharp generator

Functionallity of csharp-netstarndard generator has been moved into standard csharp generator under the targetFramework option as "v5.0"
2017-03-20 17:21:44 +08:00
Paŭlo Ebermann
7ab746d355 Updating samples for swift. (#5120) 2017-03-20 15:40:27 +08:00
Paŭlo Ebermann
d3f365fd29 Fix (partially) #4898 for elixir (#5021)
* fix (partially) #4898 for Elixir

* Update petstore samples (after fix for elixir for #4898)
2017-03-20 15:24:24 +08:00
Oliver Teichmann
2d21bfa21c Updated feign library to use latest version of OpenFeign and Jackson. (#5114) 2017-03-19 15:15:06 +08:00
wing328
eee5cc061c fix path with {{{ .. }}} in c# api mustache file (#5112) 2017-03-18 23:02:20 +08:00
wing328
6c2304ace5 add petstore sample for jaxrs-cxf-client, update travis ci (#5111) 2017-03-18 22:48:38 +08:00
jfiala
2048defe7b add jackson dependencies to pom for cxf-client #4924 (#5032) 2017-03-18 22:13:44 +08:00
Paŭlo Ebermann
4706f4da3e Update samples for C#/SwaggerClientWithPropertyChanged. (#5095) 2017-03-18 17:08:17 +08:00
Paŭlo Ebermann
426660206d Fix sample script to set the correct artifact ID in the generated POM (#5094)
* Update samples for akka.

* Have akka-scala-petstore scripts set the correct artifact names

* Update akka-scala samples again.
2017-03-18 16:49:46 +08:00
Paŭlo Ebermann
1b973d2c43 Update petstore samples for scala client. (#5092)
* Update petstore samples for scala client.

* Fix missing dependency problem.
2017-03-18 16:44:53 +08:00
wing328
917306aa10 override escape quotation mark in async scala generator (#5078) 2017-03-16 01:14:43 +08:00
wing328
2da2a2631d add ci for akka-scala client (#5073) 2017-03-15 23:08:40 +08:00
wing328
c651aacfe3 add ci for ts jquery petstore (#5070) 2017-03-15 17:15:54 +08:00
Matt Alleman
b2aa877ce0 Allow for UUID types in akka-scala (#5069)
* allow for UUID types

* update sample libs
2017-03-15 17:02:42 +08:00
Ben Herila
eea58c55b4 Add support for typescript-jquery (typescript-based API calls using jquery ajax in the browser) (#4953)
* Typescript jquery client wip

* typescript-jquery wip

* Fix typo

* typescript-jquery wip

* Fix formatting

* Petstore sample for typescript-jquery

* Petstore sample for typescript-jquery

* wip
2017-03-15 00:17:04 +08:00
Paŭlo Ebermann
a2d1edc6f5 Fix (partially) #4898 for groovy (#5030)
* Fix (partially) #4898 for groovy.

This also adds some TODOs for the missing path, form and body parameters.

* Update Groovy samples (after partial fix for #4898)
2017-03-13 21:46:28 +08:00
wing328
722bbb8e1f update clojure test cases after restoring to petstore.json (#5043) 2017-03-13 19:43:09 +08:00
wing328
01eba1872e update java okhttp petstore sample 2017-03-13 00:23:55 +08:00
Paŭlo Ebermann
16adc7b373 Fix (partially) #4898 for flash (#5022)
* Fix (partially) #4898 for flash.

This fixes path, query and header parameters.

* Update samples for flash (after partial fix for #4898).
2017-03-12 16:53:18 +08:00
wing328
82ccbc09f7 update cpprest petstore sample 2017-03-11 20:40:22 +08:00
XuXinkun
3c1a8daaf9 fix handleResponse to not leak okhttp connections (#4997) 2017-03-11 17:02:49 +08:00
wing328
8fb71b46db cache module directory to improve CI performance (#5025) 2017-03-11 16:59:17 +08:00
Tony Tam
0dcd91adbf null out the string null in examples. Rebuilt java clients and made a whole bunch of changes 2017-03-10 11:07:30 -08:00
pablograna
fb75996527 Make java spring controller constructor public. (#4972)
* Make java spring controller constructor public.

This lets users manually create the controller and inject the delegate in the
spring configuration file, instead of letting spring scan for controllers and
autowire the delegate.

* Ran spring-all-pestore.sh.
2017-03-09 23:11:44 +08:00
wing328
bfb4390a1c [TypeScript][Angular2] better code indentation, update Petstore sample (#4990)
* fix query parameter indentation, update ts angular2 sample

* update ts angular2 sample
2017-03-09 22:27:29 +08: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
wing328
b6d6356c46 remove default format (json) from c# api (#4980) 2017-03-08 22:43:59 +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
Michael Kourlas
2bb7626202 [Java] Fix for issue #3365: Support for gzip compression (#4967)
* Fix for issue 3365 for Java

* Added tests

* Convert CRLF to LF

* Convert CRLF to LF in tests
2017-03-08 19:00:50 +08:00
wing328
89ad5e59b8 use convertPropertyToBooleanAndWriteBack in some generators (#4975) 2017-03-08 17:39:22 +08:00
delenius
5935e2e6d9 Add support for saving/returning cookies (#4192)
This adds a `saveCookies` boolean flag to ApiClient. If set to true,
the client will save and return cookies to the server.

This is useful for supporting @SessionScoped beans in Java servers.
Works both in Node.js desktop apps, and in the browser.
2017-03-08 15:26:46 +08:00
Kyle Maxwell
3e3d360027 Add proxy support to fix #4639 (#4946)
* Add proxy support to fix #4639

* Update sample app for testing

* Fix indentation and remove leftover code

* Update sample for new rest template
2017-03-08 12:03:45 +08:00
jfiala
6383872b5f update beanvalidation templates and sample for jersey2 #4719 (#4735) 2017-03-07 23:25:21 +08:00
Paŭlo Ebermann
404a9999a7 Fix (partially) #4898 for swift3 (#4916)
* fix (partially) #4898 for swift3.

* Update petstore samples for swift3 (after fix for #4898)
2017-03-07 17:28:08 +08:00
Jacobo de Vera
7de1eeb987 [python] Triple quote strings with new lines in default values (#4941)
* Triple quote python strings in defaults

When the model contains a string with a default value with new lines in
it, simply quoting generates invalid python code. Using triple quotes
for all string defaults makes sure the generated code will be a valid
python string.

Fixes #4862

* Wrap default string in triple quotes when it contains new lines

* Add newly generated python sample files
2017-03-07 14:46:38 +08:00
Val Polouchkine
122194c30e Fix typo (#4956)
Authorizatoin should be Authorization
2017-03-07 13:49:42 +08:00
wing328
f12554fd83 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-03-06 17:24:04 +08:00
wing328
2dee8381e8 update petstore sample for swift3 2017-03-06 17:23:32 +08:00
Zhanwei Wang
10950db2dd [JavaScript] Do not parse null and undefined as type. (#4933)
* [JavaScript] Do not parse null and undefined as type.

* update pet store example for #4932
2017-03-06 15:01:19 +08:00
Paul English
5d327e66a1 Port the optional/enum template logic from async-scala to the regular scala client (#4849)
* Port the optional/enum template logic from async-scala to the regular scala client

* oops, accidently pulled template from akka-scala which has custom logic for enum

Just going to avoid enum for now, considering I'm not sure what scala client
will be official

* Update tests to use option
2017-03-06 14:50:21 +08:00
Viktor Chukhantsev
35d3fb82ce [Ruby] Can only use content-type application/json with ruby-client #4867 (#4893)
* Fix ruby-client work with modern content types, like application/api.vnd+json

* Add specs.

* Fix regexp.

* Regenerate petstore client.
2017-03-06 00:44:15 +08:00
Paŭlo Ebermann
a91cbbe387 Update samples after 2.2.2 (#4901)
* Update petstore samples for Groovy.

* Update samples for JaxRS.

* Update samples for cpprest.

* Update samples for dart.

* Update samples for flash.

* Update samples for go.

* Update samples for html2.

* Update samples for lumen.

* Update samples for nancxfx.

* Update samples for objc.

* Update samples for sinatra.

* Update samples for tizen.

* Update samples for java-inflector.
2017-03-06 00:33:57 +08:00
Vlad Frolov
9516c81ebb [JavaScript] Added *WithHttpInfo methods in 'usePromises' mode to provide a way to get access to HTTP response object (e.g. headers or status code) (#3654) (#4902) 2017-03-03 18:20:52 +08:00
patulacci
e23a24c138 replaced SWG by classPrefix and ran tests (#4871) 2017-03-03 17:29:16 +08:00
wing328
dbe99c3af9 fix path variable in ts angular2 (#4756) 2017-03-03 16:59:23 +08:00
gigo1980
fa803d5cf5 Adjust Date ISO Dateformat for Query Parameters: ISSUE 4745 (#4812)
* Adjust Date ISO Dateformat for Query Parameters: ISSUE 4745

* Run Sample Model
2017-03-03 16:58:24 +08:00
Hamed Ramezanian Nik
b894dc3827 Encode form paramerers properly\n (#4836)
Superagent doesn't encode form parameters properly. For example it doesn't encode objects which contain array. The following is a failed test case:
var my_opts = {
  'storyId': 65441,
  'id': [56, 352]
};
2017-03-03 16:48:11 +08:00
Paŭlo Ebermann
0dab200f28 Update spring samples with current code. (#4874)
* Update spring samples with current code.

This is done so I can see my own changes better.

* Regenerate samples after 2.2.2.
2017-03-03 16:34:07 +08:00
Bartek Kryza
1b1767e489 [Bash] Bugfix default curl options fix (#4832)
* Fixed default cURL parameter handling

* Fixed iterator increments in JSON body Bash generator

* Added tests for content type and default cURL params

* Fixed generated Dockerfile Bash script access rights

* Generated test sample client

* Updated Bash generator README
2017-03-02 17:48:30 +08:00
baartosz
26257daec3 fixed ApiException's methods return types (#4845) 2017-03-02 16:45:42 +08:00
Tony Tam
041da8998a rebuilt 2017-03-01 09:55:42 -05:00
Paul English
accd176382 Ensure that ApiInvoker.scala can support UUID types (#4807) 2017-02-16 17:00:26 +08:00
wing328
26b1aa2b60 update ts fetch petstore samples 2017-02-15 16:24:57 +08:00
wing328
8f2e9bce6d remove trailing whitespaces in java api client (#4784) 2017-02-13 18:53:34 +08:00
wing328
ef31efe8d9 remove default temp folder during initalization (#4749) 2017-02-09 12:22:13 +08:00
Jan
0d14496bd6 [Java-retrofit] Fix for #4750 String comparison with equals (#4751)
* [Java-Feign] Fixed String comparison using equals instead of == operator

* [Java-Feign] Updated ApiClient with ./bin/java-petstore-feign.sh

* [Java-retrofit] Fix for #4750 String comparison with equals
2017-02-08 21:54:56 +08:00
wing328
d91135ec8f Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-02-08 17:00:01 +08:00
wing328
882c3ecba5 update java petstore with new uuid mapping 2017-02-08 16:07:09 +08:00
Jan
2179b44413 [Java-Feign] Fixed String comparison using equals instead of == operator (#4740)
* [Java-Feign] Fixed String comparison using equals instead of == operator

* [Java-Feign] Updated ApiClient with ./bin/java-petstore-feign.sh
2017-02-08 15:56:40 +08:00
Bartek Kryza
73395bce44 [Bash] Bash generator improvements (#4730)
* Removed trailing spaces

* Fixed autocomplete support for bash-completion < 1.4

* Added mime type autocomplete for Zsh

* Fixed Bash url autocompletion

* Fixed Zsh space after operation arguments and added trim to descriptions

* Added generation of Dockerfile for packaging Bash rest clients

* updated test samples for Bash client generator
2017-02-07 23:15:05 +08:00
Jim Schubert
96b0d155b5 [csharp] Fix enum default value (#4681)
* [csharp] Prevent enum assign to string

see swagger-api/swagger-codegen#4670

* [csharp] Regenerate client sample
2017-02-06 17:33:10 +08:00
Johannes Herrnegger
95a8192c25 [Typescript-Angular2] Fixes #4703 (#4704)
* fix issue #4703

* run petstore
2017-02-04 13:00:26 +08:00
wing328
5282987851 [Python] update python requirement.txt and use single quote for safe characters (#4702)
* update python requirement

* update petstore sample
2017-02-03 21:35:40 +08:00
wing328
a128c075ac Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-02-02 23:30:06 +08:00
wing328
f4fee61e83 update go petstore sample 2017-02-02 23:29:41 +08:00
Adnan Baruni
4b2c4f051b Issue 3914 (#4678)
* issue 3914, removed logic that remove header parameters. update template files to handle header parameters in the same manner as other parameters

* update swift and swift3 samples
2017-02-02 23:17:48 +08:00
Valentin Valchev
96ed41a29c Fixed issue #4665 [go] required object parameters are marked omitempty. (#4682)
* Fixed issue #4665 [go] required object parameters are marked omitempty.

* Run ./bin/go-petstore.sh as suggested by @wing328.
Please note, that there are quite few changes, that doesn’t come from the diff I’ve applied. Seems the script wasn’t run on the previous commit.
2017-02-01 23:56:22 +08:00
niku
f77bee8b8a [WIP] Add elixir client (#4675)
* Add elixir client

* Add test for elixir client

* Add shell script for generating sample codes for elixir client

It just copied from bin/bash-petstore.sh

* Make elixir-petstore.sh to generate sample codes for elixir client

* Add sample codes for elixir client
2017-01-30 17:40:55 +08:00
wing328
ae8a123484 [WIP][Scala] Finch generator (#3905)
* Feature/objc tasks 2.3.0 (#3522)

* change api and ApiClient to return cancellable NSURLSessionTasks instead of NSNumber

* define a configuration protocol for custom configurations, which can be passed to api clients instead of a global configuration, provide a default implementation with a singleton option

* integrate a workaround for a current JSONModel concurrency bug

* update to new ISO8601 pod

* add missing call to super

* integrate new templates into codegen

* updates documentation templates

* updates petstore objc generated code

* fixes objc client tests

* [ObjC] Add version define and share default headers of each client

* add finch generator and resource

* update license, add errros

* Fix problem with multitheard api client

* fix some errors for finch

* [finch] Remove license header

* [finch] Remove finatra stuff, fix a few issues

* WIP: Finch server generator

* [finch] WIP: server generator impl

This puts parameters (input/output) in the right format. Currently, this
is done in the generator class using vendorExtensions, but should be
refactored to imported templates to clean up.

Previous commits of the server generator output to appropriate
models/api directories. I've made no changes to this logic, but code
currently generates to the root scala package directory. This will need
to be fixed.

There's also an issue with circe's and Option[Date] in the Order type.
This issue will need to be resolved. As well, there's some unused
imports to clean up.

Initial implementation lacks support for custom imports, type mappings,
etc.

* [finch] Update api/model package and imports

* [finch] Explicit import/type mappings

* [finch] Regenerate example
2017-01-29 12:15:39 +08:00
Vlad Frolov
6890ef9755 [JavaScript] Fixed handling of empty arrays/empty strings/booleans/single numbers as valid API responses (#4653) (#4666) 2017-01-28 16:08:04 +08:00
Frode Danielsen
3236ade09d [Python] Improve model equality implementation (#4663)
* [Python] Improve model equality implementation

The model equality implementation template blindly tried accessing the
`__dict__` attribute of the variable to compare equality against. This
attribute does not exist for a lot of Python built-in types (`None`,
`str` etc.) and the equality check would simply crash.

This adds a simple guard to only continue with equality check if the
variable to compare is an instance of the model being compared against.

* Remove wrong auto-update of Python requirements
2017-01-28 00:42:53 +08:00
wing328
a45579d35e fix issue with pom.xml (spring cloud, boot) 2017-01-27 00:39:25 +08:00
jfiala
8952815b5f [Spring] Add beanvalidation annotations (#4600)
* update generated sample for spring boot #4091

* add beanvalidation annotations to spring #4091

* add tests for spring #4091

* cleanup spring-cloud (client lib) #4091

* update client sample spring-cloud #4091

* replace tabs

* add beanvalidation annotations to spring #4091

* add tests for spring #4091

* cleanup spring-cloud (client lib) #4091

* update client sample spring-cloud #4091

* replace tabs

* update spring-cloud sample
2017-01-26 23:45: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
jaz-ah
f592fdb23e [Swift] two fixes to latest param mapping code (#4587)
* two fixes: 1) extra ?'s at end of some url's 2) enums not being called out w/ rawValue to get the proper string name

* update samples

* one step closer

* closer implementation
2017-01-26 01:17:58 +08:00
wing328
3be04e8a18 update JS petstore client 2017-01-25 16:08:22 +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
Scott Williams
6e846e7463 Issue 4637 Fix for ci build (#4643) 2017-01-25 12:09:33 +08:00
wing328
9f8a1e27dd Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-01-23 19:00:31 +08:00
wing328
9abaab6bcf update ts angular2 petstore samples 2017-01-23 18:40:59 +08:00
keysolutions
933cc1ce9a Enum constructFromObject should return value (#4613)
When constructing an enum through constructFromObject the original value provided by the API response should be returned rather than extracting the value from the enum name. This resolves an issue where the constructed value is undefined when the name and value are not equivalent.
2017-01-23 16:45:38 +08:00
wing328
e83646064f update js promise petstore sample 2017-01-23 16:00:23 +08:00
tharders
30315c8570 Fix Issue 4554 - handle 204 server response in javascript (#4604)
* issues 4554: Handle 204 response and handle deserialize exceptions

* issue-4554: generate javascript client updated template

Used petstore-with-fake-endpoints-models-for-testing.yaml

* use petstore-with-fake-endpoints-models-for-testing.yaml like sh script
2017-01-23 15:14:06 +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
2e50a65a1c better handling of reserved words in models, operationId (#4620) 2017-01-22 17:41:35 +08:00
Tony Tam
7936cfc206 Merge pull request #4619 from swagger-api/issue-4618
Fix name mangling for JSON processing with QT5
2017-01-21 20:31:18 -08:00
wing328
5306b11b4a [java] Improve pom.xml to qualify for publishing to Maven central (#4616)
* [java] Attach Javadoc to artifact generation.

* [java] Attach source to artifact generation.

* [java] Add gpg signing to artifact publishing.

* [java] Add artifact URL to pom.xml .

* [java] Add artifact description to pom.xml .

* [java] Add artifact URL and description params to Jax RSS.

* [java] Add developer info to pom.xml .

* [java] Parameterise SCM info in generated pom.xml .

* [java] Move GPG signing to verify phase so that .asc files are uploaded during deploy phase.

* [java] Change GPG signing to be an optional via Maven profile. Can't assume all users will perform a release/deploy from an environment with correct GPG key/pass.

* update java petstore smaples

* camelize tag name, remove invalid file

* add back missing files for okhttp-gson

* fix docstring in java feign client

* fix docstring with various java api clients
2017-01-22 11:40:59 +08:00
Tony Tam
62caf7dac5 rebuilt samples 2017-01-21 16:33:14 -08:00
wing328
4d19fb6b2f hide generation timestamp for perl (#4614) 2017-01-21 19:12:51 +08:00
Damien Pontifex
1f0ecb5180 Updating typescript-angular to export api classes (#4589)
* Updating typescript-angular to export api classes

* Fixing tsconfig for typescript-angular test case
2017-01-21 17:02:11 +08:00
wing328
9a8ede4189 update php sample 2017-01-19 21:22:20 +08:00
Albert Morlan
ccb3385081 Set embedded templates directory when generating Javascript code (#4585) 2017-01-19 18:07:58 +08:00
Jonathan Leitschuh
36c3fa05e0 Allows for generation of spring controller code using the delegate pattern (#4439)
* Allows for generation of spring conroller code using the decorator pattern

* Change Decorator to Delegate in spring codegen
2017-01-19 17:58:39 +08:00
wing328
157fcbc4aa fix invalid spec, update petstore samples (jaxrs, ruby) 2017-01-19 16:54:16 +08:00
Dan Mikita
0a559f0dd2 Add support for modifier within the Jaxb XMLElement annotation (#4433)
* fixes #4432 Adding support for the  modifier within the Jaxb XMLElement annotation. Updated README with JaxbAnnotations configuration option.

* #4432 Running the Petstore files
2017-01-17 15:26:30 +08:00
Damien Pontifex
55443daebc Extends obj using Object.assign (#4562) 2017-01-17 10:52:33 +08:00
Tomek Cejner
f0cddd21fd Swift3 Clener template of client methods (#4552)
* Swift3 template properly uploads files, making mustache template little cleaner

* [swift3] moved URL parameter encoder helper function to APIHelper.swift

* Swift3 - regenerated sample
2017-01-16 01:01:50 +08:00
Gene Chang
95987fc132 Added support for datetime query parameters in cpprest (#4556)
* Added support for datetime query parameters in cpprest

Signed-off-by: Gene Chang <gene.chang@anyconnect.com>

* Update petstore sample app for cpprest using bin/cpprest-petstore.sh

Signed-off-by: Gene Chang <gene.chang@anyconnect.com>
2017-01-14 00:07:06 +08:00
Richard Naeve
2e7e25801d Issue 4531 (#4539)
* ISSUE-4531
Arrays are now serialized according to the different collection formats. All api classes are also exported in a const array to make handling of large api libraries easier.

* Added petstore samples

* Fixed indentations and coding style
2017-01-13 23:41:54 +08:00
Bartek Kryza
0fb154e9a2 [Bash] Bash client script generator (#4541)
* Initial commit

* Remormatted petstore tests

* Added Bash codegen to main README.md

* Added bash to integration tests

* Fixed stdin detection in generated script

* Added back ruby module
2017-01-12 16:48:25 +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
Krisztian Lachata
c1f854f7da Overriden objectmapper wasn't used in deserialisation (Scala) issue #4532 (#4534)
* Overriden objectmapper wasn't used in deserialisation

Use previously provided apiInvoker instead of creating a instance at deserialision stage

* update scala sample
2017-01-11 00:27:48 +08:00
Tomek Cejner
1e8c7180c5 [swift3] allow POST with both body and query parameters (#4490)
* [swift3] allow POST with both body and query parameters

* Correctly support non-string and optional query parameters.
2017-01-07 22:40:07 +08:00
Kevin Locke
409e1a504c Fix Gson parsing of Joda DateTime without millis (#4473)
* Fix Gson parsing of Joda DateTime without millis

The DateTimeFormatter returned by ISODateTimeFormat.dateTime() only
parses dates with millisecond values, and throws
IllegalArgumentException when milliseconds are not present.  The
date-time construct from RFC 3339 Section 5.6 referenced by the
Swagger/OpenAPI spec allows fractional second values to be omitted.
This results in valid date-time values being rejected by the generated
code.

This commit fixes the problem by using .dateOptionalTimeParser() for
parsing, which correctly handles date-time values without fractional
seconds.  A previous version of this commit used .dateTimeParser(),
which accepted a time without a date and was considered too liberal.
Note that .dateTime() must still be used for printing, which is not
supported by .dateTimeParser().

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

* Fix akka-scala date-time parser with Joda

As in the previous commit, which fixed Java generators,
ISOISODateTimeFormat.dateOptionalTimeParser() should be used for
date-time parsing and ISOISODateTimeFormat.dateTime() for printing.
Apply the same change to akka-scala.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2017-01-07 21:56:14 +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
Takuro Wada
6a080d3a0c add safe argument to quote method in python template to avoid unquoted parameter in path parameter (#4457)
Closes #4391
2017-01-06 00:55:55 +08:00
Gayathri Sharma
4452fdbc02 Resteasy changes 2016-12-27 21:33:27 -06:00
Anton Vasin
41701a15b0 Fix typo. Creactor -> Creator (#4443) 2016-12-22 23:08:06 +08:00
Ezekiel Templin
e189388371 [Ruby] Add Rakefile and Gemfile (#4448)
* Add Rakefile, Gemfile, and update client generator

* Update sample
2016-12-22 21:37:12 +08:00
wing328
204c05442d [ObjC] minor code style enhancement to ObjC API client (#4437)
* minor code style enhancement to objc api client

* update petstore sample

* remove datatype from docstring (objc)
2016-12-20 19:13:03 +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
Vincent Giersch
7f980cd9dd fix(swift3): lowercase enum value before checking reserved words (#4357)
Signed-off-by: Vincent Giersch <vincent@giersch.fr>
2016-12-20 16:35:03 +08:00
Greg Rashkevitch
36b97c22af Fix warning docs return type (#4429)
* Objective C: Fix compilation warnings

If returnType is not provided, set the @return as void

* Run the `./bin/objc-petstore.sh`

* OBJECTIVE C SDK: Remove the return line for methods that return nothing all together

* obj-c sdk: Updated petstore sample
2016-12-20 16:10:47 +08:00
Johan Nystrom
ff70105484 Fix CSV collection parameter issues for scalatra server (#4426)
* Fix scalatra handling of CSV query parameters

* Ran petstore for scalatra server
2016-12-20 16:02:45 +08:00
wing328
43ff85db76 Merge pull request #4421 from wing328/fix_isfile_boolean
Fix `isPrimitiveType` for file property
2016-12-20 15:48:55 +08:00
wing328
7fd895b37d fix isPrimitiveType for file 2016-12-18 19:02:26 +08:00
wing328
8ccf9828e4 [Python] add hasConsumes/hasProduces to Python API template (#4419)
* add hasConsumes/hasProduces to python api template

* remove unused code in python

* fix isFile in the api doc (python)
2016-12-18 17:20:10 +08:00
Hamed Ramezanian Nik
6af43dc720 [csharp] Escape special characters in the API doc (#4183)
Special characters like <> should be HTML escaped.
2016-12-16 19:07:00 +08:00
wing328
ffbead3f9d Merge branch 'master' into typescript-angular2-build-to-dist-folder 2016-12-15 21:40:48 +08:00
wing328
131cbeb350 remove generation timestamp 2016-12-15 19:34:15 +08:00
wing328
7fc8b24001 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-12-15 00:42:51 +08:00
wing328
f63d962258 update ts angular2 sample 2016-12-15 00:42:08 +08:00
wing328
7b7e5e25ee Merge branch 'angular2-standalone-enums-support' of https://github.com/SamuelBeliveau/swagger-codegen into SamuelBeliveau-angular2-standalone-enums-support 2016-12-15 00:09:34 +08:00
wing328
a143e9c10c add int/long check for @min/@max in java model (#4395) 2016-12-14 22:21:52 +08:00
lukoyanov
a13dee7167 [Java] Play! Framework 2.4 WS client support + retrofit2 (#4270)
* implemented core integration with play 2.4 ws

* added shell script to test on CI

* added shell script to composite file for all java generators

* added some comments
changed promise param to Response<T> to allow access to http status code and raw response if needed

* removed unnecessary whitespace changes

* added java7 compatibility, play ws deps to pom.xml

* added generated play24 client

* fixed imports
2016-12-14 17:32:49 +08:00
Chris Putnam
4fa3595a41 [typescript-angular2] Fix syntax error (#4383)
* allow function so access token can be derived for each api call

* update tests

* update type for accessToken to be string or function that returns string

* fix syntax error
2016-12-14 11:50:02 +08:00
wing328
dbb66af73d [C#] Add auto-generated doc for c# 2.0 generator (#4354)
* add auto-generated doc for c# 2.0 generator

* update readme for c# 2.0

* update readme

* update namespace in the doc
2016-12-14 11:49:15 +08:00
wing328
a291d3113a [Android] better code format for Android (volley) API client (#4384)
* better code format for android volley

* better code format for apiinvoker, add docstring

* use 2-space indentation for pair class

* use 2 spaces indentation for other classes in android
2016-12-14 00:40:21 +08:00
Dan Wilson
e55664cdc9 Remove invalid code from mustache for arrays. (#4266)
Rewrite ParameterToString to handle other slice types other than just string.
2016-12-13 16:13:06 +08:00
wing328
5818f2c882 [C++] better code format for cpprest templates (#4379)
* replace tab with 4-space in cpprest templates

* remove trailing whitespaces from templates

* fix code indentation in cpprest templates

* remove empty block in cpprest templates
2016-12-13 16:09:56 +08:00
Scott Richter
da9d64d053 Fix for issue #4370 - Cpprest does not set Content-Type header on POST requests. (#4374)
* Fixed cpprest generator to include Content-Type header in requests.

* Fixing indent to use spaces.
2016-12-13 15:01:47 +08:00
Chris Putnam
0b5a6f25da [typescript-angular2] access token function (#4361)
* allow function so access token can be derived for each api call

* update tests

* update type for accessToken to be string or function that returns string
2016-12-13 00:39:09 +08:00
wing328
62aabfc6c1 Merge branch 'jfiala-beanval_2549' 2016-12-13 00:05:03 +08:00
Frederick Cai
8e200970d4 [typescript-angular2] build to dist folder 2016-12-11 23:39:18 +13:00
Vlad Frolov
4d2a13018b [Python] Make the code look Pythonic (#4352) 2016-12-09 17:26:23 +08:00
Jens Oberender
c3571b28a5 Some code cleanings of problems reported by SonarQube. (#4324)
* Some code cleanings of problems reported by SonarQube.

* Updated changes to the petshop sample.
2016-12-09 15:55:33 +08:00
wing328
a0f2b235f1 [C#] fix build.sh for PropertyChanged feature in C# API client (#4349)
* fix build.sh for PropertyChange in C#

* add new csharp files

* manual fix to enum ref in c# client
2016-12-09 00:03:38 +08:00
wing328
af2db27a83 remove trailing space in ts fetech api, add npm test to ci (#4348) 2016-12-08 18:09:20 +08:00
Christopher Chiche
a3d3082105 [Typescript/Fetch] Fix tslint issues in generated code (#4313)
* [Typescript/Fetch] Fix tslint issues in generated code

* Add security generated files.

* Use tslint version that doesn't require typescript 2

* Run build scripts
2016-12-08 16:01:50 +08:00
wing328
162352cb4b Fix maximum, minimum for Integer (#4335)
* fix int/long max, min value (removing decimal)

* fix integer min/max in parameter
2016-12-07 19:29:36 +08:00
Alvin
b7984e55a7 [Swift3][bug#4318] Bug when handling java date (#4332)
* fix bug #4318

* swift3 samples update
2016-12-07 17:58:21 +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
Sebastian Haas
648f8df235 Fix for missing headers (#4328)
* Fix for  #4322

Signed-off-by: Sebastian Haas <sebastian@haas.tech>

* Run typescript-angular2-petstore.sh

Signed-off-by: Sebastian Haas <sebastian@haas.tech>

* Run typescript-angular2-petstore.sh

Signed-off-by: Sebastian Haas <sebastian@haas.tech>
2016-12-06 23:59:59 +08:00
Samuel Beliveau
964a9a9696 Support for standalone enums in Typescript-Angular2
Improved typescript primitive detection for tagging type with models namespace
2016-12-02 10:24:32 -05:00
wing328
31d31b9466 [Ruby] use hasConsumes, hasProduces in ruby client (#4310)
* use hasConsumes, hasProduces in ruby client

* add new ruby files
2016-12-02 17:22:46 +08:00
wing328
87cb779fd4 [Typscript][Angular2] Remove tab in TS Angular2 template (#4294)
* remove tab in ts angular2 template

* update petstore sample after basing on master
2016-12-01 19:09:22 +08:00
wing328
c6aea46fa0 fix import in sample code (dart) (#4292) 2016-11-30 18:30:30 +08:00
wing328
a603ccb595 [Dart] add auto-generated documentation (#4291)
* new files for dart client

* update doc for dart

* update api and model doc for dart

* update dart petstore sample

* update dart doc

* update dart petstore sample

* update dart petstore sample

* update dart client installation instruction
2016-11-30 17:41:55 +08:00
Christopher Chiche
b733334eee [Typescript/fetch][Issue4284] Handle query parameters containing colons (#4287)
Put query parameters between quotes and access object keys using square
brackets to make sure special characters are handled in parameter
names.
Closes #4284
2016-11-30 15:22:38 +08:00
wing328
1925928efa Merge pull request #4038 from alechill/4025-typescript-fecth-request-options
[TYPESCRIPT] Support passing custom RequestInit options in typescript-fetch client…
2016-11-29 22:32:03 +08:00
ChrisJamesC
e7397d208e Fix linting issues
Add missing semicolons and remove trailing space in generated code.
2016-11-28 16:48:30 +01: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
Daniel
c15743bfe6 Issue4254 (#4255)
* Issue 4254 - Added mechanism for cache bursting

* Issue 4254 - Updated petstore samples
2016-11-25 00:14:59 +08:00
wing328
5f372ef15e Merge pull request #4219 from jordanyaker/master
fix(javascript): add check to see if the parsed response is really empty.
2016-11-23 17:23:52 +08:00
menchauser
6ebc2fc051 Fix support for 'class' properties in Java codegen (#4237)
* Fix support for 'class' properties in Java codegen

Currently Java codegen works successfully for property named 'class' but
fails on '_class', '__class', etc, because of 'Object.getClass()'
overloading.

This fix is intended to avoid all Object method overloading cases.

* Regenerated samples for Java petstore-security-test
2016-11-23 00:18:40 +08:00
wing328
4e2c037e21 [Java] fix Java (Jersey1.x) test case (#4239)
* fix java jersey 1 test case

* fix test for java jersey2.x api client
2016-11-23 00:16:28 +08:00
wing328
58b66a0b0a python code style enhancement (#4238) 2016-11-22 23:01:41 +08:00
Ewan Mellor
9dc809bdc7 Add two override points inside AlamofireRequestBuilder in the Swift 3 template. (#4170)
* Add two override points inside AlamofireRequestBuilder in the Swift 3 template.

These allow the caller to control the request configuration (e.g.
to override the cache policy) and to control the Content-Type that is
given to an uploaded form part.

* Regenerate with ./bin/swift3-petstore-all.sh to match recent changes.

This includes a few minor changes that weren't made in this branch, so this
apparently wasn't run on master after some other recent changes.
2016-11-22 00:19:17 +08:00
Martin McWhorter
515e723fae Allow TypeScript noImplicitAny: true (#4205)
* Allow TypeScript noImplicitAny: true

* Update typescript-angular2 examples
2016-11-21 19:39:07 +08:00
szakrewsky
76965594b9 Issue #2449 SubClass annotations are missing from the base class (#4085)
* petstore up to latest

* Issue #2449 SubClass annotations are missing from the base class

* include child in all its super types
2016-11-21 17:03:26 +08:00
wing328
6ad38874c5 [ObjC] version update for ISO8601 (#4220)
* remove php apache license

* update iso8601 version for objc client
2016-11-21 00:43:41 +08:00
Jordan Yaker
5a2ec03549 fix(javascript): added check to see if the parsed response is really empty. 2016-11-19 15:06:36 -05:00
wing328
4ae3e57932 Merge branch 'beanval_2549' of https://github.com/jfiala/swagger-codegen into jfiala-beanval_2549 2016-11-19 16:39:31 +08:00
jfiala
b02d505ad9 Refine CXF Add Spring Annotation-Config + Jboss flag for CXF/Resteasy + fix OuterEnum (#4164)
* add json annotations

* add cli flag to check for jaxb annotations

* add CLI-flag for switching Spring-XML or annotation config #4088

* add cli flag for generating jboss depl. descriptor #4088

* add JbossFeature CLI flag to Resteasy #4088

* update/add tests #4088

* cleanup tabs #4088

* improve api formatting #4088

* refine formatting #4088

* refine formatting again #4088

* add separate CLI-flags for controlling junit test features #4088

* add json annotations

* add cli flag to check for jaxb annotations

* add CLI-flag for switching Spring-XML or annotation config #4088

* add cli flag for generating jboss depl. descriptor #4088

* add JbossFeature CLI flag to Resteasy #4088

* update/add tests #4088

* cleanup tabs #4088

* improve api formatting #4088

* refine formatting #4088

* refine formatting again #4088

* add separate CLI-flags for controlling junit test features #4088

* add check for void methods + assertNotNull(response) #4088

* add spaces for @Produces #4088

* allow build with no web.xml config #4088

* comment invocations of tests #4088

* update petstore sample jaxrs-cxf server with gen/java first #4088

* re-generate jaxrs-cxf with src/gen/java #4088

* add client jaxrs-cxf #4088

* add switch to load SwaggerUI automatically #4088

* update to CXF 3.1.8 including supportSwaggerUi flag #4088

* update to cxf 3.1.8 and swagger-core 1.5.10 #4088

* update generated petstore for jaxrs-cxf #4088

* change Spring Boot urls to root #4088

* fix spring xml config #4088

* fix external enum usage for jaxrs-cxf #4160

* cleanup jaxrs-annotations in impl class

* fix handling of multiparts #4088

* fix @Min/@Max comments in beanValidationQueryParams #4088

* add swagger-codegen-ignore file+add src/test/resources #4088

* add cli-flag for produces/consumes json in api #4088

* add test case for outerEnum #4160
2016-11-19 16:09:13 +08:00
Chester Husk III
7a7eb113b3 address unused parameters and possible-nullity warnings (#4210)
* address unused parameters and possible-nullity warnings that newer versions of typescript give for this file

* update example generated clients using the new nullability code
2016-11-19 15:50:22 +08:00
wing328
cde24f1113 Merge pull request #4189 from cbornet/spring_cloud_operations
[Spring] Use tag operation grouping for spring-cloud
2016-11-18 16:51:36 +08:00
Vincent Giersch
9e08b637ec fix(swift3): rename reserved enum values (#4201)
Example:
- case public = "public"
+ case _public = "public"

Signed-off-by: Vincent Giersch <vincent@giersch.fr>
2016-11-18 14:21:17 +08:00
Herman Schistad
2dafdffce5 Allow multiple requests in parallel in Python client (#4187)
* Allow multiple requests in parallel in Python client

If you tried to do two parallel calls to the same API object in the
Python client you would get an error from urllib3 connection pool:

  Connection pool is full, discarding connection: ***

Because the default maxsize=1:
f9409436f8/urllib3/connectionpool.py (L162)

By defaulting to a higher maxsize we mitigate for the common use case
where a user is running a couple of requests in parallel.

Ideally, in the future, this should be a configuration paramater
together with the pool size.

* Add sample code after changing maxsize
2016-11-18 13:38:32 +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
39ffc0ae62 [Ruby] remove apache2 license from ruby api client (#4149)
* remove apache2 license from ruby api client

* remove license from gem spec
2016-11-16 16:38:15 +08:00
cbornet
4a196a9187 [Spring] Use tag operation grouping for spring-cloud
Instead of basepath based grouping that is used by Spring boot/MVC
2016-11-15 18:46:48 +01:00
wing328
97924c78a0 update objc samples 2016-11-15 16:16:20 +08:00
wing328
07bec36deb [ObjC] AFNetworking pinnedCertificates API usage fix (#4143)
* Fixed afnetworking API usage: pinnedCertificates now declared as NSSet, not as NSArray

* Petstore updated
2016-11-15 16:10:19 +08:00
jfiala
a7252e7560 update check for performBeanValidation #2549 2016-11-12 23:31:49 +01:00
jfiala
9d8c419698 update generated petstore for ok-http-gson #2549 2016-11-12 23:20:03 +01:00
mbohlool
876669cd31 [Python] Add support for request timeout (#4173)
* [Python] Add support for request timeout

* Update python petstore api

* [Python] Add test for request timeout
2016-11-11 23:48:53 +08:00
Chakrit Wichian
f6a02f4339 [ruby] Make sure super is always called for ApiError class. (#4168)
* [ruby] Make sure super is always called for ApiError class.

* Add test for Petstore::ApiError
2016-11-11 17:39:45 +08:00
mbohlool
cfd8add825 Add test for _preload_content flag 2016-11-10 14:24:06 -08:00
mbohlool
ba9e449fd4 Support _preload_content flag in python client (#4166)
* Modify python client templates to support _preload_content flag

* Update python petstore
2016-11-10 23:43:32 +08:00
Anton WIMMER
6d6cfb4984 fix[dart]: send ISO8601 dates 2016-11-08 14:29:27 +01:00
Roman Truba
73276fd63a Merge branch 'master' into afnetworking-pinned-certificates-fix 2016-11-08 15:48:46 +03:00
wing328
935bdfe628 better handling of */* 2016-11-08 16:17:51 +08:00
mbohlool
37460ee833 Select application/json content-type in python generated client, if */* is in the list of content-types 2016-11-07 11:54:01 -08:00
Roman Truba
a1cd01916e [ObjC] Fix deprecated JSONModel API usage (#4133)
* Fixed deprecated usage -[JSONKeyMapper initWithDictionary:]

* Petstore regenerated

* Change minimal required version of JSONModel
2016-11-07 23:47:09 +08:00
Roman Truba
0c7ab63912 Petstore updated 2016-11-05 22:11:09 +03:00
keysolutions
ab9ea5b2c3 Add constructFromObject to Javascript enum generation. (#4120)
* Add constructFromObject to Javascript enum generation.

Generated code calls constructFromObject on enum types, but enum did not define the necessary function. Returns the value of the enum.

* Update Petstore JS API client
2016-11-05 23:14:48 +08:00
Roman Truba
1a2b345c57 [Obj-c] Generated code documentation fixes (#4130)
* Fixed missing parameters names for obj-c generated code

* Obj-c sample regenerated
2016-11-05 23:13:51 +08:00
Christophe Bornet
901a981f26 [feign] Use feign-form (#4124)
* [feign] Use feign-form

Fix #4108

* [feign] Convert java.util.Date params to rfc3339 with an Expander
2016-11-04 21:13:18 +08:00
ircecho
51b941cf88 DART: Removed the 'justIgnoreThisFlag' flag (#4116)
* feat[dart]: remove unused argument 'justIgnoreThisFlag'

* chore[dart]: petstore rebuild
2016-11-04 19:17:23 +08:00
Hamed R. Nik
af4b32178f [ruby] Validate array correctly
It never throws error with any values in array. Every element should be validated against the enum.
2016-11-03 17:03:48 +00:00
wing328
4eb75f8088 add back setter to spring model (readonly attr) 2016-11-02 15:40:00 +08:00
wing328
5c0ce022e9 update dart intl version 2016-11-02 11:17:04 +08:00
sutdisi
819a8648d5 Jersey2 Patch Support (#4110)
* Fix for issue 2848 Adding support for PATH in jersey2

* Updating petstore sample for PATCH update
2016-11-02 09:43:29 +08:00
wing328
0eaab90ba5 Merge branch 'retrofit2-vendor-mime-type' of https://github.com/Rajmohan/swagger-codegen into Rajmohan-retrofit2-vendor-mime-type 2016-11-01 21:40:22 +08:00
Cliffano Subagio
5c53513a30 [python] Add packageUrl option, replacing infoUrl in setup.py (#4101)
* [python] Add packageUrl option, replacing infoUrl in setup.py .

* [python] Regenerate Python petstore sample.

* [python] Regenerate Python petstore security test sample.
2016-11-01 18:21:53 +08:00
Maciej
c2780abd70 fixing issue#4037 - ts ng2 response type is always json (#4060)
* fixing issue#4037 - default response is always json

* updated documentation for new method

* updated comment for new method
2016-11-01 17:02:40 +08:00
wing328
e230ef9f50 Merge pull request #4072 from cbornet/spring_response_wrappers
[spring] add an option to choose the response wrapper type
2016-11-01 16:41:07 +08:00
Robert Biehl
6963bf8748 [Swift] Swift3 inheritance support (#4052)
* Swift3 inheritance support

* Mode inheritance support
* Handle 204 No Content without crashing
* Added some new reserved words for Swift (Error, URL)

* Update swift3 pet store example

* PR feedback fixes

* removed unnecessary newline from Models.swift
* removed unnecessary code comments
* ~~public~~ open

* Typo

* Fix review feedback

* fixed comment
2016-11-01 16:25:43 +08:00
cbornet
21ec2bc866 [spring] add an option to choose the response wrapper type
Also generate the spring-cloud sample with a HystrixCommand wrapper
2016-10-25 15:40:51 +02:00
wing328
aa46aca7cf update JS petstore samples 2016-10-25 16:52:32 +08:00
Mathieu MARACHE
8bee0de4e9 [Qt5/C++] Arrays of primitive types fix (#4046)
* Corrects issue #3410 when trying to create Arrays of primitive types

* Use c++11 nullptr keyword and various indentation issues resolved

* ran petstore on new mustaches
2016-10-22 22:58:39 +08:00
wing328
d1eca76974 add test for java6 jersey2 client 2016-10-20 11:12:31 +08:00
raj k
23fee386f2 Vendor Mime-type support in retrofit2 2016-10-19 16:19:41 -07:00
Alec Hill
41a7aaffcc Support passing custom RequestInit options in typescript-fetch client, to enable fetch API specific options (eg including credentials, enabling CORS etc) 2016-10-19 18:03:58 +02:00
wing328
bbb0cdc8c3 update gitignore to include PetStore.pro.user 2016-10-19 16:43:11 +08:00
wing328
7f36dd7852 increase timeout value for qt5 petstore test 2016-10-19 16:34:26 +08:00
wing328
702344ed75 better handling of reserved words for sintatra, dart 2016-10-18 17:58:19 +08:00
Jim Schubert
689da8f915 [csharp] Fix apiPackage,modelPackage,excludeTests (#4010)
* [csharp] Fix apiPackage,modelPackage,excludeTests

The apiPackage, modelPackage, and excludeTests values were not being
populated correctly from external configs (passing -c filename to
generator).

This commit allows those properties to work correctly with the Csharp
client generator. Previously the Api and Model namespaces were hard
coded after additionalProperties for these were evaluated.

The files which generate test files for models and api classes
didn't honor the excludeTests option.

* [csharp] Regenerate sample

* [csharp] Fix modelPackage in README template
2016-10-17 16:26:28 +08:00
wing328
2075204950 Merge pull request #4005 from wing328/ts_fix_header
[Typescript][Fetch] fix header parameters in TS Fetch API client
2016-10-16 15:43:25 +08:00
wing328
5719307799 Merge pull request #4004 from cbornet/spring_templates
Fix issues in spring templates
2016-10-16 15:33:38 +08:00
wing328
5a5d3fd5e5 fix header parameter in ts fetch 2016-10-16 15:27:11 +08:00
Ragnis Armus
dee2dd8d36 [Qt5 C++] Replace illegal characters in param names for Qt5 generator (#3978)
* Fix illegal characters in param names

* Re-generate the petstore sample
2016-10-15 18:23:36 +08:00
cbornet
12a0fd6471 fix issues in spring templates
Wrong indentation and extra lines in api templates
Java8 default methods are used if dateLibrary is java8

Fix #3408
2016-10-14 17:57:20 +02:00
Max Stoliar
0838523a35 [Swift] Adding Swift3 generator
* This address #3788
* Contains all changes made in #3823
* Also contains many changes made by @ewanmellor, thanks!
2016-10-14 18:32:47 +03:00
wing328
03ed192b98 [Android] fix URL encoding for Android API client (#3992)
* fix url encoding for android

* add exception handling for url encoding in android
2016-10-14 11:12:37 +08:00
wing328
7bbe3dcb53 Merge pull request #3982 from wing328/ruby_check_required_attr
[Ruby] fix required property check in Ruby models
2016-10-13 23:25:58 +08:00
wing328
47c387470c fix required prop check for ruby client 2016-10-13 16:38:39 +08:00
wing328
d0f3cd642d fix missing () in python doc 2016-10-13 15:28:11 +08:00
Hamed Ramezanian
34f1e36146 Sanitize tuples properly (#3949)
* Sanitize tuples properly
In Python, Tuples are fixed size in nature whereas lists are dynamic. So
they should be sanitize as same as lists.
Failure case here is when you have a query or post parameter as
Datetime.

* Update the Petstore sample

* Skip file sanitization

* Return tuple instead of list

* Sanitize all tuples, no exceptions
2016-10-13 14:41:40 +08:00
wing328
59502bb92b Merge pull request #3963 from olivervidovic/issue-890
issue-890 correct fix for deprecated Jersey method
2016-10-12 16:05:09 +08:00
wing328
47d3c3a767 update retrofit1,2 samples 2016-10-12 15:48:34 +08:00
wing328
a276c51cd8 Merge branch 'master' of https://github.com/punksta/swagger-codegen into punksta-master 2016-10-12 15:46:22 +08:00
Oliver Vidovic
da6e829c8e issue-890 correct fix for deprecated Jersey method
additionally
- fixed EnumValueTest to the directory structure based on the declared package
- regenerated samples/client/java/jersey1
2016-10-11 11:43:54 -04:00
Christophe Bornet
2680995825 [Java/Jackson] use a jdk6 compatible DateFormat for java.util.Date (#3768)
* [feign] use a jdk6 compatible serializer for java.util.Date

See #3727

Fix #3753

* [jersey] use a jdk6 compatible DateFormat for java.util.Date
2016-10-11 00:42:52 +08:00
Stas Shakirov
26faf6cf4e remove newline char in *.mustache; added generated code 2016-10-10 14:42:08 +03:00
Andreas Franzén
d21613c6ab Bugfix/3929 do not set multipart (#3932)
* Do not set Content-Type to multipart/form-data
It causes superagent to not add the boundary in the Content-Type

* Run shell-scripts
2016-10-08 12:36:56 +08:00