Commit Graph

4558 Commits

Author SHA1 Message Date
Joseph Moore
d40f7a41b6 Add triple-mustache to all instances of vendorExtensions.extraAnnotation. (#4553)
This covers the usages that weren't fixed in #3825

Triple mustache is required because annotations may contain chars like
"=" that would be mistakenly encoded.
2017-01-13 23:01:15 +08:00
eblis
af4319015e When reading mustache template files assume UTF-8 encoding, fixes #4544. (#4545) 2017-01-13 00:11:07 +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
J. Fiala
a6b0518bf0 replace tabs 2017-01-10 18:03:51 +01: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
Yuta HIGUCHI
de5ea8a9d6 [JAX-RS/jersey2] Fix for incorrect JSON field name capitalization (#4458)
* Fix for all capital field name

* Cosmetic: remove trailing spaces

* Adding ./bin/jaxrs-petstore-server.sh output.
2017-01-10 23:37:25 +08:00
wing328
4d4af71446 [CI] Add scripts to detect carriage return and tab (#4526)
* add script to detect carriage return

* add check for generator as well

* add fail fast to travis config

* remove tab

* move scripts under bin/utils

* remove carriage return

* move scripts to bin/utils
2017-01-09 18:29:41 +08:00
Jeff Haynes
380bed15d3 Issue 4244 - Add x-discriminator-value (#4252)
* Fixes for issue 4226. Detects and warns about more than one inline object; sets discriminator on CodegenModel; Adds templates to other Java languages
Changes to be committed:
	modified:   modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java
	modified:   modules/swagger-codegen/src/main/resources/Java/typeInfoAnnotation.mustache
	new file:   modules/swagger-codegen/src/main/resources/JavaInflector/typeInfoAnnotation.mustache
	new file:   modules/swagger-codegen/src/main/resources/JavaJaxRS/typeInfoAnnotation.mustache
	new file:   modules/swagger-codegen/src/main/resources/JavaSpring/typeInfoAnnotation.mustache

* Add vendor extension for x-discriminator-value
Changes to be committed:
	modified:   modules/swagger-codegen/src/main/resources/Java/typeInfoAnnotation.mustache
	modified:   modules/swagger-codegen/src/main/resources/JavaInflector/typeInfoAnnotation.mustache
	modified:   modules/swagger-codegen/src/main/resources/JavaJaxRS/typeInfoAnnotation.mustache
	modified:   modules/swagger-codegen/src/main/resources/JavaSpring/typeInfoAnnotation.mustache

* Add "visible = true" to @JsonTypeInfo jackson annotations for Java languages
Changes to be committed:
modified:   modules/swagger-codegen/src/main/resources/Java/typeInfoAnnotation.mustache
modified:   modules/swagger-codegen/src/main/resources/JavaInflector/typeInfoAnnotation.mustache
modified:   modules/swagger-codegen/src/main/resources/JavaJaxRS/typeInfoAnnotation.mustache
modified:   modules/swagger-codegen/src/main/resources/JavaSpring/typeInfoAnnotation.mustache
2017-01-09 18:28:27 +08:00
Alex Nolasco
26ead9b58f Issue 4416 (Assist escapeReservedWord with custom mappings) (#4480)
* Preliminary implementation for issue-4416

* Updated README.md with  reserved-words-mappings  parameter.
2017-01-09 18:22:25 +08:00
Sreenidhi Sreesha
81b5b78fc2 Enable support for vendor extensions in CodegenResponse. (#4517) 2017-01-08 17:58:07 +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
J. Fiala
6b17b92bb6 add check for isInteger (integer/decimal) 2017-01-06 16:46:59 +01:00
J. Fiala
24f486164a add test for options #4091 2017-01-06 16:18:14 +01:00
J. Fiala
5b532fd10e update language jaxrs (Jersey2) and samples 2017-01-06 15:16:39 +01:00
J. Fiala
dde24eb9c2 update jaxrs jersey1 templates and sample output #4091 2017-01-06 15:10:40 +01:00
JasonNorth
5686109cc9 Allow templates to use maxItems and minItems for Arrays (#4309)
Issue 3925
2017-01-06 19:57:28 +08:00
Frédéric Rodrigo
c0f1716fe7 [html2] Open the description field that contains the description and required switch, in place of only show the field type by default (#4489) 2017-01-06 19:40:06 +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
Brian Voss
43ab14b200 Adding Curl connect timeout configuration to PHP generation templates (#4500) 2017-01-06 19:14:39 +08:00
Simon Morris
aa1dc0fdd2 Updated Nancy from 1.4.1 to 1.4.3 (#4482) 2017-01-06 01:09:32 +08:00
Brian Shamblen
b224474a43 Fixes #4481 (#4493) 2017-01-06 01:03:18 +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
Johannes Fiala
1a1d0aebc8 add beanvalidation to jersey1 and jersey2 #4091 2017-01-04 17:36:28 +01:00
Jim Schubert
cb9a1b3b53 [csharp] Use default rather than null in ctor (#4145) 2017-01-03 18:31:26 +08:00
Jim Schubert
c94e18abd8 [codegen ignore] normalize path separator for Windows, add *.ext tests (#4476)
* [codegen ignore] Fix windows paths for ignore processing

* [codegen ignore] Add missing glob rule tests
2017-01-03 16:56:50 +08:00
Tony Tam
0252d1a534 Update to latest swagger-core, parser versions (#4472)
* updated to release versions

* fixed defaultValue objects to strings

* added top-level jackson version

* added missing dependency, removed from swagger-core
2017-01-03 16:41:16 +08:00
mkarnik
ababec69dd [JAX-RS RESTEasy][issue #4447] Added swagger annotations to model and api templates 2016-12-22 22:18:39 +01:00
wing328
aed21bba73 better code format for nodejs server (#4411) 2016-12-23 02:05:10 +08:00
Jun Mukai
27f1b6ee98 Introduce NodeJS codegen for Google Cloud Functions. (#4406)
* Another approach: extending NodeJS server to support GCF.

This does not add a new language, but adding some client options
to support Google Cloud Functions (GCF).

* Add URLs for how to deploy the generated code.

Adds the client options help message and the README.md file.
2016-12-22 23:11:52 +08: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
Michael Fulton
d7afb22f1f Fix Integer stub value defaulting to String in nodejs-server if format not specified (#4436)
* check if property is a BaseIntegerProperty. This can occur when format is not specified in Swagger definition

* Change coding style to be more consistent
2016-12-21 15:08:14 +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
4c398a4cba Merge pull request #4434 from chasetec/master
Update DefaultGenerator.java to call close()
2016-12-20 15:52:00 +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
Matthieu Chase Heimer
da1e07af21 Update DefaultGenerator.java to call close()
Need to call out.close() after IOUtils.copy(in, out); when writing supporting files.
2016-12-19 13:25:10 -06: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
wing328
6bf721f2e3 add parameter as reserved keyword (#4410) 2016-12-17 00:29:06 +08:00
wing328
2172cfef84 add warning message for null inner type (map/array) (#4408) 2016-12-16 19:41:54 +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
Nicholas DiPiazza
c6c8ffe4e0 Do not NPE when array properties items are not specified (#4063) 2016-12-16 19:04:13 +08:00
Brian Shamblen
bd81f3264d [html2] Fix import statements for most languages (#4243)
* [html2] Clean up namespace issues in code samples

* pull c# and php package namespace from --additional-properties arg

phpInvokerPackage arg now sets the PHP namespace and packageName sets
the CSharp namespace. invokerPackage still works for Java and Android
namespace.
2016-12-16 18:06:28 +08:00
Christoph Keller
6ade001663 CodegenResponse.isListContainer is false for array types. (#4400)
CodegenResponse's isListContainer property is always false for "array" types. Don't know where the check for "list" comes from but in CodegenOperation, there's a check for "list" and "array".
No mustache file makes use of isListContainer inside responses yet, so should not change any existing behavior.
2016-12-16 12:08:24 +08:00
Yohana Khoury
91af8066cd boolean values from JSON are treated as strings (#4229)
* Change the value types in additionalProperties and dynamicProperties to Object instead of String.
Change methods that insert values to these maps to use Object as the type of the value instead of String.

* Fix run-all-petstore run: use toString instead of casting
2016-12-16 11:56:38 +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
870c745e6f minor fix to java client options test 2016-12-15 19:30:35 +08:00
Cliffano Subagio
3bc3a40073 [java] Add licenseName and licenseUrl options. 2016-12-15 19:30:35 +08:00
wing328
7fc8b24001 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-12-15 00:42:51 +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
wing328
0df8bd2140 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-12-14 16:27:14 +08:00
wing328
3957a1db1a Merge branch 'feature/file-response' of https://github.com/www2k/swagger-codegen into www2k-feature/file-response 2016-12-14 16:26:34 +08:00
Matan Rubin
5867728724 [JaxRS-CXF][bug #4330] support containers in return types (#4339)
* [JaxRS-CXF][bug #4330] support containers in return types

before this commit if a method returned a container (List or Map) of
THING (i.e. List<THING> or Map<String, THING>) the generated return type would
drop the container and only leave THING.
this commit fixes this issue such that the container type is properly
generated.

* regenerate jaxrs-cxf petstore sample
2016-12-14 13:58:56 +08:00
Bruno Santos
90cf1cab53 Date type should not include time (#4385)
Removed time section from Date type in example generators.

Issue #4359
2016-12-14 11:51:14 +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
wing328
b33d4ec30c add enum_outer_doc.mustache for android (#4381) 2016-12-13 17:54:23 +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
weiyang
beeb02a2dc [html] Add type anchor to body param block (#4368)
* [html] Add type anchor to 'bodyParam' block

Signed-off-by: weiyang <weiyang.ones@gmail.com>

* [html][samples] Add type anchor to 'bodyParam' block

Signed-off-by: weiyang <weiyang.ones@gmail.com>
2016-12-13 15:52:22 +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
Paul Vollmer
77b92d7d11 Fix go client auth UserName var issue (#4245) 2016-12-13 00:19:20 +08:00
wing328
62aabfc6c1 Merge branch 'jfiala-beanval_2549' 2016-12-13 00:05:03 +08:00
wing328
d9de3b540d Merge branch 'beanval_2549' of https://github.com/jfiala/swagger-codegen into jfiala-beanval_2549 2016-12-13 00:01:44 +08:00
Dmitry Solovyov
bf50ea1366 fix the value for @Generated java annotation (#4366)
com.my.Generator.class.toString() returns "class com.my.Generator", and this value is then used in the javax.annotation.Generated annotation like that: @Generated(value = "class com.my.Generator").
Should use Generator.class.getName() instead, so we end up with @Generated(value = "com.my.Generator")
2016-12-12 18:38:39 +08:00
Frederick Cai
8e200970d4 [typescript-angular2] build to dist folder 2016-12-11 23:39:18 +13:00
wing328
130161fc43 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-12-10 01:02:22 +08:00
Sreenidhi Sreesha
c83c813865 Refactor Boolean properties to boolean. (#4326)
There is no good reason to use Boolean instead of boolean.
Using Boolean will lead to handling "null" state which is confusing.

This change removes changes the type of Boolean properties to boolean.
2016-12-10 00:37:50 +08:00
wing328
b68e4b05d9 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-12-09 17:43:56 +08:00
Thomas Hoffmann
7a97c3c375 Still respect super.equals even for models without own vars (#4259) 2016-12-09 17:27:55 +08:00
Vlad Frolov
4d2a13018b [Python] Make the code look Pythonic (#4352) 2016-12-09 17:26:23 +08:00
wing328
2e80d2fb40 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-12-09 15:56:06 +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
ceb9cb79cd Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-12-09 00:34:19 +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
9051848ffa minor fix to petstore test spec 2016-12-08 23:24:20 +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
Josh Williams
535b233ff7 Fix for #4344 - update compile.mustache with new dependencies (#4345)
* Fix for #4344 - update compile.mustache with new dependencies

* Fix compile.mustache to use generatePropertyChanged flag for DLLs
2016-12-08 16:14:25 +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
a0c4b58b53 add guid mapping for c# 2.0 (#4347) 2016-12-08 15:59:06 +08:00
wing328
939a8052f3 [Java] Uncomment @Max @Min syntax in bean validation files (#4340)
* uncomment max min syntax in bean validation files (java)

* remove eol at the end of the file
2016-12-08 15:22:55 +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
Jim Schubert
8e1eeaa737 [csharp] Remove generatePropertyChanged when explicitly false (#4280) 2016-12-07 01:04:13 +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
Alec Henninger
2b240a4eb9 Use JavaScript codegen in JavaScript test (instead of Java) (#4316) 2016-12-05 10:56:03 +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
18420dd7f9 add serialVersionUID to java model (#4311) 2016-12-02 17:59:35 +08: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
fdb6d3020c Merge pull request #4305 from wing328/android_object_reserved_word
[Android] add Object as reserved keyword in Android generator
2016-12-01 19:29:43 +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
564e061da6 add Object as reserved keyword in Android 2016-12-01 17:34:38 +08:00
Sreenidhi Sreesha
af0d217c38 Fix basePath set to null when generating API files. (#4304) 2016-12-01 15:46:44 +08:00
jaz-ah
0a97b9c568 make sure to camelize properly before checking for reserved words (#4302) 2016-12-01 11:49:56 +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
wing328
5b90276dae Merge pull request #4202 from gierschv/fix-swift3-inheritance
fix(swift3): multi-level inheritance support
2016-11-28 22:21:32 +08: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
cbornet
bcc7e69fcc [Flask] Add packaging support 2016-11-23 18:40:37 +01: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
wing328
44ca30df63 Merge pull request #4215 from cbornet/flask_param_name
[Flask] fix parameter naming
2016-11-23 15:42:42 +08:00
Sreenidhi Sreesha
2f80568658 Refactor code to make it more readable. (#4224) 2016-11-23 15:13:15 +08:00
plankswert
ba194ba361 Added support for string responses (#4057)
* Added support for string responses

When a method/URL/response is defined to return string:
- If no content types are define, default to 'text/plain' instead of
  'application/json'
- Add response handler, that returns the reponse string as-is if response
  content-type is 'text/plain'

* Removed use of unused tag vendor tag

- The tag was vendorExtensions.x-codegen-response.isPrimitiveType
2016-11-23 14:31:31 +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
58b66a0b0a python code style enhancement (#4238) 2016-11-22 23:01:41 +08:00
wing328
474dae08cf update NodeJS readme to remove oudated doc (#4232) 2016-11-22 10:42:15 +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
1968bead43 Merge pull request #4221 from wing328/swift_generator
[Swift] add ErrorResponse as reserved word in Swift generators
2016-11-21 01:00:17 +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
wing328
e7e99eb69f add ErrorResponse as reserved word in Swift generators 2016-11-21 00:38:01 +08:00
cbornet
9322c8fb0e [Flask] fix parameter naming 2016-11-20 11:21:09 +01: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
jfiala
e4f27bc7a7 make test invocations compileable #2549 2016-11-19 11:55:22 +01:00
jfiala
89ee2b1c91 fix JDK 1.7 issue with generics by casting to Set #2549 2016-11-19 11:41:59 +01: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
Christophe Bornet
df15799839 [Flask] Add generated tests (#4209) 2016-11-19 16:31: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
95ac238026 [Typescript] Add Error to the list of reserved words that must be escaped (#4203)
* Add Error to the list of reserved words that must be escaped for Class-generation

This fixes a part of #2456.

* add in special casing for the model names to not clobber existing language type names

* address formatting issues to be in line with language convention
2016-11-19 15:51:14 +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
www2k
ed1b6075e9 Add file response support for typescript-node 2016-11-19 07:49:48 +09:00
www2k
e14be8bab9 Support file response schema 2016-11-19 07:49:48 +09:00
www2k
0a5b0bb8ce Add test for file response schema 2016-11-19 07:49:48 +09:00
RaphC
a260636a48 #3908 make a copy of vendorExtensions map instead of copying the reference (#4093)
* #3908 make a copy of vendorExtensions map instead of copying the
reference

* using 4-space instead of tab.

* make a copy of vendorExtensions map instead of copying the reference
2016-11-18 16:52:42 +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
wing328
359e52b173 Merge pull request #4188 from cbornet/flask_operations
[Flask] Use x-swagger-router-controller in for operation routing
2016-11-18 14:23:45 +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
James Hitchcock
5baa715603 Remove opening PHP tag from PHP code sample (#4212) 2016-11-18 14:16:35 +08:00
Nick Maynard
b7e9603e63 jaxrs-cxf-cdi :: Add a basic JAX-RS Application and CDI fixes (#4196)
* Add a basic JAX-RS Application and CDI fixes

* jaxrs-cxf-cdi :: Fix samples generation template dir

* jaxrs-cxf-cdi :: Regenerate samples

* jaxrs-cxf-cdi :: Clean up some checkstyle warnings
2016-11-18 14:00:53 +08:00
wing328
3d476debaf Merge pull request #4178 from cbornet/flask
[Flask] Add models support to Flask Connexion codegen
2016-11-18 13:56:59 +08:00
Sanjeewa Malalgoda
61f6c94351 update readme description (#4207) 2016-11-18 13:43:11 +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
cbornet
1e6cab8a03 [Flask] Use x-swagger-router-controller in swagger.yaml for operation routing
Fix #4106
2016-11-17 19:21:05 +01:00
cbornet
e5daa6855c add models support to flask 2016-11-17 18:30:59 +01:00
wing328
d6e8fb0194 Merge pull request #4204 from bshamblen/master
[html2] Add missing enums to parameters
2016-11-17 16:23:33 +08:00
Brian Shamblen
97722437c4 Add missing enums to properties 2016-11-16 15:42:27 -08:00
Vincent Giersch
bd06a629c6 fix(swift3): multi-level inheritance support
Supports multi-level inheritance to avoid having the variables from
the parents of level > 2

This commit also fixes the comparison of the variables when skipping
the variables in the children classes by only comparing their names
(in some cases some parent variables were present in children classes)

Signed-off-by: Vincent Giersch <vincent@giersch.fr>
2016-11-16 19:01:22 +01:00
wing328
88227e08e3 Remove Apache license from server stub generators (#4200)
* remove php apache license

* remove license in sample code, update nodejs to use unlicnese

* remove license from jaxrs generator

* remove license from server generator

* update pom.xml for jaxrs resteasy joda server
2016-11-17 00:37:21 +08:00
wing328
63c3133e88 Remove Apache license from document generator (#4199)
* remove php apache license

* remove license from doc generator
2016-11-16 23:45:55 +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
c386da6ded fix order of imports in operations 2016-11-15 21:45:15 +01: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
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
1d305b1faf add tests for java client performBeanValidation #2549 2016-11-12 23:09:57 +01:00
jfiala
a9069e8360 add perform beanvalidation flag to ok-http-gson #2549 2016-11-12 22:47:31 +01:00
Brian Shamblen
1e85ffaf04 Fixes #4097 2016-11-11 12:25:32 -08:00
Brian Shamblen
265d635eee Add markdown support to descriptions 2016-11-11 11:41:08 -08: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
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
wing328
5899554d9d Merge pull request #4159 from ircecho/origin/iso8061date
fix[dart]: send ISO8601 dates
2016-11-10 00:24:05 +08:00
Anton WIMMER
6d6cfb4984 fix[dart]: send ISO8601 dates 2016-11-08 14:29:27 +01:00
wing328
cce410c463 add vendor extension to handle void response in jaxrs-cxf 2016-11-08 21:06:38 +08:00
Roman Truba
73276fd63a Merge branch 'master' into afnetworking-pinned-certificates-fix 2016-11-08 15:48:46 +03:00
wing328
d5ced7df38 Merge pull request #4155 from wing328/produce_consume_exception
Better handling of */*
2016-11-08 16:43:20 +08:00
wing328
935bdfe628 better handling of */* 2016-11-08 16:17:51 +08:00
wing328
77d3c0cb20 Merge pull request #4125 from ircecho/multiword
DART: multi-word class names work properly now, fixes #4117
2016-11-08 15:48:29 +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
wing328
7f31763273 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-11-07 23:55:13 +08:00
wing328
7dd774ffa3 Merge branch 'msf4j' of https://github.com/sanjeewa-malalgoda/swagger-codegen 2016-11-07 23:51:45 +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
wing328
e78ce6fb1e Merge pull request #4059 from markus-wa/issue-4045
[JAXRS-CXF] Issue 4045 - Fixed enum marshalling & fromValue()
2016-11-07 23:42:29 +08:00
wing328
7ba60afa71 Merge pull request #4131 from wienczny/patch-1
Update pojo.mustache to repair broken merge
2016-11-07 16:14:08 +08:00
Jim Schubert
ad1765475d [aspnet5] Fix broken template directory for deprecated lang (#4142) 2016-11-07 16:12:59 +08:00
Roman Truba
b355cc7381 Fixed afnetworking API usage: pinnedCertificates now declared as NSSet, not as NSArray 2016-11-05 22:10:52 +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
Stephan Wienczny
f25f6c265a Update pojo.mustache
Repair vendorExtensions due to broken merge.
2016-11-04 14:59:04 +01: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
Anton WIMMER
096cbd57f5 fix[dart]: multi-word class names work properly now 2016-11-04 11:48:53 +01: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
sanjeewa-malalgoda
60c7d90d22 remove glassfish dependencies and use MSF4J internal implementation for the simplicity and reduce dependencies 2016-11-03 10:39:52 +05:30
wwn
8eefe863bf Added isEmtyString check to avoid IndexOutOfBoundException 2016-11-02 18:45:25 +01:00
Simon Morris
8fb33980dc Nancy fx work (#4107)
* Added switch to config to toggle use of yaml base path as module paths

* NancyFX template updated to return collections as array to allow framework to find views by type name for text/html mime type

* Added some more parser fixes for NancyFX

* Refactored collection parsers in Parameters.cs and changed some to return nullable collections to match the parameter mappings in AbstractCSharpCodegen

* re-ran petstore build
2016-11-02 21:35:01 +08: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
b3f3edda33 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-11-01 16:59:23 +08:00
wing328
66ebdf3e3d Merge branch 'issue-4051' of https://github.com/schnabel/swagger-codegen into schnabel-issue-4051 2016-11-01 16:58:26 +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
scannerscan
a5eff7e571 Jdk6 jersey2 support (#4074)
* hashCode and equals support for jdk6 for jersey2

* supportJava6 moved to the base abstract class to support server side code generation,
supportJava6 flag was added to the server side model classes generators,
licenseInfo ttemplate was added to JavaJaxRS section,
javaJaxRS templates jdk6 suport was added,
shouldOverride method was commented out to allow server classes to be overriden - what if new methods or signatures changes?

* fix for the build.

* supportJava6 moved to the base abstract class to support server side code generation,
supportJava6 flag was added to the server side model classes generators,
licenseInfo ttemplate was added to JavaJaxRS section,
javaJaxRS templates jdk6 suport was added,
shouldOverride method was commented out to allow server classes to be overriden - what if new methods or signatures changes?

* fix for the build.

* Merge remote-tracking branch 'remotes/origin/master' into jdk6-jersey2-support

Conflicts:
	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaCodegen.java
	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java
	modules/swagger-codegen/src/main/resources/Java/pom.mustache

* add msf4j author

* [Java] Fix outputFolder in java-related server stub generators (#4076)

* fix outputFolder in java-related server stub generator

* fix style in JavaJAXRSCXFCDIServerCodegen

* hashCode and equals support for jdk6 for jersey2

* supportJava6 moved to the base abstract class to support server side code generation,
supportJava6 flag was added to the server side model classes generators,
licenseInfo ttemplate was added to JavaJaxRS section,
javaJaxRS templates jdk6 suport was added,
shouldOverride method was commented out to allow server classes to be overriden - what if new methods or signatures changes?

* fix for the build.

* supportJava6 moved to the base abstract class to support server side code generation,
supportJava6 flag was added to the server side model classes generators,
licenseInfo ttemplate was added to JavaJaxRS section,
javaJaxRS templates jdk6 suport was added,
shouldOverride method was commented out to allow server classes to be overriden - what if new methods or signatures changes?

* Merge remote-tracking branch 'remotes/origin/master' into jdk6-jersey2-support

Conflicts:
	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaCodegen.java
	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java
	modules/swagger-codegen/src/main/resources/Java/pom.mustache

* Merge remote-tracking branch 'remotes/origin/master' into jdk6-jersey2-support

Conflicts:
	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaCodegen.java
	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java
	modules/swagger-codegen/src/main/resources/Java/pom.mustache
2016-11-01 16:36:56 +08:00
wing328
a23aacc21e Merge pull request #4062 from AndrewRademacher/fix-haskell-servant-cas
Fixed toUpper and toLower usage in haskell-servant gen.
2016-11-01 16:30:59 +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
Denis Bazhenov
7e7ca01aa4 Newline escaping disabled for HTML and HTML2 generators (#4099)
* Newline escaping disabled

Newline escaping disabled for HTML and HTML2 generators. Escaping
failing Markdown processors to work correctly on descriptions

* HTML examples updated
2016-11-01 16:21:30 +08:00
Tony Tam
2651e83c0b added trim 2016-10-27 12:59:57 -07:00
wing328
4a1ef9dec9 [Java] Fix outputFolder in java-related server stub generators (#4076)
* fix outputFolder in java-related server stub generator

* fix style in JavaJAXRSCXFCDIServerCodegen
2016-10-26 16:31:47 +08:00
wing328
6c439168a4 Merge branch 'msf4j' of https://github.com/sanjeewa-malalgoda/swagger-codegen into sanjeewa-malalgoda-msf4j 2016-10-26 10:33:00 +08:00
schnabel
32edf04b8e fixed unwanted remove 2016-10-25 20:37:55 +02:00
schnabel
f57e7c0933 bugfix: issue-4051 2016-10-25 20:09:24 +02: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
14bca6cd89 [Java] BeanValidation + JAXRS CXF server generator (#4068)
* add pom-file to cxf including cxf-client #2017

* adapt pom sourceFolder in pom.mustache to gen/java #2017

* add test templates for CXF #2017

* optimize mustache template structure, remove tabs #3280 #2549

* refined dependency to swagger-jaxrs #2017

* refined annotations and line breaks #2549

* fix tabs instead of spaces...

* move annotations from getter to field for server model

* cleanup tabs

* add example for gzipping #2017

* add complete WAR to cxf-server #2017

* add readme + rework pom #2017

* add cli switch for beanvalidation #2549

* move beanvalidation into separate subtemplate and reuse for cxf

* add beanValidation java template

* corrected path to mustache file

* fix AbstractOptionsTest, add default false for USE_BEANVALIDATION

* add pom-file to cxf including cxf-client #2017

* adapt pom sourceFolder in pom.mustache to gen/java #2017

* add test templates for CXF #2017

* optimize mustache template structure, remove tabs #3280 #2549

* refined dependency to swagger-jaxrs #2017

* refined annotations and line breaks #2549

* fix tabs instead of spaces...

* move annotations from getter to field for server model

* cleanup tabs

* add example for gzipping #2017

* add complete WAR to cxf-server #2017

* add readme + rework pom #2017

* add cli switch for beanvalidation #2549

* move beanvalidation into separate subtemplate and reuse for cxf

* add beanValidation java template

* corrected path to mustache file

* fix AbstractOptionsTest, add default false for USE_BEANVALIDATION

* add beanvalidation to okhttp-gson library #2549

* cleanup api.mustache for cxf #3281

* temporary fix for invalid BeanValidation-pattern with / #2549

* temporary fix for invalid BeanValidation-pattern with / #2549

* remove jaxrs-annotations from implementation classes #3281

* add configuration to generate spring web application #4003

* clean up unnecessary @Path annotation (part of method level!)

* add support for minItems/maxItems #2549

* add support for BeanValidation for query params #2549

* add imports for bean validation #2549

* add switches for various cxf server features #2017

* fix tests #2549 #2017

* re-create bin folder

* cleanup

* cleanup

* Revert "temporary solution for pattern - move to AbstractJavaCodegen #2549"

This reverts commit 82df5e657f31303bcb7d38f1dc013183d3509da2, reversing
changes made to 65e87f23a6804a0d5c0926c916a9cd6866e7fee0.

Conflicts:
	bin/akka-scala-petstore.sh
	bin/android-petstore-all.sh
	bin/android-petstore-httpclient.sh
	bin/android-petstore-volley.sh
	bin/android-petstore.sh
	bin/aspnet5-petstore-server.sh
	bin/clojure-petstore.sh
	bin/cpprest-petstore.sh
	bin/csharp-dotnet2-petstore.sh
	bin/csharp-petstore-all.sh
	bin/csharp-petstore.sh
	bin/csharp-property-changed-petstore.sh
	bin/cwiki-petstore.sh
	bin/dart-petstore.sh
	bin/dynamic-html.sh
	bin/erlang-petstore-server.sh
	bin/flash-petstore.sh
	bin/flaskConnexion-python2.sh
	bin/flaskConnexion.sh
	bin/go-petstore-server.sh
	bin/go-petstore.sh
	bin/groovy-petstore.sh
	bin/haskell-servant-petstore.sh
	bin/html-petstore.sh
	bin/html2-petstore.sh
	bin/java-inflector-petstore-server.sh
	bin/java-petstore-all.sh
	bin/java-petstore-feign.sh
	bin/java-petstore-jersey1.sh
	bin/java-petstore-jersey2.sh
	bin/java-petstore-okhttp-gson-parcelable.sh
	bin/java-petstore-okhttp-gson.sh
	bin/java-petstore-retrofit.sh
	bin/java-petstore-retrofit2.sh
	bin/java-petstore-retrofit2rx.sh
	bin/java-undertow-petstore-server.sh
	bin/java8-petstore-jersey2.sh
	bin/javascript-closure-angular.sh
	bin/javascript-petstore-all.sh
	bin/javascript-petstore.sh
	bin/javascript-promise-petstore.sh
	bin/jaxrs-cxf-cdi-petstore-server.sh
	bin/jaxrs-cxf-petstore-server.sh
	bin/jaxrs-jersey1-petstore-server.sh
	bin/jaxrs-petstore-server.sh
	bin/jaxrs-resteasy-joda-petstore-server.json
	bin/jaxrs-resteasy-joda-petstore-server.sh
	bin/jaxrs-resteasy-petstore-server.sh
	bin/jaxrs-spec-petstore-server.sh
	bin/jmeter-petstore.sh
	bin/lumen-petstore-server.sh
	bin/nancyfx-petstore-server.sh
	bin/nodejs-petstore-server.sh
	bin/objc-petstore-all.sh
	bin/objc-petstore-coredata.sh
	bin/objc-petstore.sh
	bin/perl-petstore.sh
	bin/php-petstore.sh
	bin/python-petstore.sh
	bin/qt5-petstore.sh
	bin/rails5-petstore-server.sh
	bin/ruby-petstore.sh
	bin/run-all-petstore
	bin/scala-async-petstore.sh
	bin/scala-petstore.sh
	bin/scalatra-petstore-server.sh
	bin/security/csharp-petstore.sh
	bin/security/go-petstore.sh
	bin/security/java-petstore-okhttp-gson.sh
	bin/security/javascript-closure-angular.sh
	bin/security/javascript-petstore.sh
	bin/security/lumen-petstore-server.sh
	bin/security/objc-petstore.sh
	bin/security/perl-petstore.sh
	bin/security/php-petstore.sh
	bin/security/python-petstore.sh
	bin/security/qt5cpp-petstore.sh
	bin/security/ruby-petstore.sh
	bin/security/run-all-petstore-security-test
	bin/security/scala-petstore.sh
	bin/security/silex-petstore-server.sh
	bin/security/slim-petstore-server.sh
	bin/security/swift-petstore.sh
	bin/security/typescript-angular.sh
	bin/security/typescript-angular2.sh
	bin/security/typescript-fetch.sh
	bin/security/typescript-node.sh
	bin/silex-petstore-server.sh
	bin/sinatra-petstore-server.sh
	bin/slim-petstore-server.sh
	bin/spring-all-pestore.sh
	bin/spring-cloud-feign-petstore.sh
	bin/spring-mvc-petstore-j8-async-server.sh
	bin/spring-mvc-petstore-server.sh
	bin/spring-stubs.sh
	bin/springboot-petstore-server.sh
	bin/swift-petstore-all.sh
	bin/swift-petstore-promisekit.sh
	bin/swift-petstore-rxswift.sh
	bin/swift-petstore.sh
	bin/tizen-petstore.sh
	bin/typescript-angular-petstore.sh
	bin/typescript-angular2-petstore-all.sh
	bin/typescript-angular2-petstore-with-npm.sh
	bin/typescript-angular2-petstore.sh
	bin/typescript-fetch-petstore-all.sh
	bin/typescript-fetch-petstore-target-es6.sh
	bin/typescript-fetch-petstore-with-npm-version.sh
	bin/typescript-fetch-petstore.sh
	bin/typescript-node-petstore-all.sh
	bin/typescript-node-petstore-with-npm.sh
	bin/typescript-node-petstore.sh
	bin/typescript-petstore-npm.json
	bin/windows/akka-scala-petstore.bat
	bin/windows/android-petstore.bat
	bin/windows/aspnet5-petstore-server.bat
	bin/windows/async-scala-petstore.bat
	bin/windows/clojure-petstore.bat
	bin/windows/cpprest-petstore.bat
	bin/windows/csharp-petstore.bat
	bin/windows/dart-petstore.bat
	bin/windows/dynamic-html-petstore.bat
	bin/windows/flash-petstore.bat
	bin/windows/go-petstore.bat
	bin/windows/html-petstore.bat
	bin/windows/java-petstore-okhttp-gson.bat
	bin/windows/java-petstore.bat
	bin/windows/javascript-petstore.bat
	bin/windows/objc-petstore.bat
	bin/windows/perl-petstore.bat
	bin/windows/php-petstore.bat
	bin/windows/python-petstore.bat
	bin/windows/qt5cpp-petstore.bat
	bin/windows/rails5-petstore-server.bat
	bin/windows/ruby-petstore.bat
	bin/windows/scala-petstore.bat
	bin/windows/spring-mvc-petstore-j8-async-server.bat
	bin/windows/spring-mvc-petstore-server.bat
	bin/windows/springboot-petstore-server.bat
	bin/windows/swift-petstore.bat
	bin/windows/tizen-petstore.bat
	bin/windows/typescript-angular.bat
	bin/windows/typescript-angular2.bat
	bin/windows/typescript-fetch.bat
	bin/windows/typescript-node-with-npm.bat
	bin/windows/typescript-node.bat

* Revert "cleanup"

This reverts commit c752ba85d8a795ebcaf902a0eb06ab0c5755d128.

* Revert "re-create bin folder"

This reverts commit 8a6d41314784a2ae5ce29ae54d7db1ebec418751.

Conflicts:
	bin/windows/spring-mvc-petstore-j8-async-server.bat
	bin/windows/spring-mvc-petstore-server.bat
	bin/windows/springboot-petstore-server.bat

* Revert "re-create bin folder"

This reverts commit 8a6d41314784a2ae5ce29ae54d7db1ebec418751.

Conflicts:
	bin/windows/spring-mvc-petstore-j8-async-server.bat
	bin/windows/spring-mvc-petstore-server.bat
	bin/windows/springboot-petstore-server.bat

* re-create bin from master

* Revert "re-create bin from master"

This reverts commit d4b5c9aac54d62dfb3790c1bf2829472be2ec8fd.

* Revert "Revert "re-create bin folder""

This reverts commit 4369b35dbe9d21f8a93e7632fd92a9a760256db5.

* Revert "re-create bin folder"

This reverts commit 8a6d41314784a2ae5ce29ae54d7db1ebec418751.

* Revert "temporary solution for pattern - move to AbstractJavaCodegen #2549"

This reverts commit 82df5e657f31303bcb7d38f1dc013183d3509da2, reversing
changes made to 65e87f23a6804a0d5c0926c916a9cd6866e7fee0.

* correct @Path to re-activate Swagger support #

* change sourceFolder to default

* re-activate unittest generator + support gzip switch #2017

* add switch to support Spring Boot + integration tests

* add cxf client generator, rename cxf server generator #2017

* add interfaces for language feature support #4003

* add comments #2017

* correct reference to context.xml.mustache #4003

* use dynamic sourceFolder path #2017

* replace tabs with spaces #4003

* use hard-coded sourceFolder #4003

* rename language for backwards compatibility

* cleanup todo comment #4003

* move convertPropertyToBooleanAndWriteBack to DefaultCodegen #4003

* change reference to beanValidation.mustache to local copy for cxf

* cleanup client-side beanvalidation (currently not working in CXF)

* add support for tags #4003

* fix instantiiation of method parameters

* move commonValidationFeature from bus to endpoint #4003
2016-10-25 18:15:15 +08:00
wing328
37bb66c436 Merge branch 'throw-error-not-string' of https://github.com/mauricedb/swagger-codegen into mauricedb-throw-error-not-string 2016-10-25 16:47:13 +08:00
AndrewRademacher
40ec83a091 Fixed toUpper and toLower usage in haskell-servant gen. 2016-10-24 16:12:10 -05:00
Simon Morris
5855b479aa nancyfx basePath => modulePath toggle (#4053)
* fix NancyFX string parser

parser needs to access the Value parameter to enable the direct cast at line 102 when handling string parameters

* Updated nancyfx sample

* Added switch to config to toggle use of yaml base path as module paths
2016-10-24 23:07:16 +08:00
walthema
1e975637c9 Fixed enum marshalling & fromValue()
Added toString() to enums
2016-10-24 15:07:46 +02:00
sanjeewa-malalgoda
80bb564092 Introducing swagger MSF4J support for swagger code generator 2016-10-24 12:00:36 +05:30
Maurice de Beijer
75d04d8be7 Throw an Error object instead of a string 2016-10-23 17:15:15 +02:00
wing328
92c474b2c2 Merge pull request #4050 from mbohlool/issue2657
Fix sanitizeTag to retain numbers and underscore in tag names
2016-10-22 22:59:09 +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
Simon Morris
27be0ed197 fix NancyFX string parser (#4048)
* fix NancyFX string parser

parser needs to access the Value parameter to enable the direct cast at line 102 when handling string parameters

* Updated nancyfx sample
2016-10-22 22:53:56 +08:00
mbohlool
aeadd7678b Fix sanitizeTag to retain numbers and underscore in tag names 2016-10-21 14:00:57 -07:00
wing328
4f9ee0f93d Merge pull request #4035 from wing328/update_undertow_readme
[Java] Update undertow readme
2016-10-20 22:22:53 +08:00
scannerscan
aeb33e4b6e hashCode and equals support for jdk6 for jersey2 (#4039) 2016-10-20 10:20:12 +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
b688a7f443 Merge branch 'fix-model-package' of https://github.com/Ragnis/swagger-codegen into Ragnis-fix-model-package 2016-10-19 16:38:13 +08:00
wing328
5c129b2869 Merge branch 'fix-api-paths' of https://github.com/Ragnis/swagger-codegen into Ragnis-fix-api-paths 2016-10-19 16:26:17 +08:00
wing328
91923311e0 update undertow readme 2016-10-19 16:23:18 +08:00
k1w1m8
60a52ee729 Java6 support for jersey2 (#4033) 2016-10-19 10:45:14 +08:00
Diego López León
c26833fd64 [java] Allow setting test folder
To keep consistency between `sourceFolder` and `testFolder` access
2016-10-18 09:28:30 -03:00
wing328
b50b33e891 fix reserved word handling in model name (sinatra) 2016-10-18 18:51:08 +08:00
wing328
702344ed75 better handling of reserved words for sintatra, dart 2016-10-18 17:58:19 +08:00
wing328
52ffc7869e improvements based on #3568 (#4021) 2016-10-18 16:32:35 +08:00
Jim Schubert
6a7b9240a2 [csharp] add missing anchor tags in readme (#4019) 2016-10-18 10:15:03 +08:00
Martin
727038a186 Issue 3651 (#4014)
* added method summary under the method name

* added batch file for html2 generation on windows

* regenerated html2 example

* changed the html2 windows batch to use yaml instead of json and regenerated sample

* fixed encoding issues
2016-10-17 22:48:12 +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
12bcb2dd15 Merge pull request #4011 from jimschubert/aspnet5-rename
[aspnetcore] Deprecating aspnet5 for aspnetcore
2016-10-17 16:17:30 +08:00
Joseph Zuromski
3e8e5e2091 fix some swift3 references 2016-10-16 22:49:51 -07:00
Jim Schubert
c70a2a7481 [aspnetcore] Deprecating aspnet5 for aspnetcore
This moves previous aspnet5 functionality to aspnetcore, aspnet5 now
derives from the aspnetcore generator and logs a warning that it's
deprecated.

This will help resolve any confusion because ASP.NET 5 is terminology
referring to the project of around a year ago. ASP.NET Core 1.0 is the
new name for the technology, and further enhancements should target .NET
Core 1.0 rather than any old vNext or preview stuff.
2016-10-16 21:22:34 -04: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
wing328
20db774418 Merge pull request #4002 from hexelon/swift3-generator-master
[Swift] Adding Swift3 generator
2016-10-15 18:13:01 +08:00
wing328
ce1cf4606a [Java][jersey1] add Java6 support to Java (jersey1) API client (#3919)
* add java6 support to java jersey1

* properly handle boolean value in mustache tag

* add test for supportJava6 option
2016-10-15 17:11:34 +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