Commit Graph

5629 Commits

Author SHA1 Message Date
Lars Wander
23d0fedc9c [Java] Fix okhttp-gson datetime converter compilation (#6230) 2017-08-14 16:50:02 +08:00
Yusuke Tsutsumi
d39b1ff76f [python] asyncio support (#6245)
* trying an approach with providing asyncio as a framework.

* adding example of asyncio.

* removing sample client to help PR look more manageable.

* possibly fixing a unit test

* getting unit test to pass again.

* addressing comments.
2017-08-14 16:16:55 +08:00
Ahmet Taha Sakar
da4fe86402 Swift3 xcodewarnings (#6298)
* added headers to makeRequest function for swift3 template

* Swift3 update to dismiss Xcode warnings
2017-08-13 13:09:23 +08:00
Manuel Kiessling
105fe4958e [php] Fixed typo in codedocs (Swaagger -> Swagger). (#6299) 2017-08-12 21:36:19 +08:00
Thomas Townsend
01477de711 Add useTags option to JavaJersey server codegen (#6278) 2017-08-12 18:02:31 +08:00
ephemera
11424a8cdd fix #6264 (#6276) 2017-08-12 17:57:13 +08:00
lopesmcc
2ebb1bcaf0 [JAVA-VERTX] make Vertx client support running on different contexts (#6283)
* [java-vertx] make vertx client support running on different contexts

* [java-vertx] make vertx client support running on different contexts (samples)
2017-08-12 17:56:20 +08:00
mferguson-gb
bc633766f8 Retrofit2 rxjava2 adapter imports (#6294)
* Update retrofit2 rxjava2 adapter dependencies

* Update sample code
2017-08-12 17:34:03 +08:00
Michael Kaye
c2ababbb5b [swift3] empty model with only additional properties (#6273) 2017-08-12 01:03:37 +08:00
Jean-François Côté
ab28c7c825 [Java Play Framework] Remove most warnings + bug fixes (#6275)
* Removals of most of the warnings found by lint

* Removals of most of the warnings found by lint (PART 2)

* Removals of most of the warnings found by lint (PART 3)

* Removals of most of the warnings found by lint (PART 4)

* Removals of most of the warnings found by lint (PART 5)

* Fix conversion error

* Removal of unnecessary import. Other will need more complex login in the generator itself (not in the mustache files)

* Add missing imports + fix to the regex. Generation of the samples
2017-08-11 15:38:18 +08:00
Gökberk Karaca
b0333af8bd Fix unexpected text error in javadoc by replacing url with html tag (#6279) 2017-08-11 08:50:36 +08:00
stevecookform3
adfe4b6e6c add @Valid/@Validated annotations to controller methods/nested models (#6254)
* add @Valid/@Validated annotations to controller methods and nested models

* update spring samples
2017-08-11 08:44:51 +08:00
wing328
06686d65fa [Lua] Add new Lua client generator (#6252)
* 1st commit of lua generator

* add petstore sample

* various fixes based on feedback

* better return handling

* check status code 1st letter

* add support for query parameters, auth, body param

* more fixes based on daurnimator feedback

* more fixes based on daurnimator feedback

* fix a few more issues found by luac -p

* use lower case for http header key name

* more fixes based on feedback

* update lua sample

* skip auto-generated readme, doc, test files

* use tab instead of 2-space

* fix container return type

* fix cast method call

* fix cast function call
2017-08-11 01:41:29 +08:00
Jean-François Côté
1e991be5f3 [JavaPlayFramework] Fix for issue #6100 (#6128)
* Fix issue #6100. Tested with all the samples.

* Fix multiple issue with the examples. Removing all of this.
Adding fake endpoint .sh but it is not compiling right now.
2017-08-09 22:00:46 +08:00
Davide Zipeto
5c384d0f15 string used instead of bolean (#6268)
Deprecated should be a boolean otherwise the parser does not validate
2017-08-09 17:16:48 +08:00
Jean-François Côté
00b46e8a94 [Typescript-Jquery] Fix file upload (#6262)
* Fix a bug with the file upload that was not working

* Prevent unnecessary append to the FormData
2017-08-09 17:05:00 +08:00
wing328
c05db535e1 Merge branch 'issue-3371' of https://github.com/gcernier-amadeus/swagger-codegen into gcernier-amadeus-issue-3371b 2017-08-08 15:31:52 +08:00
Gökberk Karaca
53f9ae277b Add externalDocs support (#6255) 2017-08-08 01:11:00 +08:00
wing328
fca8d81b2b [JS] fix template directory for ES5 (#6253)
* fix #5845 (template dir)

* fix js petstore test case
2017-08-07 22:10:56 +08:00
wing328
cc848a1c24 fix replaceAll with replace 2017-08-06 17:52:19 +08:00
wing328
4cb7f1d613 [Rust] add new Rust client generator (#6105)
* add rust generator (1st release)

* update based on feedback

* fix reserved keyword

* fix string parameter

* Convert String to &str in trait definition

* Only pass pathParams to uri builder

* Fixed the html escaping in return type

* Fixed the hashmap constructor

* Added models into API scope

* removed models subimport, reference from super

* update returntype in method signature

* Fixed the remaining templates inconsistencies

* Fixed issues that floated up in kubernetes swagger file

* add hash support, fix docstring

* fix map parameter, update api.mustache

* use baseName for parameter

* use fully-qualfiied model name

* add rust tests

* fix test cases

* Rust gen slightly more idiomatic (#6247)

* Go -> Rust in README

* Remove leftover go file in rust sample

* rust: Regenerate sample

* rust: Rename *Impl -> *Client

* rust: one-line use line

More in line with common style

* rust: Replace tabs (in java) with 4 spaces

* Added trivial getter implementation (#6249)

* update rust petstore samples
2017-08-06 16:59:08 +08:00
wing328
ffe7f0fb86 fix typo in java docstring 2017-08-06 15:39:14 +08:00
wing328
18c57a65ed Fix returnBaseType in Map response (#6246)
* fix returnBaseType for map response

* fix javadoc string
2017-08-05 22:24:46 +08:00
Lars Wander
86f2ea5e3e [Java] okhttp-gson content-type fix for */* (#6232) 2017-08-05 00:47:52 +08:00
Javier Velilla
e4276853d7 Fixed typo in the Abstract Eiffel class. (#6239)
Fixed typo in shell script
Added support for Outer Enums, inner enums not supported.
Added missing UUID library in ecf template.
Improved Model inheritance.
2017-08-05 00:38:50 +08:00
Hans-Christian Esperer
3cb36738b1 Fix issue #6212 POD Generated podfile doesn't include all generated swift files #6212 (#6220)
* Reference all generated swift files in the podfile

* Update test files
2017-08-04 00:46:01 +08:00
Mark Thebridge
9cadfd45d7 Scala import fix (#6227)
* Fix typo in Scala import generation

* Update test files
2017-08-03 18:40:58 +08:00
mobreza
b4e0854823 Improved support for XML wrapped items (#6150)
* Improved support for XML wrapped items

* XML @annotation whitespace fixed
2017-08-03 16:44:17 +08:00
mobreza
b433afebdd withXml replaces useJaxbAnnotations (#6152)
* Regenerated bin/jaxrs-*

* Replace `useJaxbAnnotations` with `withXml`
2017-08-03 15:35:33 +08:00
ehyche
32906ea7ce Add Objective-C compatibility for Optional scalars in swift4 just as we added in swift3. (#6158)
This change adds Objective-C compatibility for Swift Optional scalars in the swift4 language just like we added in swift3 here:

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

It also adds unit tests for the swift4 language. Currently those unit tests are the same as the swift3 unit tests, but will change soon as we iterate on the swift4 language generator.
2017-08-02 21:19:48 +08:00
ehyche
dd46ba9ef6 Add additional cli option and properties to swift3 for Objective-C compatibility. (#6129)
Currently, in the swift3 language, if you have an optional integer, number, or boolean property in a model, then the generated swift3 model class might look like:

class SomeModel {
    var someInt: Int?
    var someFloat: Float?
    var someDouble: Double?
    var someBool: Bool?
}

This works fine if you are accessing this model only from Swift code. However, it is very common for iOS codebases to contain both Swift AND Objective-C. If you need to access this model from Objective-C, then those 4 properties are not accessible, since Optional scalars do not translate to Objective-C.

Therefore, in the swift3 language, we want to add some code for Objective-C compatibility:

1. We add a "objCompatible" boolean command-line option. If objCompatible=true, then this enables some additional code generation to make these types of properties accessible from Objective-C. If objCompatible=false, then the generated code is exactly as it currently is. The default is objcCopmatible=false.

2. If objCompatible=true, then for these types of Objective-C-inaccessible properties (Optional scalars), then we add a "x-swift-optional-scalar=true" vendor extension in the CodegenProperty.

3. Then, in the model.mustache template, if we see x-swift-optional-scalar=true, then we add an additional computed property which returns an optional NSNumber.

So, for example, when objcCompatible=false (the default case), then the generated code for the "declawed" property of the Cat model looks like:

open class Cat: Animal {

    public var declawed: Bool?

    ...

But when objcCompatible=true, then it looks like:

open class Cat: Animal {

    public var declawed: Bool?
    public var declawedNum: NSNumber? {
        get {
            return declawed.map({ return NSNumber(value: $0) })
        }
    }

   ...
2017-08-02 18:20:01 +08:00
ToreJohansson
218273e9a8 Fixed x-example (#6195) 2017-08-02 18:14:35 +08:00
Chandan Singh
1c4e77585f Issue 6172 (#6173)
* Changes to allow field names as examples for string properties and multiple items in array during example generation

* Reverting the version to 2.3.0-SNAPSHOT and autogenerated petstore files
2017-08-02 17:59:54 +08:00
Jeff
6e72018a64 Add polymorphism support for python (#6208)
* Add polymorphism support for python

* Update api_client

* Remove leading spaces

* Bugfix

* Catch case where swagger_types is none but get_real_child_model is defined
2017-08-02 17:15:26 +08:00
ToreJohansson
34e5838924 Added all models to postProcessOperations (#6194)
* Added all models to postProcessOperations

* Added new postProcessOperationsWithModels
2017-08-02 16:14:34 +08:00
lopesmcc
66d48a0c71 [Java-VertX] Java Vertx client (#6204)
* #6165 - Java Vertx client

* #6165 - Java Vertx client (samples)

* #6165 - Java Vertx client (tests generation)

* #6165 - Java Vertx client (fixed test samples)
2017-07-31 20:04:11 +08:00
Mykola Yashchenko
be9a9a3837 [Java] Jersey, Jersey2 and Resteasy clients do not support HTTP-HEAD (#6210) 2017-07-31 19:03:25 +08:00
wing328
fab49e80a8 update Java jersey 1,2 to handle */* 2017-07-31 13:26:56 +08:00
Halil İbrahim Şener
182807ed9a [Java][Client] Add javax.validation.validation-api dependency for Bean Validation API support to jersey2 (#6203) 2017-07-31 13:15:44 +08:00
Halil İbrahim Şener
a6f981350e [Java][Client] Add PATCH method support for jersey2 (#6197) 2017-07-31 13:08:30 +08:00
wing328
443b0f142b remove ref to SO (#6209) 2017-07-29 18:53:08 +08:00
Pavel Tavoda
d412bcfd6c Fix to #6141 - [BASH] Bug generating access_token when "in: query" (#6187)
* Fix to #6141 - [BASH] Bug generating access_token when "in: query"

* Fresh petstore scripts
2017-07-28 16:00:44 +08:00
ToreJohansson
68966ac34e Added year to default generator (#6196) 2017-07-28 15:58:58 +08:00
wing328
cd43ad8c62 set auth, request package based on invokerPacakge (#6200) 2017-07-28 13:31:47 +08:00
wing328
a6f594bfd2 use jersey 2.6 for java6 (#6198) 2017-07-28 01:59:31 +08:00
wing328
82835db670 fix issue with api key (query) in c# (#6199) 2017-07-28 01:51:39 +08:00
Ximo Guanter
e4e9a985e3 [Java Play-Framework] Remove unneeded deps (#6097)
* Remove unneeded deps in Java Play Framework codegen

* rebuild petstore project with latest java-play-framework changes

* fix: pr feedback
2017-07-27 23:47:04 +08:00
Mykola Yashchenko
bb2a53ac9c added additional properties to manage Android version numbers more easily (#6160) 2017-07-27 19:27:59 +08:00
CappCorp
e7b28f0d2d [kotlin] removed unaccurate warning (#6135) (#6137) 2017-07-27 16:39:11 +08:00
Vaughn Dice
40ae715392 [go] add http request host override for api client (#6174) 2017-07-27 15:53:33 +08:00
Sebastiano Miano
1eadb4201b Pistache server (#6189)
* Added C++ generator for Pistache

* Revert of CodegenOperation

* Updated template

* Removed isRestful from method declaration

* Updated httpMethod variable

* Changed isRestfulCreate

* Updated pistache library name

* Update pistache petstore sample with the new library name
2017-07-27 14:56:56 +08:00
wing328
927055a681 [Java] MIME type "*/*" default to JSON (#6188)
* update java petstore

* minor fix to docstring

* roll back resttemplate with xml petstore due to errors

* minor fix to resttemplate isjson check
2017-07-27 11:36:29 +08:00
Lars Wander
44e7b5dd3f [Java] Interpret consumes '*/*' as 'application/json' (#6175) 2017-07-27 00:35:46 +08:00
Cheng Luo
b2ef88eac6 fix the issue 5779 (#6176) 2017-07-26 22:19:33 +08:00
Duan Shiqiang
f9eaef8f24 Ts node angular2 typings (#6178)
* removed typings for typescript-node language and updated typescript version

* updated sample of typescript-node by running .\bin\windows\typescript-node.bat
2017-07-26 20:29:46 +08:00
wing328
e807b81471 Better control on setter, getter (for boolean, non-boolean) (#6177)
* better control on setter, boolean getter

* improve test casees for getter and setter
2017-07-26 19:57:50 +08:00
Alexandre Demode
17dff8b1f6 Fix PHP file param name (#6171) 2017-07-26 14:56:13 +08:00
Halil İbrahim Şener
7696ca1658 [Java][Client] Add Deprecated annotation and update samples (#6166) 2017-07-26 01:07:30 +08:00
Mykola Yashchenko
5223c80c6d generate boolean getter method according to a code convention (#6169) 2017-07-25 23:43:56 +08:00
Ximo Guanter
70e2f643dd Fix date-time params in Java-Play codegen (#6088) 2017-07-25 17:45:02 +08:00
Georgy Grigoryev
eea797d181 import models fix for csharp (#6155) 2017-07-25 15:04:30 +08:00
Eric O'Connell
2540db8adf More flexible subclassing of ApiClient possible by s/private/protected/g (#6159)
* More flexible subclassing of ApiClient possible by s/private/protected/g

I found myself in a situation where I needed to change the configured `Feature`s, but
because of all the private variables I was not able to do so. Perhaps this is a bit too
broad of a stroke, but I changed all fields and methods to `protected` instead of `private`.
In this way, future extensibility should be improved.

Also, to solve my particular problem, I added a new empty method called
`performAdditionalClientConfiguration` which will allow subclasses to add specific features,
or do anything else possible with a `ClientConfig`.

* Updated samples
2017-07-25 14:56:34 +08:00
marcotta
21146b5087 Fix Xcode Documentation Issue (#6157)
Allow documentation to specify void when no
return type is available

Remove Xcode warnings:
"Documentation Issue
Empty paragraph passed to '@return' command"
2017-07-25 01:32:36 +08:00
wing328
943b47d04c remove PetStatus from petstore.yaml 2017-07-25 01:21:15 +08:00
Jean-François Côté
79e10c427a Fix for issue #5460 (#5778)
* Fix issue 5460

* Handling only first and last double quote to support example with double quote in the middle

* Fix proposed by @ePaul

* Add comments to explain de fixStringModel function. Add an enum model called PetStatus that test this scenario. Update sample only for JavaPlayFramework generator
2017-07-25 01:20:36 +08:00
wing328
007fc46b6a [Java][Spring] set base package to "invokerPackage" (#6156)
* set base package to invokerPackage in spring

* minor fix to how invokerPackage is processed

* fix option test failure
2017-07-24 22:00:10 +08:00
Jeff
67288b1303 Add polymorphism support for python (#6066) 2017-07-24 00:25:39 +08:00
wing328
4a8d9c3509 add "Data" as reserved word in swift 2.x, 4.x 2017-07-24 00:06:11 +08:00
julien-h-webcenter
f5591232fc fix add "Data" to reserved Keywords (#6011) (#6021) 2017-07-24 00:03:33 +08:00
wing328
827c8c38ed Merge branch 'gabrielbauman-patch-1' 2017-07-23 23:46:44 +08:00
wing328
302a0b4e93 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-07-23 23:39:00 +08:00
Isman Usoh
7805125713 Fix generate additionalProperties array type #6081 (#6082) 2017-07-23 23:21:57 +08:00
wing328
8f95691681 Merge branch 'patch-1' of https://github.com/gabrielbauman/swagger-codegen into gabrielbauman-patch-1 2017-07-23 23:02:30 +08:00
Matija Obreza
a0de7cb3a4 Jersey LoggingFilter is deprecated, replaced with LoggingFeature 2017-07-23 16:54:12 +02:00
Jean-François Côté
bf327519b8 Add support for endpoint examples. Right now it doesn't work because {{{example}}} is always empty (#5775) 2017-07-23 22:45:30 +08:00
Jean-François Côté
8597b3f843 [JavaPlayFramework] Add automatic bean validation method when activated (#6125)
* Add automatic validation of return type when beanValidation is activated

* Small fixes for the automatic validation

* Add validation of entering body object + fix problem when receiving list + do not validate when the return value is a file
2017-07-23 21:49:55 +08:00
Konstantin Simon Maria Möllers
21619c5320 [TypeScript][Aurelia] Create Aurelia code generator #5987 (#5991)
* [TypeScript][Aurelia] Create Aurelia code generator #5987

* Implement authentication methods for Aurelia #5987

* Support form data in Aurelia #5987

* Generate an index.ts file for Aurelia #5987

* Add return type to Aurelia model imports #5987

* Add Aurelia client options test #5987
2017-07-23 15:38:21 +08:00
CappCorp
a2a7ffe2bd [kotlin] fixed support of source folder (#6133) (#6134) 2017-07-23 11:34:02 +08:00
roberterdin
e710405778 [TypeScript Fetch] Optional URL query parameters not sent anymore (#6032)
* [TypeScript Fetch] Optional URL query parameters not sent anymore
This prevents empty URL parameters from being sent, e.g. http://some-api/endpoint?param=SOMETHING?v= will now be http://some-api/endpoint?param=SOMETHING.
Solution suggested by @TiFu. Fixes #6003.

* Fixed indentation

* fixed missing semicolon
2017-07-23 02:12:41 +08:00
wing328
6c922fdae1 Squashed commit of the following:
commit b33232e52b9642e9edf724429dc99afe39d9df07
Merge: e3a1e30 3e76185
Author: wing328 <wing328hk@gmail.com>
Date:   Sun Jul 23 01:38:09 2017 +0800

    Merge branch 'add-petstore-support-typescript-jquery' of https://github.com/StingrayDigital/swagger-codegen into StingrayDigital-add-petstore-support-typescript-jquery

commit 3e76185d906d8b53cc3e7a198546b9e111a0cca4
Author: Jean-François Côté <jcote@stingray.com>
Date:   Thu Jul 20 13:50:01 2017 -0400

    Add working npm generator.

commit 5c27df7c4822fed10ddb81b8a35f60ca40b60914
Author: Jean-François Côté <jcote@stingray.com>
Date:   Fri Jul 7 14:39:39 2017 -0400

    Fix suggested by @wing328 's review

commit 41da37b3576a82ad6056434d36e9d579ef495492
Author: Jean-François Côté <jcote@stingray.com>
Date:   Wed Jul 5 15:47:40 2017 -0400

    Add petstore integration and updated sample
2017-07-23 01:39:36 +08:00
Javier Velilla
fa73e56c17 Enhancements to the Eiffel generator #6057 (#6138)
Added shell scripts, batch files to generate Eiffel Petstore samples.
Added Setup CI (travis, shippable, etc) to cover the Eiffel Petstore samples.
Refactored part of the code into an Abstract Eiffel base class,
which can be later used in Eiffel server stub generators.
Added Eiffel Style guide to the contribution guidelines so that Eiffel contributors know what to follow in terms of code style
Fixed code generator issues.
Updated mustaches templates.
2017-07-22 16:55:45 +08:00
Yuantao
9b6115ec65 #5958 [JAVA-RESTEASY] Add servialVersionId to generated model class when serializableModel=true (#6108) 2017-07-22 16:50:18 +08:00
marcotta
a3c93a64b4 [objc] Convert boolean query params to true/false (#6139) (#6142)
Change booleans in query parameters from 0/1 to true/false to
match Swagger UI behaviour
2017-07-22 16:27:05 +08:00
NicoEigenmannCW
b9b1b7647b Possible Ruby Enum Fix (#6131) 2017-07-21 22:26:39 +08:00
Alessandro
faa62ee40c Swift3 code enhancements (#6034)
* Improve generated code in APIs so to use the most of Swift SDK
Improve generated code in APIHelper so to remove duplicated code and reuse existing checks

* run ./bin/swift3-petstore.sh

* Run ./bin/swift3-petstore-all.sh to update all the Petstore samples

* Restore old implementation and fix using .isEmpty in place of .count

* Run scripts to update pet store samples

* Reverte changes that use reduce

* Bug fixes on APIHelper template
2017-07-21 21:43:21 +08:00
ehyche
2be2ee080b Fixes for swift4 language (#6116)
* Fix build error in Xcode 9 beta 3, as .compact is no longer defined

* Add test schema for Swift 4 and associated script and config files

* Add test app for swift4Test.json schema

* Make integer, Integer, int, and Int32 types map to Swift Int type instead of Int32 type

* Add CodingKeys to model template, which allows us to serialize/deserialize variable names that are different than property names

* Make updates to Swift 4 test schema

* Fixes for unit test app for swift4Test.json Swift 4 test schema
2017-07-20 15:45:09 +08:00
Jean-François Côté
bca35f6645 Fix for issue #6094 (#6121) 2017-07-20 15:42:56 +08:00
wing328
f1b5ad2e0f Merge pull request #6106 from davidpasztor/fix_issue5878
[Swift3] Fixed compilation issue on macOS
2017-07-20 01:06:58 +08:00
Pierre Lamot
9e51c45dd2 [Python] True, False, nonlocal are python3 reserved words (#6111) 2017-07-19 11:16:20 +02:00
David Pasztor
9c87cab4e6 4-space indentation used instead of tab 2017-07-19 10:10:10 +01:00
Pierre Lamot
6b85416f47 [Flask] self and None are reserved words (#6111)
* setReservedWordsLowerCase was called twice, the second time without self and None

* True, False and nonlocal are python3 reserved words
2017-07-19 10:04:27 +02:00
David Pasztor
a3871d1f33 fix issue 5878 2017-07-18 17:05:27 +01:00
Jean-François Côté
dad3e6018a [Java Play Framework] Fix collection utils (#6025)
* Major fix to the collection handling in Play Framework Generator

* Major fix to the collection handling in Play Framework Generator (small details missing from previous commit)

* Add the fix to header and form parameters too
2017-07-18 19:36:43 +08:00
Greg Huang
dafefc06f1 fix issue #6029 (#6033) 2017-07-18 14:16:35 +08:00
Ximo Guanter
5aced55075 Fix Java Play server generator when path variables aren't camelCase (#6086) 2017-07-18 01:33:52 +08:00
Ian O'Neill
dc800c79cc [JaxrsResteasy] Fix EAP dependencies for Java 8 (#6058)
* Depend on Joda by default, like the default JAX-RS server
* If Java 8 is specified add Jackson JSR-310 dependency and import
  in the JacksonConfig.
2017-07-17 21:44:51 +08:00
Sodala
24d7700cd0 fix npe :Unboxing of '(count < numVars) ? true : null' produce npe (#5917)
* fix npe :Unboxing of '(count < numVars) ? true : null' may produce 'java.lang.NullPointerException

* add test to cover reconcileInlineEnums method.
2017-07-17 19:10:54 +08:00
Alex Nolasco
93415af92d [Objc] Class not identified due to Circular imports (#6069)
* [Objc] Class not identified due to Circular imports

* Pet store generated sample
2017-07-17 17:14:05 +08:00
Jean-François Côté
bf74de3a5a [Java Play Framework] Fix to the default values (#5879)
* Fix to the default values. It did not take care of the "default" and also was setting to a bad default when not set.

* Just make a difference between string and non string instead of placing all types in the mustache file
2017-07-17 16:51:02 +08:00
Réda Housni Alaoui
a2d19a1feb Bugfix: Generated typescript-angular code fails to compile when models.ts file is empty (#6076)
* Fixed

* Fixed
2017-07-17 16:37:37 +08:00
Isman Usoh
4be4ef6712 Fix Enum model display duplicate description #6072 (#6073) 2017-07-17 16:05:10 +08:00
Matthias Walthart
e8bdf71ffc Added not null check in code generator. (#6079)
* Added not null check in code generator.

* Replaced tabs with whitespaces.
2017-07-17 15:10:43 +08:00
wing328
11d9cbd597 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-16 16:10:08 +08:00
wing328
34e94fbed0 Updated versions for 2.2.3 release and other minor enhancements (#6070)
* update pom to prepare 2.2.3 release

* add header support to qt5, update samples

* update version in java help

* update to xcode 9

* rollback to xcode8.2
2017-07-16 01:03:40 +08:00
Tony Tam
85dc2a437a updated qt5 headers 2017-07-14 16:52:14 -07:00
Tony Tam
9ea6e7a06b expose default headers, add headers to request 2017-07-14 16:22:09 -07:00
zmoore-usgs
7e723e4ae5 Updated comments 2017-07-14 14:17:12 -05:00
zmoore-usgs
4e40d370a6 Switched methods to use the list application functions rather than the string application functions. 2017-07-14 14:10:48 -05:00
zmoore-usgs
7d82b05d4c Moving instantiationTypes, typeMappings, languageSpecificPrimitives, additionalProperties, and reservedWordsMappings out of configOptions and converting it into a list, rather than being a comma-separated string. 2017-07-14 12:54:09 -05:00
wing328
c1825b417c use html-escaped description for C# (client, server), Java server (#6061) 2017-07-14 23:36:24 +08:00
Lars Wander
9c56bb63d8 [Java] Escape descriptions in javadocs (#6040)
The [java8 doclint](http://openjdk.java.net/jeps/172) rejects unescaped
HTML chars such as `<`, making some generated clients unbuildable with
java8. Seems a few property descriptions were using the `{{{` instead
of `{{` preventing those HTML chars from being escaped properly.
2017-07-14 22:07:19 +08:00
wing328
804967eeed Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-14 16:31:44 +08:00
Johan Rouve
f90249caf4 Remove jetty server port (#6049) 2017-07-14 15:28:31 +08:00
wing328
523e42160e Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-14 13:11:47 +08:00
wing328
ba704e3ac8 add @summary tag to ts client (#6052) 2017-07-14 13:10:36 +08:00
wing328
094dbd00ed Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-13 23:35:22 +08:00
Isman Usoh
fdaf8ea65f [Typescript-Angular2] add @summary JSDoc tag (#6028)
* add @summary JSDoc tag

* updatee sample and create windows script for typescript-angular2

* Fix for Review
2017-07-13 23:33:08 +08:00
Tino Fuhrmann
c0039ed570 [ts-node] Fixed html escape bug in serialize/deserialize (#6043) 2017-07-13 23:32:06 +08:00
wing328
21d33c4054 skip pattern check for byte array in C# (#6048) 2017-07-13 23:25:23 +08:00
wing328
6b07af8d4e [TypeScript] rename Angular, Angular2 generators (#6046)
* rename ts angular, angular2, update scripts

* update angular4 script
2017-07-13 23:24:21 +08:00
boosh
d20537b263 Clarify the Javascript README for local use (#6044)
- Add instructions for installing the generated Javascript library locally without publishing to a remote npm registry.
- Clarify what `main.js` is.
2017-07-13 23:12:56 +08:00
Javier Velilla
9f711ae7e8 [Eiffel] Add Eiffel API client generator (#6036)
* Initial Eiffel Client code generator
TODO API and Domain model

* Updated EiffelClientCodegen to support Eiffel code style.
Added mustaches templates for models and apis.
The last one still under development.

* Updated templates, initial API generation.
Added client request template.

* Updated api.mustache style

* Updated code generation with a new directory layout.
Added test case generation, clean code.

* Updated Code generator, added apidoc and modeldoc
Updated readme file

* Added a Basic JSON Deserializer
Updated API client to support by default a basic json (de)serializer and let
the user customize then if needed.

* Updated Eiffel code generator to use Eiffel feature name style.
Updated templates to follow Eiffel style.
Improved feature descriptions.

* Added model inheritance support.
Removed unused code.

* Updated Eiffel code templates, refactor remove obsolte feature calls.
Added Eiffel sample in samples/client/petstore/eiffel.

* Updated Java code style.

* Fixed formating, using spaces instead of tabs.

* Updated EiffelCodeGenarator typeMapping.
Added TestCases for EfiffelClientOption and ModelTest cases.
Updated sample code to use the lastest changes.

* Restore keyword `nil' in Go Language.
2017-07-13 22:51:24 +08:00
beatcracker
ef076c34b4 [csharp] Update nuget.exe URL for latest version (#6031)
* Set nuget.exe URL to latest version

Fix #6022

* Update samples
2017-07-13 22:49:56 +08:00
stkrwork
4f33a02868 Swagger version info (#6039) 2017-07-13 17:32:24 +08:00
stkrwork
9d4ebf6998 Swagger version info (#6038) 2017-07-13 17:31:23 +08:00
wing328
67bbb8349e Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-13 15:39:05 +08:00
wing328
38b072556a run mvn formatter:format on swagger codegen cli 2017-07-13 15:38:02 +08:00
wing328
eb498e23b8 run "mvn formatter:format" on maven plug-in 2017-07-13 15:37:15 +08:00
wing328
ef5c6a939d Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-13 15:36:44 +08:00
wing328
1e53557570 run "mvn formatter:format" on swagger-generator 2017-07-13 15:36:04 +08:00
wing328
e964702550 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-12 21:54:23 +08:00
wing328
0416b0332f Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-07-11 21:57:38 +08:00
wing328
74b0c04b2f replace tab with 4-space in restbed class 2017-07-11 21:57:00 +08:00
wing328
42b77a303b [Java][resttemplate] fixed build.gradle (#6020)
* fix build.gradle for resttemplate

* rename pom.xml id to avoid dup
2017-07-11 18:33:53 +08:00
mobreza
5d32edd964 Java support for application/xml (#5962)
* WIP: CodegenProperty with XML

* WIP: CodegenModel XML bits

* WIP: Jackson XML

* WIP: Java templating

* WIP: Java client withXml flag

* WIP: resttemplate work

* WIP: withXml only when Jackson is used

* WIP: Tabs to spaces

* WIP: java-petstore-resttemplate-withxml sample

* WIP: language: spring

* WIP: language "spring" using library "spring-boot" should include apiPackage in @ComponentScan to detect the API

* WIP: javax.xml for non-Jackson Java and enabled payload logging for jersey2

* WIP: updated java petstore samples

* WIP: JavaSpring with non-jackson XML

* WIP: bin/spring-all-pestore.sh
2017-07-11 17:01:51 +08:00
stkrwork
f2f303b2e8 [C++] [Restbed] Reworked Resource class names (#6017)
* - Added Restbed Generator

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

* Changed it to respect alphabetical order

* Made the string joining java 7 compatible

* Added samples

* Started work on restbed improvment

* - Updated samples
- Reworked Resource class names
- Added vendor extension for new formatted resource class names

* fix indention
2017-07-11 00:37:08 +08:00
Konstantin Simon Maria Möllers
d522236cec Symfony generator enhancements (#6016)
* Fix error in Symfony models #5985

* Parse Symfony params #5985

* Implement auth metods in Symfony #5985

* Make "get" to "is" in Symfony's booleans #5985

* Use `camelize` instead of `initialCaps` in Symfony #5985

* Use File.separator instead of "/" in PHP/Symfony #5985

* Improve README generation for Symfony #5985

* Create an options test for Symfony #5985
2017-07-11 00:34:43 +08:00
wing328
d56b7ae037 Merge branch 'feature/java-vert.x' of https://github.com/phiz71/swagger-codegen into phiz71-feature/java-vert.x 2017-07-10 23:41:47 +08:00
topce
d5a8ecfe1c fix blob issue (#5972) 2017-07-10 22:26:27 +08:00
mmosemmle
455e53b2ae [CPP] Fix cpp escape issue part of #5949 (#5952)
* Fix cpp escape issue.

* whitespace.
2017-07-09 16:34:57 +08:00
serezha93
140826b47f minor fixes (#5981)
* Update configuration.mustache

added return tag in PHPDoc

* made sanitizeFilename as static method

* updated petstore
2017-07-09 16:23:18 +08:00
wing328
247cdf273b Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-09 02:08:22 +08:00
ehyche
2ce3365eaf Add a swift4 client generator (#6010)
* Add a swift4 client generator

* Updates per review comments:

- Changed Alamofire dependency from 4.0 to 4.5
- Added "Codable", "Encodable", and "Decodable" to list of reserved words in generator
- Ran "pod update" in default, promisekit, and rxswift samples test projects
2017-07-09 01:33:52 +08:00
wing328
b852e61ee9 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-09 00:59:41 +08:00
Frank Fleige
0274ba79ad #6012 - fixed mustache template for lumen server (#6013) 2017-07-09 00:51:47 +08:00
wing328
c1e1d23b05 fix ts ng2 option test 2017-07-08 22:37:45 +08:00
Florent Chamfroy
d044498de4 adding Vert.X Codegen
Adding the possibility to generate java Vert.X servers.
It uses Vertx-Swagger-Router project.
It can generate an Async callback version or a Rx version.
2017-07-08 16:10:07 +02:00
wing328
ed11da25fc Merge branch '2.3.0' into wing328-ts_angular2_typings 2017-07-08 19:03:31 +08:00
marcotta
7ae4146a2b [objc] Initialize default BOOL with @(YES)/@(NO). (#5982) (#5999)
This will prevent submitting integer numbers instead of booleans
when posting objects to the REST API.
2017-07-07 17:16:49 +08:00
wing328
d8e7a11411 remove options to set token 2017-07-07 17:11:34 +08:00
Joel Reymont
4b9d0e6a10 Fix Erlang auth method code generation (#5994)
Broken code is generated when no authentication methods are supplied
in the API schema. Fix this by providing code to fall back to.
2017-07-07 15:14:06 +08:00
Bryon Williams
0e9f531569 allow accessToken to be specified by string or function; restores functionality of PR #4361 (#5974) 2017-07-06 14:28:02 +08:00
topce
01ea4dbb08 fix config issue (#5971) 2017-07-06 00:33:57 +08:00
wing328
e18cf6bd4f update rxjs version 2017-07-05 23:40:21 +08:00
Konstantin Simon Maria Möllers
8e62ef7b8c [PHP][Symfony] Add a Symfony server generator #3486 (#5973) 2017-07-05 16:43:56 +08:00
Akhil Kedia
f9c9a08a1c Tizen client bugfixes (#5979)
* [Bugfix] Removed a debug print statement that sometimes caused crashes.

Change-Id: I62cf8d70faddfe855c7150927441465466dbaa53
Signed-off-by: akhilkedia94 <akhil.kedia@samsung.com>

* [Workaround/Fallback] Fix conversion of string representation of Json to JsonNode

Changed the conversion to consider any non-parseable string as a single "json string" object.
This is just a fallback to handle non-ideal server responses.

Change-Id: I5339d385e57b6225706fbaaaba1c04003c3810e9
Signed-off-by: akhilkedia94 <akhil.kedia@samsung.com>

* [Bugfix] Correct Handling of Non-String Value Types in Json Maps

Inside the Json Maps in server response, the earlier code was bugged if the "value" in the map was of a non-string type.

Change-Id: I8c34c7e9470fc0743b509917f8098b2ebe2bd4e5
Signed-off-by: Akhil <akhil.kedia@samsung.com>

* [BugFix/WorkAround] No "isPrimitiveType" in BodyParams

The "isPrimitiveType" value tells us whether the data type of a particular parameter is one if the primitive types.
This value is not present when iterating over all the body parameters, but is somehow present when
iterating over all parameters and filtering for only BodyParams.

Change-Id: I5b0a97e615b7300c33dc7f3d4673ad5e87c36f7e
Signed-off-by: Akhil <akhil.kedia@samsung.com>

* [Bugfix] Making Functions Static to Avoid Name Clashes

Multiple functions in different classes might named the same, hence leading to multiple functions of the same name.
Using static to have only internal linkage for these helper functions.

Change-Id: I97fb1dd64b176c4a2b95e6d923723469852bc85a
Signed-off-by: Akhil <akhil.kedia@samsung.com>

* [Enhancement] Minor Improvements to Documentation

Added Modules in Doxygen Doc, Improved MD documentation

Signed-off-by: Akhil Kedia <akhil.kedia@samsung.com>

* Regenrated petstore sample

Update the petstore sample with newest template files
Deleted older sample in samples/client/petstore/tizen/client/
The old samples use oblsolete APIs
(These are APIs for Tizen 2.0, removed in 2.4, current release is 3.0)

Signed-off-by: Akhil Kedia <akhil.kedia@samsung.com>

* [Bugfix] Fixes incorrect headers sent (#5980)

Regenerated the petstore as well.

Signed-off-by: Akhil Kedia <akhil.kedia@samsung.com>
2017-07-05 01:28:39 +08:00
Jan
2774d47a2b fix: es6 style of Array inheritance to fix transpiler error (#5977)
* fix: es6 style of Array inheritance to fix transpiler error

* fix: rebuild of promise-es6 petstore samples with fixed mustache
style: added space between classname and bracket

* style: rebuild javascript-all to reflect style changes in mustache
2017-07-05 01:04:07 +08:00
Julien Fouilhé
c2b575607c fix(swift3): add en_US_POSIX locale to date formatters (#5602) 2017-07-04 11:21:25 +08:00
wing328
45eb5fffc0 add ngVersion option 2017-07-04 01:00:35 +08:00
Jean-François Côté
616f57a592 Typescript-Jquery refactor/improvement proposition (#5751)
* First commit of the Java Play Framework server generator. It is highly based on Spring so there might me a couple of things that don't make sense (like options or parameters) for the Play Framework.

* Fix suggestions in the PR discussion + add .bat and .sh file as requested.

* Updated Readme.md file

* Remove unused mustache file + fix baseName vs paramName in all the mustache files.

* Fix the compilation error when we have a body which is a list or map. Doesn't fix the problem with the annotation itself.

* Fix the problem with the Http.MultipartFormData.FilePart

* First iteration of updating the typescript-jquery template/generator

* first RC of the new version of Typescript-JQuery using better models.

* Minor fix to the generation

* first RC of the new version of Typescript-JQuery using better models.

* Add an options for people using this client in a legacy app and that already have jquery loaded with a script tag somewhere

* Generation of the samples based on the latest changes from the typescript-jquery generator

* Fix to the check if the value is null and undefined

* Small fix when using collection
2017-07-03 23:08:48 +08:00
Dennis Kieselhorst
3c6696be40 update Spring cloud dependency (#5947 missed the application.yml change) (#5970) 2017-07-03 21:51:31 +08:00
wing328
9a56d4560a Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-03 18:47:10 +08:00
wing328
25a46374c5 Updated Spring, Boot, Fox and Cloud dependencies (#5969)
* updated Spring, Boot, Fox and Cloud dependencies

* run scripts for java, jaxrs-cxf and spring samples (although changes are not related to my changes)

* update jersey java8 petstore samples

* update java feign samples

* update java petstore samples

* add new files for java petstore clients

* roll back spring cloud dep version

* fix jaxrs-cxf error
2017-07-03 18:44:22 +08:00
wing328
ecf924e78f [Spring] Adds feature useOptional (#5968)
* Adds Valid annotation for request body (#4847)

If useBeanValidation is active, this change will add Valid annotation to ReqeustBody

* Adds generated samples for bean vaildation in spring boot (#4847)

* Adds feature option (#3819)

When you enable the feature useOptional the JavaSpring generator will use type Optional for non required parameters.

* Adds generated sample for #3819

* Adds generated sample for #3819

* Reverts commit for bean validation

* Adds generated sample for #3819

* Reverts commit for bean validation

* Fix alignment

* update spring samples

* update pom.xml to include spring use optional samples

* update artifactId to "spring-boot-beanvalidation"

* rpelace tab with 4-space

* check mvn task result
2017-07-03 17:40:00 +08:00
wing328
76481d1d80 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-02 22:43:08 +08:00
mmosemmle
94814176b7 [CPP] Fixing some more ordering of checks (#5951)
* Fix more ordering of checks.

* Update cpp petstores.
2017-07-02 22:30:42 +08:00
wing328
15382f5b77 Merge branch 'ts_angular2_typings' of https://github.com/wing328/swagger-codegen into wing328-ts_angular2_typings 2017-07-02 22:01:10 +08:00
wing328
f3d83eb925 update ruby gem dependency version (#5964) 2017-07-02 21:46:04 +08:00
wing328
304a7ae19a fix regex escape forward slash (#5963) 2017-07-02 20:51:45 +08:00
wing328
afd535f415 rollback to 2.6.4 for jackson threetenbp in springmvc 2017-07-01 23:46:31 +08:00
wing328
8d31e57e2a fix spring dep version 2017-07-01 22:22:02 +08:00
wing328
9269dac6cf Merge remote-tracking branch 'origin/master' into 2.3.0 2017-07-01 15:47:27 +08:00
Jordan Zimmerman
40369bb819 Add java8 option 2.3.0 (#5955)
* Closes #5863

The "dateLibrary" option for java, sadly, sets a mustache value "java8". This change updates this so that "java" in the mustache
libraries means what it should mean - use all java8 classes. In this case, there's no need for the third party Base64 library
as java8's JDK has this built in. In my view, the "dateLibrary" should be deprecated but that should be a separate PR.

* Closes #5954

built and ran tests/samples
2017-07-01 15:04:18 +08:00
stkrwork
fbd888d298 [CONFIG] [APACHE] Fix for Java7 issue (#5960)
* - Added Restbed Generator

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

* Changed it to respect alphabetical order

* Made the string joining java 7 compatible

* Added samples

* fix java7 issue with apache
2017-06-30 23:58:31 +08:00
Sebastian List
f760d93cd7 Updated npm configuration to use new typescript2 typings system
This also removes the dependency to the typings project.
Issue #4761
2017-06-29 23:00:22 +08:00
Gavin Sitthiampornphan
d210236040 fix(ts-fetch): preserve available headers (#5650) 2017-06-29 22:47:03 +08:00
rubms
6fa4853fe7 [NancyFx] Fixed bug in the generation of enum models that were generated with compilation errors (#5910) (#5913)
* NancyFx - Fixed bug in the generation of enum types in the NancyFx server, which cause enums to be generated as general classes, without the enum values and with compilation errors (#5910)

* NancyFx - Changes in the nancyfx sample after the updates in the nancyfx model.mustache template. (#5910)
2017-06-29 22:35:41 +08:00
Juan Pablo Marzetti
64df75d8b6 Docs and examples need model name to be passed as baseType (#5944) 2017-06-29 22:34:12 +08:00
Dennis Kieselhorst
407d728908 updated Spring and Spring Boot dependencies (#5948) 2017-06-29 22:28:08 +08:00
wing328
846ee63f38 [C#] Update C# API client dependencies to the latest version (#5935)
* update C# client dependency

* add back csproj file for c# petstore

* update test result

* downgrade version 1.51.3

* add logo as embedded resource
2017-06-29 21:37:24 +08:00
Dennis Kieselhorst
7a9981b350 updated swagger-ui dependency (#5945) 2017-06-29 16:12:33 +08:00
Jordan Zimmerman
b2efb70410 Support a true "java8" option (#5864)
* Closes #5863

The "dateLibrary" option for java, sadly, sets a mustache value "java8". This change updates this so that "java" in the mustache
libraries means what it should mean - use all java8 classes. In this case, there's no need for the third party Base64 library
as java8's JDK has this built in. In my view, the "dateLibrary" should be deprecated but that should be a separate PR.

* updated samples

* fixed tests for new CLI java8

* regenerated samples after master merge

* oops - left in an end tag after master merge

* rerun checks

* rerun checks
2017-06-29 13:23:44 +08:00
Dennis Kieselhorst
a64c7d7986 updated jackson-version (#5943) 2017-06-29 10:56:12 +08:00
Dennis Kieselhorst
eb6c6d0698 use enforcer-plugin to fix Maven warning (#5940) 2017-06-29 00:22:26 +08:00
Dennis Kieselhorst
e3da4f9fde updated maven-war-plugin (#5941) 2017-06-29 00:14:16 +08:00
wing328
fd44d01d9c Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-28 18:03:28 +08:00
Paŭlo Ebermann
d31d431071 #5147: allow multiple for other plural options, too (#5860)
* Issue #5147: allow multiple occurrences for other plural options, too.

* Use two --additionalProperties parameters in sample generation script.
2017-06-28 17:55:23 +08:00
wing328
5d7ff49658 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-28 16:23:55 +08:00
Dennis Kieselhorst
4f6e2857cc removed obsolete jersey2-version (#5933) 2017-06-28 16:22:29 +08:00
wing328
cd0ec4ed71 Merge branch '2.3.0' of https://github.com/swagger-api/swagger-codegen into 2.3.0 2017-06-28 15:36:14 +08:00
wing328
e7561a11f4 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-28 15:35:24 +08:00
stkrwork
3c0623cce1 ApacheConfGen for HTTP Basic Authentication Proposed implementation (#5800)
* - Added Restbed Generator

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

* Changed it to respect alphabetical order

* Made the string joining java 7 compatible

* Added samples

* Auto stash before merge of "master" and "origin/master"

* added missing apache2 config gen in services file

* - Added new Config Type
- Added Samples
- Added sample generating scripts
- Renamed Apache2Confgen to Apache2ConfigCodegen

* - Added Samples
- Added new config type
- Added sample generating scripts
- Renamed Apache2Confgen to Apache2ConfigCodegen
2017-06-28 02:48:53 +08:00
Brendan Burns
91f470e41f Add a function for injecting your own Authentication into the Typescript-node client (#5865) 2017-06-28 00:23:40 +08:00
Tony Tam
1e2465735b [2.3.0] Update Swagger Codegen to v1.5.15 (#5929)
* updated versions

* match fix in 2.2.x branch

* updated with 73df07d64c

* regenerate pom.xml for jaxrs-cxf-petstore-server-annotated-base-path

* regenerate pom.xml for jaxrs-cxf-petstore-server-non-spring-application
2017-06-28 00:13:52 +08:00
Tony Tam
73df07d64c Merge branch 'master' into issue-5753 2017-06-26 13:15:00 -07:00
Tony Tam
8237e491ac fixed order of checking 2017-06-26 13:10:31 -07:00
wing328
1011b3ae7c Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-27 00:42:19 +08:00
wing328
5fbb674cac fix retrofit okhttp version 2017-06-27 00:41:08 +08:00
wing328
49dbb51957 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-06-26 23:39:04 +08:00
wing328
522d704f7a [Java] Update dependencies for Java clients (#5926)
* update dep for java jersey1, jersey2

* update sbt dependency for jersey2

* update dep for java okhttp-gson, resteasy, resttemplate

* update dep for java retrofit 1.x, 2.x

* update java petstore samples
2017-06-26 23:18:45 +08:00