Commit Graph

4306 Commits

Author SHA1 Message Date
wing328
cd6b5fec20 [Android][Volley] add serializeModel support to Android (#3933)
* add serializeModel support to Android

* add test for new android option
2016-10-06 17:35:33 +08:00
wing328
6ef0209dea add back java okhttp petstore client 2016-10-05 22:55:01 +08:00
wing328
8ce8082f7f fix bug with parcelable 2016-10-05 22:54:17 +08:00
Griffin Schneider
0844496bad [Java] Fix bug in generated code if parcelableModel and serializableModel are both true. 2016-10-05 22:53:05 +08:00
Griffin Schneider
1aeceead99 [Java] Make generated models Parcelable for okhttp-gson if the -DparcelableModel=true option is provided. 2016-10-05 22:53:05 +08:00
wing328
677f5f913f Merge pull request #3909 from apanzerj/apanzerj/fixupRails5Server
WIP: Fixup rails5 server
2016-10-05 01:16:47 +08:00
Adam Panzer
2aadbee8ed
validate(s)_presence_of
Migration should create pluralized table names
Change controller filenames
2016-10-03 14:47:01 -07:00
wing328
00cc060827 Merge pull request #3637 from cbornet/fix_multi_inheritance
[All] Fix some inheritance/composition issues and add allOf unit tests
2016-10-03 23:18:43 +08:00
wing328
1840956320 Merge pull request #3913 from wing328/python_flask_no_tags
[Python][Flask] fix python flask controller issue without tag
2016-10-03 09:56:49 +08:00
wing328
4a74e788ec fix python flask controller without tag (default_controller) 2016-10-03 09:32:20 +08:00
Jim Schubert
b7708a44bf [aspnet5] Fix basePath application to operations (#3911)
* [aspnet5] Fix basePath application to operations

* [aspnet5] Regenerate sample
2016-10-02 21:56:19 +08:00
Bartek Kryza
40a1879797 Bugfix/issue 3723 (#3726)
* Extended request generation logic with support for serialized body content types other than Json

* Updated the Petstore Python client tests

* Fixed body content type identification for strings
2016-10-02 17:02:03 +08:00
Charles
d4f9a16cf6 Cgardens nested object regex (#3879)
* stop parsing key of object at first comma.

* update samples
2016-10-02 16:32:17 +08:00
Scott Richter
b2e2643fd2 [Cpprest] Fixing issue #3773 (#3876)
* Fixed errors with cpprest client generation when generating a client that uses arrays of primitive types (vector) and file responses (HttpContent).

* Updated the petstore sample using script.

* Removed debug code.

* Removed extra newline to match master.

* Fixed binary file handling in cpprest. Updated petstore samples.

* Update readme to add Cummins to list

* Cleaning up for pull. Removing unnecessary changes.

* Fixing petstore

* Fixing error in build.

* Fixed error in stream copy for binary data

* Replaced tab with 4 spaces in all modified files.

Replaced tab with 4 spaces in all modified files.
2016-09-30 10:31:24 +08:00
Alex Nolasco
07df71e959 Issue#3829. Objective-C client code, discriminator generated in both base and child. 2016-09-29 09:28:44 -04:00
wing328
f59c28d08a escape callback parameter for java(okhttp) and python 2016-09-29 17:41:47 +08:00
Dalibor Karlović
19f1c7e095 feature(PHP QA) add initial PHP client template tweaks to improve emitted code quality 2016-09-29 08:48:24 +02:00
wing328
a7ed1ad202 fix warning in html generator 2016-09-29 11:09:54 +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
wing328
ec25bd793f [Java] Remove duplicated model description in Spring, JAX-RS models (#3887)
* fix duplicated description in spring model

* fix duplicated description in jaxrs models

* fix resteasy dependency
2016-09-28 19:34:38 +08:00
Dalibor Karlović
70fa2fb78e [PHP] Better PSR2 compatibility (#3863)
* feature(php-cs-fixer) add php-cs-fixer support

* feature(php-cs-fixer) tweak Mustache templates to fit PSR2

* feature(php-cs-fixer) bin/php-petstore.sh output
2016-09-27 08:23:44 +08:00
Jason Gavris
9e54dce92f [Swift] Use thread safe manager dictionary 2016-09-26 11:27:07 -04:00
wing328
fa12cd3787 Replace ^M with new line (\r) in mustache template (#3865)
* fix jaxrs line break

* fix java gradle bat line break

* fix scala gradle line break

* fix undertow crt line break

* fix spring line break

* fix undertow line break in pom

* rollback undertwo petstore to use petstore.yaml
2016-09-26 16:49:44 +08:00
wing328
bee27aee9b [swfit] fix url param with base name 2016-09-26 11:01:02 +08:00
Yuta HIGUCHI
2155b7b09e [JaxRS]Show correct default value on CLI option description (#3862)
* Show correct default value on CLI option description

Fixes #3861

* Changes after ./bin/jaxrs-petstore-server.sh
2016-09-24 15:11:15 +08:00
David Biesack
fedb0cc352 add title, description to HTML output (#3860)
* add schema title, description to HTML output

* Include title, description in petstore sample (and HTML output)
2016-09-24 11:14:36 +08:00
wing328
dce532e8c7 fix trailing comma in go api client 2016-09-24 00:57:01 +08:00
wing328
f47208a75b Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-09-24 00:17:54 +08:00
wing328
110c22ea98 Merge branch 'issue-3690-additional-fields' of https://github.com/neilotoole/swagger-codegen into neilotoole-issue-3690-additional-fields 2016-09-24 00:17:18 +08:00
wing328
d1c1c9d08f fix typescript-fetch base path by removing ending slash 2016-09-23 19:12:40 +08:00
Kamil
9301db60e6 redundant quotation mark (#3837)
* Removed redundant quotation mark

This additional quotation mark is causing problems in out project and should be removed.

ngrep output:
```
Content-Disposition: form-data; name="file"; filename="file""
  ..Content-Transfer-Encoding: binary..Content-Type: image/jpg..Content-Length: 27855..........JFIF....
```

* updated petstore sample

* removed line break
2016-09-23 18:33:27 +08:00
Sergii Rustamov
fee23f2230 Support cpprest on Linux (#3847)
* Support cpprest on Linux

* Update petstore code
2016-09-23 18:32:33 +08:00
wing328
569997b073 Merge pull request #3853 from mattalexx/proposed
Fix custom generator execution example in README template
2016-09-23 13:27:38 +08:00
Matt Alexander
12fb4becd7 Fix custom generator execution example 2016-09-22 14:36:08 -05:00
wing328
e3b891a924 Merge pull request #3850 from wing328/fix_swift_pod_file
[Swift] add default value to swift podspec
2016-09-22 19:26:24 +08:00
Kim Sondrup
9bb097fcf5 [PHP] Correct Composer license identifier (#3848)
* [PHP] Correct Composer license identifier

* Update petstore PHP
2016-09-22 18:49:08 +08:00
wing328
70ed52cee0 add default value to swift podspec 2016-09-22 18:41:53 +08:00
wing328
d11c7ad09a fix typescript angular2 model - optional/required 2016-09-21 20:08:27 +08:00
Cédric Luthi
72058c2638 Fix NullPointerException when the oauth flow is missing 2016-09-21 00:48:16 +02:00
wing328
6ac5a2c306 Merge pull request #3825 from wienczny/tripleMustacheExtraAnnotation
Use triple mustache for vendorExtensions.extraAnnotation
2016-09-20 21:12:16 +08:00
wing328
f69d1500c3 [Python][Flask] use tags to organize Python Flask controllers (#3767)
* use tag to organize flask controller

* fix typo in python flask code gen

* fix operationId for flask generator
2016-09-20 21:11:06 +08:00
Steve Hu
d74a1fbed4 Add a new language generator for undertow-server framework (#3820)
* add undertow generator

* add apiException

* add undertow server code gen

* reovery sprintboot sample

* update handler

* output swagger.json and handler template change

* remove api template

* remove api.mustache

* update pom.xml

* update readme

* add config files

* add basePath to the handler and upgrade to 0.1.1 framework

* add additional files for release

* fixed the mvn verify issue

* update one template to fix compile error for fake petstore
2016-09-19 22:45:10 +08:00
Stephan Wienczny
e96b177305 Use triple mustache for vendorExtensions.extraAnnotation
Triple mustache is required because annotations may contain chars like "=" that
would be mistakenly encoded.
2016-09-19 16:24:51 +02:00
wing328
1d748e47da fix copmile for C# model annotation 2016-09-19 16:25:47 +08:00
wing328
1be134facf Merge branch 'csharp/property-validations' of https://github.com/jimschubert/swagger-codegen into jimschubert-csharp/property-validations 2016-09-19 15:19:58 +08:00
wing328
76d3ec9be2 Merge pull request #3801 from richardfriedman/issue-3800
[jmeter] #3800 Fixing testCases and paramName
2016-09-19 11:50:47 +08:00
wing328
f41a3b82a9 Merge pull request #3809 from j4velin/master
Fix NullPointerException if there are no other properties
2016-09-19 11:44:14 +08:00
Anton Savchenko
945c9a1406 [typescript-angular2] npm publish missing files (#3791)
* [typescript-angular2] npm publish missing files

* [typescript-angular2] build to dist folder
2016-09-19 10:41:29 +08:00
Thomas Hoffmann
61bd023e3d Fix NullPointerException if there are no other properties
Change-Id: I6711e96d4b119b2cf78860d4eb43fc178edae372
2016-09-16 12:36:59 +02:00
geetikagupta16
1e4f30eb16 Fixed bug for handling optional header parameters (#3776)
* Fixed #3774
Refactored code to handle optional header parameters.

* Changed null check with pattern matching
2016-09-15 23:28:01 +08:00
timadamson
fe7acabc4b add authentication to typescript-angular2 (#3781)
* add authentication to typescript-angular2

* updated typescript-angular2 petstore example

* update typescript-angular2 with simplified conditionals
2016-09-15 00:35:14 +08:00
Richard Friedman
5aff601eac [jmeter] #3800 Fixing testCases and paramName 2016-09-14 12:25:39 -04:00
cbornet
b7f2b28534 [resteasy] configure jackson to use rfc3339 dates 2016-09-14 17:37:04 +02:00
wing328
e6049d6d30 Merge pull request #3797 from xaviapa/bugfix/issue-3783
Added !is_null condition in setter conditions for non-required proper…
2016-09-14 20:54:05 +08:00
Xavi Aparicio
31a3436a8e Added !is_null condition in setter conditions for non-required properties 2016-09-14 13:41:05 +02:00
cbornet
1b1fe95855 [jersey] configure jackson to use rfc3339 dates 2016-09-14 12:17:33 +02:00
wing328
19047c2eec [C#] fix the location of FodyWeavers.xml (#3782)
* fix fody weavers xml location

* update c# petstore sample
2016-09-13 18:05:42 +08:00
wing328
e14cf8a526 Merge branch 'csharp_fix_enum' of https://github.com/wing328/swagger-codegen into wing328-csharp_fix_enum 2016-09-13 16:46:27 +08:00
wing328
0cba285cac Merge branch 'jimschubert-csharp/INotifyPropertyChanged' 2016-09-13 15:59:26 +08:00
wing328
907db0dd5b [Scala] enhancement to indention and null check (#3775)
* fix scala api null check and indention

* minor format fix
2016-09-13 09:56:06 +08:00
stevedenman
314bfdece2 Add last response code and headers (#3760)
* Add last response code and headers

Apply same workaround as https://github.com/swagger-api/swagger-codegen/pull/1127 to typescript-angular2 template.

* Add WithHttpInfo() methods to return raw response.

* Revert change to http method formatting
2016-09-12 16:24:12 +08:00
Zheng Can
0c59aefe90 Make InlineModelResolver resolve vendorExtensions correctly for Schema Object (#3719)
* Fix InlineModelResolver to ensure the vendorExtensions could be accessed via schema object or inline model.

* format the code

* Copy vendor extension to property only.
2016-09-12 16:09:07 +08:00
Richard
bc2f614b92 apiInvoker : in getInstance, if instance is null initialize instance (#3766)
* apiInvoker : in getInstance, if instance is null initialize instance
build : replace the deprecated volley library by the android one
jsonUtil : Add in gsonBuider an adapter to deserialize Date class
And update petstore sample for volley library

* Update apiInvoker.mustache

Add a space after if,  to stick to the code style.

* Update ApiInvoker.java

Add a space after if, in petstore samples, to stick to the code style.
2016-09-12 15:56:35 +08:00
wing328
5bb203504c Merge pull request #3772 from wing328/scala_model_indent
[Scala] better format of model properties
2016-09-12 11:27:02 +08:00
wing328
77d31300a1 Merge pull request #3757 from ePaul/feature/#3738-add-sourceFolder-property
Feature/#3738 add source folder property
2016-09-12 11:10:28 +08:00
Bartek Kryza
6d6832e7a6 Fix for #3712 - invalid enum array validation in Python client mustache model (#3713)
* Fixed invalid enum array validation in Python client mustache model

* Updated the Petstore Python client tests

* Removed superfluous array enum test

* Added test cases for Python client array and map enums

* Improved map enum error message
2016-09-12 11:00:49 +08:00
Paŭlo Ebermann
72e051ab47 Feature/remove unused variables in html codegens (#3739)
* Remove unused variables/constants in StaticHtml[2]Generator.

It looks like those were remainders from copy+paste.

* run html-petstore.sh
2016-09-12 11:00:02 +08:00
Paul Ebermann
d3eedafe84 Issue #3738: introduce the sourceFolder property for all Scala "languages". 2016-09-11 20:10:51 +02:00
ataraxus
1d7d37409a Fix for issue #3743 (#3744)
* fix map usage in api generation #3694

* fix map usage in api generation #3695

* close impl gap between queryParam and formParam, to be more consistent

* use working copy constructor
2016-09-11 23:11:35 +08:00
wing328
ac69f45ddc better format of model properties 2016-09-11 18:44:36 +08:00
Paŭlo Ebermann
bd3a15e273 Feature/#3738 extract abstract scala codegen (#3755)
* Issue #3738: extract AbstractScalaCodegen.

This seems to not change anything in the output, at least for the Petstore samples.

* Issue #3738: move languageSpecificPrimitives initialization to the super class

* Issue #3738 move CliOptions to AbstractScalaCodegen.

* Issue #3738 update samples.

Only one change, remove of unnecessary imports.
2016-09-11 18:00:38 +08:00
wing328
f55a9cee2f Merge pull request #3756 from lunat/csharp_documentation_relative_anchor
Added anchor tag in README.mustache issue #3748.
2016-09-09 17:26:03 +08:00
wing328
dcdea19cb8 erlang update readme, add petstore samples 2016-09-09 16:42:26 +08:00
Artem Ocheredko
f90626ac81 [Erlang] Add Erlang server generator (#3758)
* Initial erlang generation

* Recfactor erlang codegen to make a minimal working example

* ft/erlang_codegen Separate handlers by resourse, add minor codegen fixes and refactoring

* Test commit

* ft/erlang_codegen Modify reouting generation

* ft/erlang_codegen Remove parsed request concept. Add minor refactoring and bugfixes

* ft/erlang_codegen Use swagger spec from an internal directory instead of a provided path

* ft/erlang_codegen Add basic response validation

* ft/erlang_codegen Moved all the req validators to a separate file for test needs

* ft/erlang_codegen Add basic param validation

* Add refactoring:
OperationIDs are atoms now
Fix schema validation
Add todo list

* CAPI-23 Add auth context to request handling (#2)

* CAPI-23 Fix routing to support different paths in one handler. Add auth context to request handling. Add an opportunity to pass custom middlewares to the server

* CAPI-31 Add enum validation and some minor fixes (#4)

* CAPI-31 Fix turbo fuck up with additional params (#5)

* Capi 23/fix/basic logging (#6)

* CAPI-23 Add understandable messages in case of bad requests. Add specs to shut up dialyzer and add some minor code refactoring

* CAPI-23 Fix missed bracket in auth module (#7)
2016-09-09 15:44:54 +08:00
lunat
a553d47507 Added anchor tag in README.mustache issue #3748. 2016-09-08 18:01:18 +02:00
wing328
ddd0b8685a Merge pull request #3750 from wing328/fix_jaxrs_cxf_model
[JAX-RS][CXF] To fix enum value issue
2016-09-08 17:54:34 +08:00
Ville Skyttä
735390f633 [Python, Ruby, PHP] Validate min/maxItems (#3734)
* python: Validate min/maxItems

* ruby: Validate min/maxItems

* lumen: Validate min/maxItems

* php: Validate min/maxItems
2016-09-08 17:33:59 +08:00
wing328
4f0f128ddb fix enum value issue for jaxrs cxf 2016-09-08 17:30:20 +08:00
wing328
326b8020d2 fix property name 'result' for android using "this" 2016-09-07 18:55:19 +08:00
wing328
892c9e017a Merge pull request #3730 from scop/python-maxlength-msg
python: Fix model maxLength validation error message
2016-09-07 17:12:28 +08:00
Ville Skyttä
b8e8c7cdb5 Various code cleanups (#3709)
* For/while to foreach loop conversions

* Don't instantiate Booleans

* Remove redundant String.toString calls

* Remove redundant String instantiations

* Don't concatenate StringBuilder.append args

* Replace dangling javadoc comments with blocks

* Combine identical catch branches

* Remove redundant catch branch

* Remove unnecessary boxing

* Remove redundant casts

* Remove redundant null checks
2016-09-07 16:41:51 +08:00
wing328
3d1f621f8b Merge pull request #3729 from scop/spelling
Spelling fixes
2016-09-07 15:43:17 +08:00
Cliffano Subagio
92eb722ced [ruby] Add gemspec required_ruby_version setting. (#3718)
* [ruby] Add gemspec required_ruby_version setting.

* [ruby] Add gemspec required_ruby_version setting.

* Add gemRequiredRubyVersion option to Ruby client code generator.
2016-09-06 22:25:39 +08:00
Ville Skyttä
f436f0eee2 python: Fix model maxLength validation error message 2016-09-06 14:49:00 +03:00
Ville Skyttä
91b7494e3e Spelling fixes 2016-09-06 14:45:04 +03:00
Ville Skyttä
ddc5b80438 [Lumen, PHP, Python, Ruby] Implement exclusiveMinimum/Maximum (#3717)
* Ignore exclusiveMinimum/Maximum in setting hasValidation

* python: Implement exclusiveMinimum/Maximum

* ruby: Implement exclusiveMinimum/Maximum

* lumen: Implement exclusiveMinimum/Maximum

* php: Implement exclusiveMinimum/Maximum
2016-09-06 14:57:35 +08:00
ataraxus
59891c7f66 fix map usage in api generation #3694 (#3714)
* fix map usage in api generation #3694

* fix map usage in api generation #3695

* close impl gap between queryParam and formParam, to be more consistent
2016-09-06 10:59:54 +08:00
Neil O'Toole
f751e50e2e Issue #3687 silence resty logging [Go] (#3705)
* disabling resty logger

* #3687 updating go-petstore
2016-09-05 17:11:34 +08:00
wing328
e68b364479 update ruby regular expression to use \A 2016-09-05 16:06:38 +08:00
Masahiro Saito
92aa8ed767 [Ruby] Fix ambiguous regex (#3716)
* ruby: Fix ambiguous regex

* ruby: Add test for strict regex
2016-09-05 15:37:54 +08:00
wing328
43bac10bb3 Merge pull request #3700 from scop/php
php: Fix syntax error when pattern contains a single quote
2016-09-03 16:37:40 +08:00
Kim Sondrup
1539986984 [PHP] Corrected PHPDoc type declarations (#3710)
* [PHP] Corrected PHPDoc type declarations

* Update petstore PHP
2016-09-03 16:06:07 +08:00
Neil O'Toole
8183d96088 #3690 adding RequestURL, Method, Operation and Payload fields to APIResponse 2016-09-02 06:49:39 -06:00
wing328
7a4a430c43 Merge pull request #3702 from scop/ruby
ruby: Fix syntax error when pattern contains a single quote
2016-09-02 16:22:47 +08:00
Ville Skyttä
c43286c569 Python collection formatting fixes/support (#3697)
* python: Rework form data collection formatting support

* python: Add/fix support for query string collection formatting

* python: Add/fix support for path collection formatting

* python: Add/fix support for header collection formatting
2016-09-02 16:17:46 +08:00
Ville Skyttä
2af822677f php: Fix syntax error when pattern contains a single quote 2016-09-02 10:42:08 +03:00
Ville Skyttä
6bb0ea2e8a ruby: Fix syntax error when pattern contains a single quote 2016-09-01 20:45:52 +03:00
wing328
b909252bb8 Merge pull request #3699 from scop/java
java: Javadoc fixes
2016-09-02 00:44:53 +08:00
wing328
11ae12b09d [Scalatra] replace {} with : in scalatra path (#3694)
* replace {} with : in scalatra path

* remove unused var in scalatra code gen
2016-09-02 00:25:07 +08:00
Ville Skyttä
0363858672 java: Javadoc fixes 2016-09-01 18:07:35 +03:00
Ville Skyttä
e52a8e34cb Spelling fixes 2016-09-01 17:39:30 +03:00
Arpit Suthar
e7ec360ba8 Added 'modelPropertyNaming' option for Scala (#3685)
* Closed #3675
1. Added 'modelPropertyNaming' option for scala
2. Executed ./bin/scala-petstore.sh (no changes).

* Removed unwanted code #3675
2016-09-01 18:22:03 +08:00
Jyotsna Karan
062e6fc3ac Added functionality to handle optional parameters for Scala (#3683)
* 1. Modified api.mushtache to handle optional paramters for scala (#3665)
2. Updated petstore sample for scala

* Generated scala-petstore.sh (#3665)

* 1. Updated api.mustache to handle optional thing with headers and file parameters
2. Generated petstore sample for the above changes
2016-09-01 18:11:23 +08:00
Ville Skyttä
8e7d3d1a72 Python fixes (#3689)
* python: Fix unsupported method exception message

* python: Implement form data collection formatting
2016-09-01 15:05:52 +08:00
wing328
d464bfbd59 fix JS auth issue due to missig comma 2016-08-31 17:50:56 +08:00
wing328
eb59e2945e remove unnecessary change for c# codegen 2016-08-31 17:31:55 +08:00
wing328
8523c57f8c remove unnecessary change in JS closure codegen 2016-08-31 17:13:35 +08:00
wing328
5804fbc1dd remove unnecesary change in JS codegen 2016-08-31 16:52:46 +08:00
wing328
322862c4b6 add hided timestamp option to swfit codegen 2016-08-31 16:45:12 +08:00
wing328
da45cb7ff5 remove unnecessary changes for php codegen 2016-08-31 16:38:30 +08:00
wing328
4ea4488212 remove unnecessary change for ruby codegen 2016-08-31 15:57:04 +08:00
wing328
ebfddd0a58 remove unnecessary changes for python codegen 2016-08-31 15:49:22 +08:00
wing328
2ced9e1deb Don't HTML escape PHP pattern output (#3672)
* php: Do not HTML escape patterns

* php: Update petstore

* lumen: Do not HTML escape pattern

* lumen: Update petstore
2016-08-31 14:07:29 +08:00
wing328
429bc46a79 Merge branch 'python-patterns' of https://github.com/scop/swagger-codegen into scop-python-patterns 2016-08-31 13:54:47 +08:00
wing328
343ca03512 Merge branch 'issue-3647' of https://github.com/zbiro/swagger-codegen into zbiro-issue-3647 2016-08-31 00:25:06 +08:00
Ville Skyttä
cdcc61b038 python: Do not HTML escape patterns 2016-08-30 08:06:02 +03:00
Ville Skyttä
a4dbd761f8 python: Fix escaping of quote in patterns 2016-08-30 08:06:02 +03:00
Ville Skyttä
cfe1b7a2b4 lumen: Do not HTML escape pattern 2016-08-30 08:05:04 +03:00
Ville Skyttä
8f98a6d6f5 php: Do not HTML escape patterns 2016-08-30 08:05:04 +03:00
Daniel Ge
dd1ed12318 Make connection failures visible with generated Ruby SDKs (#3640)
* Make connection failures visible in Ruby SDK

The underlying HTTP library, Typhoeus, requires you to be explicit about
error handling. Unfortunately, this also means that we can't assume that
`response.success?` will be false only when the HTTP status code is not
a 200; it could also be false when the request fails (timeouts, TLS
verification issues, etc.). This commit adds explicit error handling for
these cases.

* Update samples
2016-08-30 10:28:07 +08:00
Ville Skyttä
224fd208e7 Various python cleanups (#3650)
* python: Let logging format messages on demand

* python: Use six more

* python: Remove unused imports

* python: flake8 fixes

* python: Make examples compatible with Python 3

* python: Spelling fixes
2016-08-30 10:16:17 +08:00
Zoltan Biro
646c4faa62 fixing python code formatting issue 2016-08-29 16:53:38 +02:00
Zoltan Biro
10aa68c6b7 Fix empty model object serialization in python client 2016-08-29 16:08:45 +02:00
sidhantgoyal
8dfe230b7c [android] volley socket timeout configurable (#3646)
* [android] volley socket timeout configurable

* Updated Android Volley Petstore sample
2016-08-29 16:31:49 +08:00
wing328
d93ef8531b Merge pull request #3645 from guohuang/compile_issue2
[Go] fixing code gen not recognizing 'object' type issue
2016-08-29 15:39:25 +08:00
wing328
04ce4ef867 Merge pull request #3657 from cvent/cvent-fixes
Fix to case of propertyClass which pukes on most checkstyle rules in …
2016-08-29 15:23:42 +08:00
Brent Ryan
46c3bef40f Fix to case of propertyClass which pukes on most checkstyle rules in java 2016-08-28 20:49:30 -04:00
Ville Skyttä
2fbec6d9eb Spelling fixes 2016-08-28 17:05:34 +03:00
Ville Skyttä
9c92bcb693 perl: Sync default user agent with other languages 2016-08-28 15:11:32 +03:00
Sebastian Haas
4337f050f5 Angular2 rc5 (#3603)
* Changes due to changes in Angular's http module.

* Added link to issue re Headers clone. Removed use-strict since its emitted by default from TypeScript 1.8 on.

* Added missing import for ResponseContentType.

* Added null check fix for Angular http issue.

* Updated package.json and typings

Signed-off-by: Sebastian Haas <sebastian@haas.tech>
2016-08-28 18:30:11 +08:00
wing328
440b7211de Merge pull request #3653 from scop/java
java: Fix model package import in example
2016-08-28 16:23:57 +08:00
Ville Skyttä
85c7e7697a Perl example fixes (#3652)
* perl: Add configuration and classname imports to examples

* perl: Fix list container syntax in examples
2016-08-28 15:56:00 +08:00
Ville Skyttä
756f7a96f6 java: Fix model package import in example 2016-08-28 01:00:34 +03:00
Ville Skyttä
b4c139f19b Spelling fixes 2016-08-27 02:34:33 +03:00
Guo Huang
be0233c609 [Go] fixing code gen not recognizing 'object' type issue 2016-08-25 21:44:57 -07:00
wing328
419c3165ea Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-08-25 23:14:58 +08:00
wing328
81f947e723 update android petstore sample, add this to volley's model 2016-08-25 23:12:23 +08:00
wing328
12fbbfbd6d Merge branch 'mikesol-patch-android-classVarName' of https://github.com/mikesol/swagger-codegen into mikesol-mikesol-patch-android-classVarName 2016-08-25 23:05:09 +08:00
wing328
d590b849cc Merge pull request #3626 from medallia/flatten-composed-model
Adds flattener for ComposedModel
2016-08-25 23:04:01 +08:00
Tony Wang
beaf1fc7aa fix #3477, add RxSwift support for Swift (#3490)
* fix #3477, add RxSwift support for Swift

* make the SwaggerClient scheme shared
2016-08-25 19:34:12 +08:00
cbornet
194c389a06 fix some inheritance/composition issues and add allOf unit tests
Fix #3629 #3544 #3474 #3636
2016-08-24 17:11:45 +02:00
Jason Gavris
e89f914e8b [Swift] Handle String responses 2016-08-23 10:18:01 -04:00
Jason Gavris
3a457c6a7e [Swift] Handle Void responses 2016-08-23 10:03:51 -04:00
Diego de Estrada
84de96ef65 Adds flattener for ComposedModel 2016-08-22 17:54:30 -03:00
Ryan Martin
c1f3c51427 [Swift] Include HTTP status code and body data in response errors
This is useful when differentiating different error responses. Example:

if let e = error {
  switch e {
    case ErrorResponse.Error(400, _, _): responseLabel.text = "Unknown error"
    case ErrorResponse.Error(403, _, _): responseLabel.text = "Not logged in"
    default: responseLabel.text = "\(e)"
  }
}

The existing error is straight from Alamofire and only includes the HTTP
status code in the body of the message (not broken out as a separate value).
It also does not include the response body, which may be useful.
2016-08-22 12:30:03 -04:00
Damien Pontifex
54fe7a731c inject base_path opaque token for typescript angular2 (#3514)
* inject base_path opaque token for typescript angular2

* Readme note on providing base path to service
2016-08-22 21:40:51 +08:00
Yet Another Minion
9a77c48540 For Qt5 server generator, add BaseIntegerProperty to default values (#3622)
* For Qt5 server generator, add BaseIntegerProperty to default values

* move base property check to after checks of extended properties
2016-08-22 19:52:10 +08:00
wing328
dd52d666c5 Merge pull request #3623 from wing328/ruby_better_pattern
Add function to handle missing delimiter in regex
2016-08-22 19:12:03 +08:00
wing328
a58845bb0f add function to handle missing delimiter in regex 2016-08-22 18:01:06 +08:00
regga-ws
4d94511935 Allowing generators to be aware of original inputSpec path (#3592)
* Enabling knowledge of inputSpec path for custom generators

* Enabling knowledge of inputSpec path for custom generators

* Enabling direct use of "inputSpec" property in templates

* Fixing spaces
2016-08-22 16:04:53 +08:00
wing328
4e20bd9bab [Java][Spring][Inflector][Jax-RS] To fix various enum issues (#3615)
* fix spring enum deserialization issue

* fix enum class for spring

* update java inflector to fix enum tostring

* fix jaxrs jersey1 enum toString

* fix jaxrs jersey patch issue
2016-08-20 17:54:45 +08:00
Kevin Chabreck
64e03422c0 [Spring Boot] use port defined in spec file for server.port value (#3605)
* uncommented server.port property in application.mustache template and set it to serverPort value parsed from spec file

* update Petstore sample for Spring MVC and Boot
2016-08-19 17:29:36 +08:00
Mike Solomon
8536d7991c Uses this.{{name}} to scope instance
Otherwise, if {{classVarName}} is the same as a class member name, the function will not work.
2016-08-19 10:11:31 +03:00
wing328
24c0038cce [Java][Inflector] Fix enum issue with java inflector (#3606)
* fix enum issue with java inflector

* update pom to test java-inflector
2016-08-18 09:48:50 +08:00
wing328
661c911d27 Merge branch 'issue-3461-configurable-transport' of https://github.com/neilotoole/swagger-codegen into neilotoole-issue-3461-configurable-transport 2016-08-17 22:52:44 +08:00
wing328
0196cfad55 Merge pull request #3599 from ggood/okhttp-gson-template-path-fix
Don't escape path in generated okhttp-gson client code
2016-08-17 15:21:37 +08:00
wing328
c166609438 Merge pull request #3595 from MikeRalphson/patch-1
Fix typo, descripton -> description
2016-08-17 11:21:13 +08:00
Gordon Good
534e4db527 Don't escape path in generated okhttp-gson client code
The mustache templates for the other Java clients (e.g
Java/api.mustache) use 3 curly brackets around the path variable
so the path is not escaped. Make the okhttp-gson template
consistent with them.
2016-08-16 17:12:37 -07:00
Tony Tam
7bc9c4041b added configuration for swagger-yaml output file, #3597 2016-08-16 15:59:47 -07:00
Mike Ralphson
f6a91db2d3 Fix typo, descripton -> description 2016-08-16 22:42:00 +01:00
wing328
7a49f96a03 Merge pull request #3591 from scottrw93/read-only-fix
Create setter for models inline with Issue 3210
2016-08-16 16:03:14 +08:00
wing328
9858403f2e Merge pull request #3582 from regga-ws/compiler-customization
Adding support for JMustache compiler customization
2016-08-16 14:21:20 +08:00
Scott Williams
68d63ec783 Create setter for models inline with Issue 3210 2016-08-15 23:31:30 +01:00
Nekrasov Aleksander
91675c97e2 Fix resteasy offsetdatetime provier (#3332)
* Fix offsetDateTime and remove unnecessary override annotations

* Update petstore samples to CI for resteasy testing

* fix resteasy templates path

* add ability to hide generated annotations

* Update petstore resteasy samples

* Deduplicate artifact names in resteasy projects
2016-08-15 23:46:52 +08:00
Alexandre Estela
9d5e2c0224 Adding support for JMustache compiler customization 2016-08-12 12:21:10 +02:00
wing328
3d717bd874 add symbolic enum support to csharp 2016-08-12 16:27:47 +08:00
wing328
f7143727e7 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-08-12 15:38:00 +08:00
wing328
2943177d06 Merge branch 'kartenkarsten-patch-1' 2016-08-12 15:37:46 +08:00
wing328
621dee30a8 Merge branch 'patch-1' of https://github.com/kartenkarsten/swagger-codegen into kartenkarsten-patch-1 2016-08-12 15:33:02 +08:00
wing328
f746a93da4 Merge branch 'csharp/INotifyPropertyChanged' of https://github.com/jimschubert/swagger-codegen into jimschubert-csharp/INotifyPropertyChanged 2016-08-12 15:04:04 +08:00
wing328
4fe0b3350c Merge pull request #3576 from ModelSolv/issue-3572
Issue 3572 Remove duplicate CLI Options
2016-08-12 14:39:58 +08:00
wing328
02f43bc195 Merge branch 'feature/js-fix-types' of https://github.com/arikon/swagger-codegen into arikon-feature/js-fix-types 2016-08-12 10:08:24 +08:00
wing328
3c1e47c31d Merge branch 'feature/jack/update-swift-alamofire' of https://github.com/JackWink/swagger-codegen into JackWink-feature/jack/update-swift-alamofire 2016-08-12 08:59:12 +08:00
Sergey Belov
e01095f53b Fix Javascript types 2016-08-11 23:05:37 +03:00
Andy Lowry
90a113b441 Issue 3572 Remove dupe options in jaxrs-spec
Removed CLI option declarations in JavaJAXRSSpecServerCodegen that also
appear in AbstractJavaJAXRSServerCodegen.
2016-08-11 13:43:14 -04:00
wing328
752ba61e67 [Go] Add more test cases and fix numeric form/header parameters (#3574)
* add more tests for go, fix numeric form/header parameters

* update go sample
2016-08-11 14:28:31 +08:00
Ivan Vučica
cf0d9b48fd Go: Replace .Username with .UserName in generated API methods.
Right now, any generated code where the http basic authentication is
required is broken, as it tries to access nonexistent field in the
generated `Configuration` struct.

The alternative is to fix `configuration.mustache` to replace the
`UserName` field with `Username` field.
2016-08-10 21:36:35 +00:00
Ado Nishimura
eefb2152e9 [htmlDoc2] curl sample - conditionally add 'apiKey'. (#3561) 2016-08-10 16:43:47 +08:00
wing328
d2d5553a45 [Go] prefix go local var with localVar (#3570)
* prefix go local var with localVar

* remove pom from go, minor fix to headerParams
2016-08-10 16:14:33 +08:00
wing328
31fd1df26b Merge pull request #3562 from wing328/add_enum_endpoint
[Java][Spring] Add enum test cases and fix formParam's enum value
2016-08-09 23:32:04 +08:00
wing328
dbeb82f976 Merge pull request #3564 from cliffano/fix-incorrect-param-update-params-for-auth
Fix unknown parameter on api_client's update_params_for_auth method.
2016-08-09 23:27:15 +08:00
Karsten Hinz
03986761dc typo
eleif zu else if
2016-08-09 15:06:26 +02:00
wing328
d626200479 fix form enum parameters for spring generator, add more test cases 2016-08-09 19:49:38 +08:00
wing328
8ef3b61228 Merge pull request #3559 from wing328/java_jersey_indent
[Java] minor indentation fix for java enum models
2016-08-09 17:39:02 +08:00
Cliffano Subagio
aba2d35a18 Fix unknown parameter on api_client's update_params_for_auth method. 2016-08-09 19:11:26 +10:00
wing328
d4fa88a2ef Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-08-09 17:09:09 +08:00
wing328
79385aa503 Merge branch 'beingcoder-top-enum-error-securityscope-newline-error' 2016-08-09 17:08:51 +08:00
wing328
817a78e3a7 minor indentation fix for java enum models 2016-08-09 16:50:21 +08:00
wing328
e1fd176ae2 Merge branch 'patch-1' of https://github.com/kartenkarsten/swagger-codegen into kartenkarsten-patch-1 2016-08-09 16:26:25 +08:00
wing328
87c31188b7 Merge pull request #3550 from jimschubert/aspnet/models-casing
[aspnet] Honor casing of properties from definition
2016-08-09 14:55:03 +08:00
rynger
3faee1f6ce Amending Path annotation (#3553)
* Amending Path annotation

Changed the Path annotation value from "/" to "/{{baseName}}"

* jaxrs-cxf-petstore-server.sh script was not referencing cxf module directory. Included generated files following script run. Have amended Path annotation value to {{contextPath}} and removed public access modifier from template as this is redundant for Java interface definition.
2016-08-09 12:09:07 +08:00
wing328
c4835ea52e [TypeScript] fix array enum (#3538)
* better enum support for typescript angular2

* fix enum property for TS

* fix non-array enum datatype for TS

* update build name for TS fetch petstore client

* restore TS fetch enum naming

* [TS fetch]add test cases, fix enum integer naming
2016-08-09 10:49:26 +08:00
wing328
7a245e3189 [JavaScript] add enum tests cases for JS generator (java) (#3546)
* add enum tests cases for JS generator (java)

* fix typo quote
2016-08-08 18:52:24 +08:00
wing328
ad3d9cd3b4 Merge pull request #3529 from JackDanger/danger/allow-go-config
Restore ability to configure Go
2016-08-08 18:30:18 +08:00
wing328
39e0e22c57 Merge pull request #3534 from arnested/php-enums-in-containers
[PHP] Fix enum validation in container setters
2016-08-08 18:29:44 +08:00
wing328
aed66aeee9 Merge pull request #3524 from dmytrobr/bug/issue-3523
support Title as model name for any inline object
2016-08-08 18:28:57 +08:00
Cliffano Subagio
3f7127b042 [Java] Add maven-javadoc-plugin to all Java clients. (#3503)
* Add maven-javadoc-plugin to all Java clients.

* Update sample petstores for other Java clients.

* Fix unknown parameter on api_client's update_params_for_auth method.

* Revert "Fix unknown parameter on api_client's update_params_for_auth method."
To be moved to a separate PR.

This reverts commit 1ee186694241bb6d9a0dccefcdca5afe3f5a1dd2.
2016-08-08 18:27:05 +08:00
wing328
328eb5b9e3 Merge pull request #3548 from wing328/php_enum_test_cases
[PHP] add enum test cases for PHP generator (java)
2016-08-08 18:22:43 +08:00
Jim Schubert
c744e55217 [csharp] client property validations 2016-08-07 21:24:55 -04:00
Tony Tam
c4f3cb1d9e updated dev versions 2016-08-07 23:03:44 +02:00
Tony Tam
be3a49183e Merge branch 'master' into release-prepare 2016-08-07 18:41:16 +02:00
wing328
d8cdcbf042 fix jsoncreator annotation issue with java api clients using gson 2016-08-08 00:16:12 +08:00
Jim Schubert
adc445a5ff [aspnet] Honor casing of properties from definition 2016-08-07 09:14:07 -04:00
Tony Tam
c147cfde1b updated release versions 2016-08-07 11:49:01 +02:00
Jim Schubert
3d7f6ad099 [csharp] documented help switch for generating property change 2016-08-06 21:38:52 -04:00
wing328
b547d56d29 add enum test case to php generator (java) 2016-08-07 06:39:56 +08:00
Jim Schubert
797afe9d15 [csharp] PropertyChanged support .NET 4.x+ 2016-08-06 16:54:50 -04:00
wing328
e8095c6a04 Merge pull request #3543 from guohuang/compile_issue2
[GO] Fixing compilation issue when pathParams  is not presented
2016-08-06 14:07:00 +08:00
wing328
c220dbb2f5 Merge pull request #3541 from expectedbehavior/configuration-misspelling
Fix spelling in ruby ApiClient: Configuraiton -> Configuration
2016-08-06 13:10:46 +08:00
Guo Huang
bef5c74da7 removed unneeded "errors" import 2016-08-05 21:34:04 -07:00
Guo Huang
ab96b318e2 [GO] Fixing compilation issue when pathParams is not presented 2016-08-05 14:53:05 -07:00
Joel Meador
950fb43fdf fix spelling in ruby ApiClient: Configuraiton -> Configuration 2016-08-05 14:36:08 -04:00
wing328
148a842f3b fix #2538 (#3535) 2016-08-05 18:09:00 +08:00
Arne Jørgensen
03c7e3ea0b [PHP] Fix enum validation in container setters
When the setter is taking an array as argument we cannot use
`in_array()` to validate if the values are part of the allowed enum
values. Instead we use `array_diff()` for containers now.
2016-08-05 10:53:02 +02:00
wing328
47738f6cd6 [Sinatra][Nancyfx] fix enum in Sinatra and nancyfx (#3532)
* fix enum in sintra and nancyfx

* add isContainer check for sinatra allowable value

* fix EOL in nancyfx enum template
2016-08-05 16:30:59 +08:00
wing328
122af80881 better symbol mapping for enum name 2016-08-05 11:28:07 +08:00
Jack Danger Canty
6010c1e6d8 Restore ability to configure Go 2016-08-04 15:40:18 -07:00
wing328
89fe3403a7 add enum test case for jersey2 2016-08-05 01:57:34 +08:00
Dmytro Kryvoshei
fe5c235727 fixed InlineModelResolver to support Title as model name for any inline
object

InlineModels defined within MapProerty and ArrayProerty were not using
"title".
Added Unit Tests
2016-08-04 08:57:16 -04:00
wing328
670f103859 better enum naming for symbol (java) 2016-08-04 16:37:48 +08:00
Neil O'Toole
70d8041cb4 fixed config to support transport, and other options 2016-08-03 20:42:21 -06:00
wing328
0547f0d6d8 fix spring enum model 2016-08-03 16:38:02 +08:00
wing328
81f981c54d Merge pull request #3506 from wing328/fix_array_enum
[JaxRS][PHP] Fix issue with enum
2016-08-03 14:50:05 +08:00
wing328
26c33d344d Merge pull request #3507 from chrislewis/gen-readme-typo
s/It's/Its
2016-08-03 12:14:36 +08:00
Chris Lewis
3bd01b988e s/It's/Its 2016-08-02 15:50:25 -04:00
wing328
811b5940eb update jaxrs with better test, fix enum issue, patch operation 2016-08-03 01:36:34 +08:00
wing328
1fde95f997 fix java okhttp (array of enum property) 2016-08-03 01:36:34 +08:00
wing328
25fa3e86f9 add enumName to store the enum prefix 2016-08-03 01:36:13 +08:00
wing328
0b8acb5b0c set allowablevalues of inner enum's allowablevalues 2016-08-03 01:35:58 +08:00
Himanshu Mishra
24d8c621c2 Using baseName in place of paramName in request header. Closes #3502 2016-08-02 21:38:26 +05:30
wing328
bbe422947f Merge pull request #3501 from wing328/revert_3391_2
Revert "Merge branch 'feature/objc-tasks' of https://github.com/wberger/swagger-codegen"
2016-08-02 18:28:15 +08:00
wing328
ed9dea6a89 Revert "Merge branch 'feature/objc-tasks' of https://github.com/wberger/swagger-codegen"
This reverts commit 7c1daab896, reversing
changes made to aa58497247.
2016-08-02 17:49:55 +08:00
wing328
7bd37468bc Merge pull request #3496 from Kvezon/jersey2-byte-array-deserialize
Support byte[] downloading in Java jersey2 client
2016-08-02 16:24:40 +08:00
wing328
390ec38ec7 Merge pull request #3482 from cliffano/master
[Java] Add maven-javadoc-plugin in pom.xml of generated Java client.
2016-08-02 16:19:29 +08:00
wing328
1886abb9f9 Merge pull request #3487 from szantopeter/master
fixing bug of rendering an extra spaces into @FeignClient annotation
2016-08-01 23:12:39 +08:00
Kvezon
ef526422e9 Support byte[] downloading in Java jersey2 client 2016-08-01 16:33:58 +03:00
osher
30776d75a9 NodeJS generator - Harken to the the warnings ...
2 types of warnings are emitted in bulk whenever using the nodeJS generator.

I did some guesswork: since JS is a c-type language like C# and Java - I looked there for reference, and followed their example.
2016-08-01 13:40:29 +03:00
Arne Jørgensen
cfe8dfc112 [PHP] Fix invalid PHP syntax
Fixes 3480.
2016-08-01 11:46:57 +02:00
wing328
1bdd15c55c Merge branch 'feature/confluencewikidocs' of https://github.com/jhitchcock/swagger-codegen into jhitchcock-feature/confluencewikidocs 2016-08-01 17:25:20 +08:00
wing328
85c8eb3d76 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-08-01 17:25:13 +08:00
wing328
4895a35200 Merge pull request #3492 from wing328/ruby_optional_validation
[Ruby] fix validation for optional parameters/properties for ruby
2016-08-01 17:12:39 +08:00
wing328
8c357dd1d6 fix validation for optional parameters/properties for ruby 2016-08-01 16:50:11 +08:00
wing328
434b4fd359 Merge pull request #3447 from jhitchcock/feature/static-docs-2
[WIP] - Html Docs 2 - API and Client Library Documentation - Feedback / Assistance wanted
2016-08-01 16:13:16 +08:00
Arne Jørgensen
0f8e1f8105 [PHP] Client properties validation #3457 (#3480)
* [PHP] Avoid validation of unset, optional parameters

Fixes #3457.

* [PHP] Regenerate petstore samples
2016-08-01 15:24:47 +08:00
abcsun
d7c959fe42 [PHP] add AbstractPhpCodegen to be as the base class of PHP-related generators (#3310)
* add abstractPhpCodegen

* This base class should provide common functions to PHP-related generators so that the same enhancements or bug fixes can be applied to all clients.

Most source be moved from the PhpClientCodegen.

* change Lumen codegen to use the AbstractPhpCodegen

* remove the composerVendorName/composerProjectName. modify the LumenServerOptionsTest for unit test

* add context path

* reserve the apiDocPath and modelDocPath

* add the templateDir for lumen
2016-08-01 15:23:35 +08:00
Yao, Yao
62921e4eb4 issue fix: for top enum definition, either enum parameter or enum model definition, auto-generated code is invalid. 2016-08-01 14:40:35 +08:00
Yao, Yao
a772a855ee issue fix: when security.scope. description has a precedent | ,newline in markdown, generated api will break as an extra newline is added. 2016-08-01 14:35:27 +08:00
wing328
3d7ff26c67 [C#] Add C# Petstore test to AppVeyor (#3489)
* update appveyor.yml to test c# petstore client

* update csproj file

* add docker version test

* add docker version

* add docker

* add cpuid.ps1

* comment out cpuid

* use start process

* remove mvn test

* remove comments related to docker

* fix appveyor to run local petstore, shippable caching turned on

* add comments to ci config

* remove cpuid.ps1

* update C# petstore sample
2016-07-31 22:37:06 +08:00
Peter Szanto
c91b004b0b fixing bug of rendering an extra spaces into @FeignClient annotation properties 2016-07-31 04:16:22 +02:00
wing328
7c1daab896 Merge branch 'feature/objc-tasks' of https://github.com/wberger/swagger-codegen 2016-07-30 16:17:08 +08:00