Commit Graph

4926 Commits

Author SHA1 Message Date
wing328
640b16b58a Merge branch 'master' into master 2017-04-24 17:00:27 +08:00
nbruno
ddc309ec19 Add support for Spring's RestTemplate in Java client codegen (#5404)
* Add support for Spring's RestTemplate in Java client codegen

Resolves #1176

* Update all Java samples to include change for Jackson enums

Currently enums are deserialized from a String value with an
explicit @JsonCreator. However, they are not being serialized with
this String value. This change introduces the @JsonValue annotation
on the toString() method of enums, so they will be serialized as a
String with the correct value.
2017-04-24 14:40:47 +08:00
Tomek Cejner
f110072ef1 [swift] Open buildHeaders() and requestBuilderFactory property to allow extension. (#5225) 2017-04-23 23:02:21 +08:00
wing328
1277db61bd [Ruby] add generator version to Ruby template (#5459)
* add generator version to ruby template

* remove tab in java generator
2017-04-23 22:41:56 +08:00
wing328
ee5c1b203b fix typo: lamda -> lambda 2017-04-23 22:28:29 +08:00
Rik Sprenkels
bd8b2d37c0 Fixes for swagger.json to Java escaping. (#5247) 2017-04-23 19:10:25 +08:00
Xin Meng
c3d51357a8 fix the typescript angular 2 http request option issue #5374 (#5380)
* fix the typescript angular 2 http request option issue #5374

https://github.com/swagger-api/swagger-codegen/issues/5374

add `withCredentials:true` to the request option

*  run ./bin/typescript-angular2-petstore-all.sh to update Petstore samples
2017-04-23 18:31:00 +08:00
manuc66
d869051fb8 Fix Possible null pointer dereference (#5370) 2017-04-23 18:10:25 +08:00
Sergey Novikov
6685f18e5f Reuse allowed values (#5435) 2017-04-22 00:30:52 +08:00
Ravi
e9a438b73f [CppRest] Overload toJson for bool in Modelbase (#5448)
* Add operationId in exception message

* add number data type mapping

* fix_issue5434
2017-04-21 22:20:46 +08:00
Mario
f61e0d4024 Add RuntimeException option (#5405)
* add option to change Exception to RuntimeException

* rename propertie
remove space in template
2017-04-21 22:13:57 +08:00
Cas Perl
122db78b1a Issue 5375 (#5403)
* use py3 instead of py34

* fixed test to test invalid enum

* ADDED: assign variable in the ctor with property setter to check validity if possible. CHANGE: move required property check to proper place. CHANGE: remove double quotes from allowed_values for none-string enum property

* rebuilt samples

* comment for improvement

* ADDED: post process enum model for python.

* comment

* rebuilt samples

* rebuilt samples
2017-04-21 22:05:54 +08:00
Jean-Maxime Fillau
8144ab6870 Add json format in case contentType is application/json. (#5427)
Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-04-21 22:01:37 +08:00
Julien Fouilhé
edb80df0ba fix(swift3): fix infinite loop with inheritance and check if parent decoder exists before calling (#5416) 2017-04-20 22:54:35 +08:00
wing328
6359c064f3 Merge pull request #5250 from auchri/patch-1
[JAVA] Update gradle and android build tools
2017-04-19 15:57:14 +08:00
wing328
813949dd00 add lamda to clean up examples, fix spring tempalate format 2017-04-18 18:14:00 +08:00
Christoph Auer
70e4dad72e java/lib/retrofit2: Fix indent 2017-04-18 11:53:30 +02:00
Christoph Auer
9640e30f48 Update java/lib/okhttp-gson 2017-04-18 11:53:30 +02:00
Christoph Auer
4b88374df4 Update java/lib/retrofit2 2017-04-18 11:53:29 +02:00
Christoph Auer
ca87a4b817 Update java/lib/retrofit 2017-04-18 11:53:29 +02:00
Christoph Auer
5b475bcb16 Java/feign: Remove spaces at empty lines 2017-04-18 11:53:29 +02:00
Christoph Auer
83e902ba3f Update java/lib/jersey2 2017-04-18 11:53:29 +02:00
Christoph Auer
b2674feb14 Java: Remove spaces at empty lines 2017-04-18 11:53:29 +02:00
Christoph Auer
85a58f3414 Update Java/lib/feign 2017-04-18 11:53:29 +02:00
Christoph Auer
9652ce37f7 Update android/lib/volley 2017-04-18 11:53:29 +02:00
Christoph Auer
84dc2e1dd9 Update android 2017-04-18 11:53:29 +02:00
Christoph
71b12636e4 [JAVA] Update gradle and android build tools 2017-04-18 11:53:28 +02:00
Benjamin Douglas
07ba1eb6f8 Fixup generation of Javascript samples
The generation code was ignoring top-level aliases for any language config that
contained "java", which included "javascript", a completely different language.

Changed this to be those configs based on the JavaAbstractGenerator class.
2017-04-17 17:50:01 -07:00
Benjamin Douglas
9058099e5b Add alias type definitions for Java
When a spec defines a Model at the top level that is a non-aggretate type (such
as string, number or boolean), it essentially represents an alias for the simple
type. For example, the following spec snippet creates an alias of the boolean
type that for all intents and purposes acts just like a regular boolean.

    definitions:
      JustABoolean:
        type: boolean

This can be modeled in some languages through built-in mechanisms, such as
typedefs in C++. Java, however, just not have a clean way of representing this.

This change introduces an internal mechanism for representing aliases. It
maintains a map in DefaultCodegen that tracks these types of definitions, and
wherever it sees the "JustABoolean" type in the spec, it generates code that
uses the built-in "Boolean" instead.

This functionality currenlty only applies to Java, but could be extended to
other languages later.

The change adds a few examples of this to the fake endpoint spec for testing,
which means all of the samples change as well.
2017-04-17 12:58:31 -07:00
wing328
a17e80dfb1 minor fix to spring use of examples 2017-04-18 01:42:29 +08:00
wing328
3ca77d3cf2 Merge branch 'issue-5310' of https://github.com/elizabetht/swagger-codegen into elizabetht-issue-5310 2017-04-18 00:52:52 +08:00
Julien Fouilhé
b1a39ac820 fix(swift3): decoders call parents decoders too (#5369) 2017-04-18 00:03:52 +08:00
wing328
ba32f66714 Merge branch 'spring-resource-file-streams' of https://github.com/LEgregius/swagger-codegen into LEgregius-spring-resource-file-streams2 2017-04-17 23:26:09 +08:00
Eric Bélanger
fd289ac6de [JavaSpring] add support for map minProperties and maxProperties bean validation (#5395) 2017-04-17 22:47:21 +08:00
Tino Fuhrmann
e858f2390b [TypeScript] fix class filename in import/export (#5396)
* Fixed classFilename in typescript-angular and recreated samples

* Changed classname to classFilename in ts-angular2/models.mustache
Also recreated ts-angular2 sample
2017-04-17 22:43:33 +08:00
Elizabeth Thomas
ec4b3307fe Merge pull request #1 from elizabetht/master
Elizabeth/Joy - adding example support if specified in the swagger spec
2017-04-13 10:02:23 -05:00
Thomas, Elizabeth-CW
02bcad36fd Elizabeth/Joy - adding example support if specified in the swagger spec 2017-04-13 09:31:07 -05:00
Mike Kistler
ca9fcd7db1 Fix copy method of CodegenParameter to copy isPrimitiveType (#5381) 2017-04-13 20:58:55 +08:00
wing328
4e6a342c13 replace tab with 4-space in spring templates (#5389) 2017-04-13 19:03:34 +08:00
dhuning
8cf0f7046e Adds @Valid to request body for the JavaSpring (#4850)
* 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 Valid import to Controller

* Adds generated code for bean validation change
2017-04-13 17:42:02 +08:00
Benjamin Douglas
ab69ce5dc3 Add null pointer check to add/put methods (#5385) (#5386)
Commit e3d04ee01 (issue #5240) introduced unsafe add/put methods for optional
list/map parameters. This change maintains the spirit of issue #5240 (optional
containers are null by default) while still making add/put calls safe. It does
this by checking for null first and, if so, initializing it with an empty
container.

Also updated the affected samples using the various scripts in bin/.
2017-04-13 17:37:49 +08:00
Jean-Maxime Fillau
df1055fe38 Add float conversion for cpprest api client template. (#5387)
Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-04-13 17:30:20 +08:00
Gayathri
a774ff9587 Latest from master - merge conflict resolution 2017-04-12 09:03:54 -05:00
nikitozz
78c4928908 Fixes #5367. Async support is enabled for .NET netstandard API clients (#5368) 2017-04-12 10:39:42 +08:00
wing328
1fdd3e6ffa [Java][Spring] fix enum allowable values in Spring generators (#5364)
* fix enum allowable values in spring generators

* use values instead of enumVars in spring annoation
2017-04-11 22:23:09 +08:00
wing328
e3d04ee01f [Java] remove initialization for optional list property (#5363)
* set list to null in java if not required

* update petstore sample for java server stub

* update sample for msf4j

* add null assignment to new list/map in java
2017-04-11 19:07:48 +08:00
Jean-François Côté
2e46bb9b9f Add File support + some fixes to Play generator (#5263)
* 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

* Return a FileInputStream when the returnType is "file" + Fix a couple of other bugs with boolean + updated sample

* Return an InputStream instead of FileInputStream (except in the instantiation)

* A little cleanup for the form param of type file.
2017-04-10 23:23:28 +08:00
Vincent Giersch
aef98f464e fix(php): should not check enum value if not unspecified and optional (broken since #4886) (#5357)
Signed-off-by: Vincent Giersch <vincent@giersch.fr>
2017-04-10 23:21:14 +08:00
Vincent Giersch
99f0ab496b fix(php): escape reserved words in enum variables names (#5356)
Signed-off-by: Vincent Giersch <vincent@giersch.fr>
2017-04-10 23:19:06 +08:00
Ahmet Taha Sakar
c6959b0d21 Swift3 headers (#5340)
* added headers to makeRequest function for swift3 template

* petstore update
2017-04-10 22:36:22 +08:00
anuthebananu
19d5e74dbd [Spring] Adds serialVersionUID to serializable model POJO's (#5347) 2017-04-07 09:17:29 +08:00
wing328
4aaf3ab353 update reserved word list for swift3 (#5348) 2017-04-07 08:36:02 +08:00
lukoyanov
a7652d508d Updated CallAdapter & CallAdapterFactory for retrofit 2.2.0 (#5345) 2017-04-07 07:35:47 +08:00
wing328
90b14a996a use original value of paramName in akka scala templates (#5339) 2017-04-06 17:01:25 +08:00
weiyang
abffdca441 [Html2] Fix circular references (#5313)
* [html2] Fix circular references

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

* [samples][html2] Fix circular references

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

* Optimize code format

Signed-off-by: weiyang <weiyang.ones@gmail.com>
2017-04-06 14:39:26 +08:00
Ian O'Neill
f303183b44 [JaxrsResteasy] Fix JacksonConfig package and RestApplication imports (#5302) (#5303)
This is for the EAP version specifically.

* The JacksonConfig class always used the io.swagger.api package
* The RestApplication class did not import the service implementations
  from the correct package
* Added shell script for generating test applications
2017-04-04 00:43:40 +08:00
wing328
e5b3e3cdac replace tab with 4space for ts jquery client (#5299) 2017-04-03 15:48:51 +08:00
wing328
7db3388fdc Update maven compiler plugin to the latest version (3.6.1) (#5300)
* update maven compiler plugin to the latest version

* update feign petstore
2017-04-02 21:39:48 +08:00
wing328
2e8eea9c18 add logic to camelize path variables for feign client (#5301) 2017-04-02 19:01:43 +08:00
wing328
071c012f85 Replace tab with 4 space in Java files (#5298)
* replace tab with 4 space in java files

* revise error message in shell script

* print result before checking

* revise grep expression
2017-04-02 16:05:40 +08:00
jfiala
ca6b5d09d0 [Jaxrs-cxf] Add check for useGenericResponse for jaxrs-cxf server + client (#4779)
* add check for useGenericResponse for jaxrs-cxf

* move check for genericresponse to cxf codegen #4713
2017-04-02 16:05:16 +08:00
wing328
bc8e16e3f8 fix package name in mono test script (#5278) 2017-04-01 21:12:17 +08:00
Granjow
64c7e23a04 TypeScript client API: Add public getter/setter for base path (#5270) 2017-04-01 16:33:29 +08:00
zszugyi
22eb72791c Specify copy option to overwrite existing temp file, otherwise Files.copy throws FileAlreadyExistsException (#5268) 2017-04-01 16:11:00 +08:00
Griffin Schneider
5de19e3214 [Swift3] Fix bug where non-camel-case path params didn't work. (#5267)
* [Swift3] Fix bug where non-camel-case path params didn't work.

* [Swift3] Fix bug where int enums generated non-compiling code. Swift3 integration tests now pass.

* [Swift3] Add a non-camel-case path parameter to petstore-with-fake-endpoints-models-for-testing. This would have caused the Swift3 tests to be broken before 7387e49fef56a624045aa52b65ffb9c19b3853ec.
2017-04-01 16:06:31 +08:00
Benjamin Douglas
5c3fe23e9f Support Swagger collectionFormat encodings in Feign (#5266)
* Support Swagger collectionFormat encodings in Feign

Feign only natively supports the "multi" collectionFormat for encoding lists
of parameter values. This change adds manual encoding of the other formats, such
as "csv" (the default for collections), "tsv", space-separated, and pipes.

* Fix typo in anchor tag.
2017-04-01 15:33:20 +08:00
JC Casas
909f392745 fix mustache file for build.bat (#5264)
replace IO.Swagger for {{packageName}} where necessary
2017-03-31 16:30:40 +08:00
David Guthrie
aa773dc7fd Resource stream for file is no longer an option, it's the default for Spring 2017-03-30 12:34:22 -04:00
niku
4e1d9ea010 [Elixir] Add documentation for functions (#5260) 2017-03-30 22:45:39 +08:00
wing328
0baa6cf0e8 Merge branch 'nodejs-server-improvements' of https://github.com/Granjow/swagger-codegen into Granjow-nodejs-server-improvements 2017-03-30 22:31:17 +08:00
David Harrigan
fc01457d77 [JAVA][#5172] Allow vendor json media types (#5189)
* [#5172] Allow vendor json media types

* Revert unnecessary diffs

* Update petstore sample

* Didn't run mvn after some edits

* Rerun ' ./bin/java-petstore-all.sh' and './bin/security/java-petstore-okhttp-gson.sh'

* Added more realistic test cases for isJsonMime
2017-03-30 22:23:24 +08:00
wing328
040a25cc9b fix typo in c# generator's help text 2017-03-30 10:22:13 +08:00
Paŭlo Ebermann
2830fb1794 [JaxRS Server][Jersey1/2] Pass server port by cli (#5246)
* JaxRS server: set serverPort only when not given from outside.

* Update JaxRS sample creator scripts to fix serverPort.

* Preliminary test fix for JaxRS server generators.

* Updating samples for JaxRS with Jersey1/2.
2017-03-30 01:26:37 +08:00
wing328
996acc05f5 [Java][Retrofit2] update gradle, sbt build file with latest dependencies (#5238)
* update build.gradle for retrofit2

* update retrofit2 rx2 sample

* update gradle and sbt build file for retrofit2
2017-03-28 21:05:12 +08:00
Simon A. Eugster
99fd1b2281 Use __dirname for paths if server is started from a different directory 2017-03-28 13:31:47 +02:00
wing328
55e648c0b1 update retrofit2 dependencies (#5235) 2017-03-28 18:50:24 +08:00
Paŭlo Ebermann
dd883e4125 Issue #3084: remove timestamps from undertow samples (#5231)
* Issue #3084: Support hideGenerationTimestamp for Undertow.

* Issue #3084: disable timestamp generation for undertow samples.

* Update samples for Undertow.
2017-03-28 16:55:08 +08:00
wing328
32e9e7f63e add port 80 to swagger spec (#5232) 2017-03-28 16:46:29 +08:00
wing328
d68859cfbc fix c# docstring typo (#5223) 2017-03-27 18:06:34 +08:00
wing328
b32fe8230a fix retrofit2 indentation (#5221) 2017-03-27 17:21:45 +08:00
Todd
3849d64c24 export top level enumeration types in typescript-fetch mode (#4820)
This change enables top level enumeratons to be written out as:

export type SortDirection = "Ascending" | "Descending";

vs.

export class SortDirection {
}
2017-03-27 15:15:36 +08:00
Paŭlo Ebermann
ec6248cbcf [Erlang] pretty print swagger json (#5215)
* Pretty-print swagger.json.

(This was done via `jq`. In a later commit we'll generate it pretty-printed.)

* Erlang Server: pretty-print generated swagger.json.

* Update samples for Erlang-server.
2017-03-27 14:50:17 +08:00
wing328
1a1f5afddc add ci test for msf4j server (#5220) 2017-03-27 14:37:42 +08:00
Paŭlo Ebermann
6fef9c5ce6 [java][msf4j] Update msf4j samples (and fix artifact name) (#5210)
* Fix MSF4J pom indentation.

* Set MSF4J sample artifactId in the generator script.

* Update MSF4J samples.
2017-03-27 14:09:36 +08:00
Paŭlo Ebermann
9875855f63 [ASP.NET] Issue #5196: add packageGuid parameter to AspNetCoreServerCodegen. (#5199)
* Issue #5196: add packageUid parameter to AspNetCoreServerCodeGen.

* Change .bat file, too.
2017-03-27 13:20:24 +08:00
Paŭlo Ebermann
9dfbe7ef85 [nancyfx] Issue #5196: make package GUID nonrandom for nancyfx samples (#5209)
* Add packageGuid parameter to NancyFxServerCodegen.

* Use packageGuid parameter for nancyfx petstore samples.
2017-03-27 13:19:13 +08:00
Paŭlo Ebermann
f0b9c2b761 [Go] #3084: remove timestamps from go server (#5218)
* Issue #3084: add hideGenerationTimestamp option to Go server generator.

* Issue #3084: use hideGenerationTimestamp in go server sample script.

* Update Go server samples.
2017-03-27 11:47:15 +08:00
wing328
b37a7c81b0 add comments to csharp methods (#5206) 2017-03-27 11:43:14 +08:00
Matan Rubin
a1dbc53555 [JAXRS-CXF] Respect default values for query parameters (#4778)
* [JAXRS-CXF][#4776] Respect query params default values in generated interfaces

Before this change, the generated interface ignored default values of query
params. Now, it adds the proper @DefaultValue annotation.

See issue #4776 for example.

* [JAXRS-CXF] Update samples
2017-03-26 23:15:34 +08:00
Paŭlo Ebermann
c812d81e9a Issue #3084: remove timestamps from bash samples. (#5192) 2017-03-26 22:56:34 +08:00
Julien Dupouy
e50e653e3d Binary support for javascript client (#5194) 2017-03-26 22:53:35 +08:00
Paŭlo Ebermann
a9c7030997 Issue #3084: hide generation timestamp for HTML2 samples. (#5193) 2017-03-26 22:49:12 +08:00
Jean-François Côté
282b22744c [Java][PlayFramework] Added some CLI Options + many fixes (#5180)
* 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

* - Add "wrapCalls" and "useSwaggerUI" CLI Options and updated what handleException does to follow Play Framework lifecycle more closely
- Updated all mustache files accordingly
- Updated the sample
- Updates Play Framework version to the latest 2.5.13
2017-03-25 14:36:01 +08:00
Benjamin Douglas
65b6660c55 Fixes a bug in #5142 for multi-word parameters (#5185)
In the convenience class defined for generating a Map of query parameters, the
parameter name was mistakenly being set to the Java variable name, not the
actual parameter name. These are often the same, but can be different in the
case of multi-word parameters, such as in the sample API's `enum_query_string`
vs `enumQueryString`.
2017-03-24 22:04:11 +08:00
Joseph Moore
b7fc11b089 Modify retrofit OAuth templates for #5039 (#5082)
The updateAccessToken method returns `true` when it means `false` and
vice versa.
2017-03-23 23:27:04 +08:00
David Guthrie
58d4187054 Added a new additional option that allows one to replace the the 'file' generated class with org.springframework.core.io.Resource, which will allow returing file data from Urls or anything that can be converted to a stream. 2017-03-23 11:25:08 -04:00
wing328
8fbe82a66b replace tab with 4 spaces (#5174) 2017-03-23 17:18:01 +08:00
jfiala
43aa4a8569 [Jaxrs-cxf] Add method-level cascaded beanvalidation (@Valid) (#4921)
* add ApiResponse/s to operation #4718

* add method-level cascaded beanvalidation #4847
2017-03-23 15:56:23 +08:00
David Biesack
5f27fcab18 Add support for Markdown in -l html (#5144)
* Sync with upstream/master

* Support Markdown in -l html

Add https://github.com/atlassian/commonmark-java to modules/swagger-codegen to convert Markdown to HTML,
update StaticHtmlGenerator to use this (see the toHeml() method and its uses)

Add a new test case bin/html-markdown.sh and
modules/swagger-codegen/src/test/resources/2_0/markdown.yaml

* Support Markdown in -l html

Add https://github.com/atlassian/commonmark-java to modules/swagger-codegen to convert Markdown to HTML,
update StaticHtmlGenerator to use this (see the toHeml() method and its uses)

Add a new test case bin/html-markdown.sh and
modules/swagger-codegen/src/test/resources/2_0/markdown.yaml
2017-03-23 15:15:01 +08:00
Benjamin Douglas
55b7db3456 #5142: Add @QueryMap support for Feign API (#5143)
* use builder pattern for operations

* @QueryMap parameter only for query parameters

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

* Adding template for generating test code

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

* Update samples

The files in src/main were generated by running

  $ bin/java-petstore-feign.sh

The files in src/test were manually fixed.

* Correct capitalization of @QueryMap class in feign

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

* Adding hyphen to javadocs for extra readability.

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

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

* Adding newline to generated source for readability.
2017-03-23 15:01:07 +08:00
wing328
bd81dfd08e use base name for parameters in the curl command (#5173) 2017-03-23 14:51:00 +08:00
wing328
264c9d615f use unescaped path in server stub templates (#5157) 2017-03-23 11:59:04 +08:00
wing328
2b0efda3bd [Java][Play] Remove swagger play dependency, cleanup (#5159)
* 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.

* Add an CLI option to generate interface. These interfaces are implemented by the controllerImp and help to generate the code with an IDE like IntelliJ because on updates of the code the controllerImp must follow the contract of the interface. If it don't, IDE will provide support to generate missing functions or parameters. I also did some cleanup of options we don't use in Play Framework.

* 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

* Small fixes

* Remove everything related to swagger-play. No need for annotation anymore because we export the swagger.json directly and show the documentation using swagger-ui with the direct path. Also added the sample.

* Remove/Rename paramsX mustache because there is no more documentation. Remove unused file. updated sample

* Fix the problem with default values that was not set correctly.

* Small fix related to bad merging

* Add handleException CLI options

* Fix default values once and for all!

* Update sample files + fix bug

* Fix bug with body that is required and have a list as a parameter + add bean import for interface to prevent compilation error
2017-03-22 23:00:30 +08:00
wing328
f064d29e82 Use unescaped path in API client templates (#5154)
* use unescaped path in api client templates

* use unescape basePath in API client templates
2017-03-22 20:49:06 +08:00
wing328
a4d4b0f0bd fix pattern in python flask (#5155) 2017-03-22 20:41:12 +08:00
wing328
df2f406849 update csharp generator help text (#5140) 2017-03-22 16:18:59 +08:00
wing328
1ee0f4fbad Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-03-22 16:06:22 +08:00
wing328
1c329483e4 [TypeScript] fix class filename in TS Angular2 template (#5131)
* fix class filename in ts angular2 template

* remove trailing comma in ts angular2 template
2017-03-21 23:48:35 +08:00
wing328
52e42701bd Merge branch 'master' of https://github.com/techlogix/swagger-codegen into techlogix-master 2017-03-21 23:29:08 +08:00
Fábio Franco Uechi
0afa084158 Add docker support to python flask (#5133)
* added supporting files for Dockerfile and dockerignore generation for python-flask lang

* documenting how to build the docker image and how to spin up a container

* updating pet store sample
2017-03-21 23:21:53 +08:00
Yao Yao
d217c5c1fd add json-formatter-js library. (#5125) 2017-03-21 21:44:28 +08:00
Ben Herila
42a7110d90 Fix Bug/4952 by explicitly implementing IValidatableObject (#4954)
* Explicitly implement IValidatableObject interface to avoid conflict with potential ValidationResult classes

* Missed one

* Rebuilt tests
2017-03-21 15:57:56 +08:00
Sebastian Mandrean
58198939c7 [C#][aspnetcore] Fix broken Docker build option & documentation (#5128)
* Use lower-case packageName for README.md docker build example

* Use dotnet:1.0.3-sdk instead of just "latest"

* Regenerate Petstore server sample
2017-03-21 14:39:24 +08:00
Paul English
59fe50dd74 Ensure identifiers get sanitized; Ensure model names also have the same formatting (#5098) 2017-03-21 14:35:38 +08:00
Fábio Franco Uechi
7325650f2d solves issue #4752 (#5127) 2017-03-21 14:25:10 +08:00
fumito_ito
c1a9b7313e fix #2159 dataformatter error for iOS Swift (#5008)
* fix #2159 dataformatter error for iOS Swift

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

* update sample code
2017-03-21 14:22:18 +08:00
eblis
21657f80cf Not using files from template folders with libraries inside them (#4628)
* #4627 - When looking for template files also look in the libraries subfolder of the supplied templateFolder, before checking the embedded locations.

* Reworked the order in which template files are searched for:
 - 1st the code will check if there's a <template folder>/libraries/<library> folder containing the file
 - 2nd it will check for the file in the specified <template folder> folder
 - 3rd it will check if there's an <embedded template>/libraries/<library> folder containing the file
 - 4th and last it will assume the file is in <embedded template> folder.

 Added unit test to test template dir overloading.
2017-03-20 22:12:29 +08:00
Gronsak
580745ef43 [C#] Adding support for generating .NET Standard 1.3 client library (#4955)
* [CsharpNetStandard] Added C# .NET Standard Client Generation

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

* [CsharpNetStandard] Removed client prop validation due to incompability

* [CsharpNetStandard] Minor fixes

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

Removed unnecessary targetFramework property
Removed leftover UWP stuff

* [CsharpNetStandard] More fixes

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

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

Todo implement test generation

* [CsharpNetStandard] Added forgoten git_push.sh

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

Also added .bat file for test generation

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

* [C# NET Standard] fixes to enum generation

Fixed issues with enum generation due to tired programmer

* [C# NET Standard] Generated sample client library

Sample library generated

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

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

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

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

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

* Update petstore samples (after fix for elixir for #4898)
2017-03-20 15:24:24 +08:00
foxx1337
090d80b42c [JAVA][jaxrs-spec] Add @DefaultValue for query parameters in API (#5023) (#5024)
This was previously missing and I don't think it was intentional.
It appears that swagger-codegen is already correctly processing
the yaml and the placeholder in the template was the only thing
missing.
2017-03-20 15:04:27 +08:00
Oliver Teichmann
2d21bfa21c Updated feign library to use latest version of OpenFeign and Jackson. (#5114) 2017-03-19 15:15:06 +08:00
wing328
eee5cc061c fix path with {{{ .. }}} in c# api mustache file (#5112) 2017-03-18 23:02:20 +08:00
jfiala
2048defe7b add jackson dependencies to pom for cxf-client #4924 (#5032) 2017-03-18 22:13:44 +08:00
rcilia
d5cb70f03e Swift3 enum: number variable names fix (#5060)
* Swift3 enum: number variable names fix

Swift3 generator: added 'number' prefix to enum variable names that start with a number

* Fixed Swift3 enum variable names starting with number (prefixed with '_') and added test cases

* Swift3 enum var names: made sure to keep the next word after a number in lower case
2017-03-18 17:29:52 +08:00
Paŭlo Ebermann
1b973d2c43 Update petstore samples for scala client. (#5092)
* Update petstore samples for scala client.

* Fix missing dependency problem.
2017-03-18 16:44:53 +08:00
wing328
98e8e55281 Merge pull request #5065 from ibm-bluemix-mobile-services/issue-4764
[Swift] Fix issue #4764
2017-03-17 21:53:44 +08:00
Sebastian Mandrean
5ed94a002c [Haskell] Fix broken client/server compilation errors (#5097)
* Remove dead legacy code

* Update cosmetics according to Haskell standard practices

* Fix failing pattern matching for lookupEither

* Bump to latest dependencies without any breaking changes

* Remove duplicate instance declarations already existing in Servant.API.Verbs

* Fix double Java/Haskell escapement bug

* Re-generate Petstore sample client/server
2017-03-17 16:55:11 +08:00
Tony Tam
9ddf28ff75 Update wordnik.yaml 2017-03-16 16:04:59 -07:00
Tony Tam
20580f9b1b Update wordnik.yaml 2017-03-16 16:01:34 -07:00
wing328
917306aa10 override escape quotation mark in async scala generator (#5078) 2017-03-16 01:14:43 +08:00
wing328
878b390ab6 Merge pull request #5049 from jostick/fix-scala-listbuffer
Fixes ListBuffer import-mapping for scala clients
2017-03-15 23:33:00 +08:00
Paŭlo Ebermann
31f29be2a0 Use deterministic randomness in ExampleGenerator. (#5068)
* Update samples for nodejs + nodejs-google-cloud-functions.

* Fix example generator to use deterministic randomness.

This avoids changing results after each generation, and makes diff reviews easier.

* Update NodeJS samples.

This is the last "randomness" update. From now on the samples should only change if either the generator, the input or parameters change.
2017-03-15 17:15:13 +08:00
Matt Alleman
b2aa877ce0 Allow for UUID types in akka-scala (#5069)
* allow for UUID types

* update sample libs
2017-03-15 17:02:42 +08:00
Anthony Oliveri
88a755f368 [Swift] Detect file type in Swift codegen 2017-03-14 15:02:34 -05:00
Ben Herila
eea58c55b4 Add support for typescript-jquery (typescript-based API calls using jquery ajax in the browser) (#4953)
* Typescript jquery client wip

* typescript-jquery wip

* Fix typo

* typescript-jquery wip

* Fix formatting

* Petstore sample for typescript-jquery

* Petstore sample for typescript-jquery

* wip
2017-03-15 00:17:04 +08:00
Johannes Stickel
02f2fde65e
Fixes ListBuffer import-mapping for scala 2017-03-13 16:43:47 +01:00
Paŭlo Ebermann
a2d1edc6f5 Fix (partially) #4898 for groovy (#5030)
* Fix (partially) #4898 for groovy.

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

* Update Groovy samples (after partial fix for #4898)
2017-03-13 21:46:28 +08:00
Jeff Haynes
ba380c9dda Issue 4759: Import complex type for body parameters (#4775) 2017-03-13 15:35:21 +08:00
wing328
7733dba002 Merge branch '2-call-visibility' of https://github.com/jdupouy/swagger-codegen into jdupouy-2-call-visibility2 2017-03-13 00:21:22 +08:00
Paŭlo Ebermann
c76f006067 fix (partially) #4898 for dart. (#5019) 2017-03-12 17:08:48 +08:00
jfiala
39eba39625 [Jaxrs-cxf] add ApiResponse/s to operation #4718 (#4920)
* add ApiResponse/s to operation #4718

* use spaces instead of tabs #4718

* fix alignment issues #4920

* fix alignment issues #4920

* replace tabs with spaces #4920

* updated samples #4920
2017-03-12 16:58:19 +08:00
Paŭlo Ebermann
16adc7b373 Fix (partially) #4898 for flash (#5022)
* Fix (partially) #4898 for flash.

This fixes path, query and header parameters.

* Update samples for flash (after partial fix for #4898).
2017-03-12 16:53:18 +08:00
ravinikam
c4bd4c9e91 Add missing number type mapping (#5013)
number to float or double type mapping was missing, added number to double to accommodate both.
2017-03-11 23:03:37 +08:00
wing328
3dfa423151 Merge branch 'patch-2' of https://github.com/ravinikam/swagger-codegen into ravinikam-patch-2 2017-03-11 20:36:45 +08:00
wing328
0ce6c7e3a8 do not map UUID as model in java (#5026) 2017-03-11 20:32:46 +08:00
XuXinkun
3c1a8daaf9 fix handleResponse to not leak okhttp connections (#4997) 2017-03-11 17:02:49 +08:00
Tony Tam
0dcd91adbf null out the string null in examples. Rebuilt java clients and made a whole bunch of changes 2017-03-10 11:07:30 -08:00
ravinikam
a29c8c937a Update exception message to use operationId
Update ApiException to use {{operationId}} variable to correct typo
2017-03-10 12:41:15 -06:00
Tony Tam
3ff4c988b8 Merge pull request #4999 from swagger-api/issue-4998
updated parser
2017-03-10 09:46:12 -08:00
Tony Tam
f9835a4b37 matched key to actual value 2017-03-10 09:31:02 -08:00
Tony Tam
db4945fdbf added type check 2017-03-10 09:30:49 -08:00
Julien Dupouy
3da8654336 Change build call visibility 2017-03-10 18:05:27 +01:00
Jean-François Côté
20c8f9a831 Java Play Framework Server Generator (#4943)
* 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
2017-03-10 22:10:49 +08:00
David Biesack
ec3b338988 Improve HTML output for model titles, default responses (#4991)
Render "default" instead of 0 for response code when Swagger uses "default" (#4982)
Add title for models to TOC and each model's section
Render model description only conditionally.
Remove extraneous Up link

Regenerate samples/html/index.html
2017-03-10 21:47:20 +08:00
pablograna
fb75996527 Make java spring controller constructor public. (#4972)
* Make java spring controller constructor public.

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

* Ran spring-all-pestore.sh.
2017-03-09 23:11:44 +08:00
Rohit Sood
11856e9712 Update Spring Fox dependency version to 2.6.1. This fixes a defect where Swagger and Feign clients do not conflict when registration occurs with Eureka. 2017-03-09 09:54:49 -05:00
wing328
bfb4390a1c [TypeScript][Angular2] better code indentation, update Petstore sample (#4990)
* fix query parameter indentation, update ts angular2 sample

* update ts angular2 sample
2017-03-09 22:27:29 +08:00
baartosz
cffaaa027a minor improvements to Configuration php template (#4989) 2017-03-09 17:28:19 +08:00
wing328
4fe79f0078 Remove default format (JSON) from API operations (#4987)
* remove default format (json) and update ruby petstore

* update python petstore sample

* update php petstore sample

* update android petstore sample

* update java petstore sample

* update objc sample

* remove default format (json) from perl
2017-03-09 11:12:01 +08:00
wing328
b6d6356c46 remove default format (json) from c# api (#4980) 2017-03-08 22:43:59 +08:00
baartosz
d21e156071 [PHP] error when deserializing enums #4032 (#4886)
* fixed enum template; added enum handling to ObjectSerializer

* regenerated templates

* improved InvalidArgumentException message

* regenerated sample client

* added value check of OuterEnum during sanitization

* regenerated samples
2017-03-08 19:08:42 +08:00
Michael Kourlas
2bb7626202 [Java] Fix for issue #3365: Support for gzip compression (#4967)
* Fix for issue 3365 for Java

* Added tests

* Convert CRLF to LF

* Convert CRLF to LF in tests
2017-03-08 19:00:50 +08:00
wing328
89ad5e59b8 use convertPropertyToBooleanAndWriteBack in some generators (#4975) 2017-03-08 17:39:22 +08:00
wing328
5dbcf6e8e4 [JavaScript] fix issues with boolean CLI options (#4974)
* remove commented code

* fix issue with boolean clioption in js codegen
2017-03-08 16:57:29 +08:00
delenius
5935e2e6d9 Add support for saving/returning cookies (#4192)
This adds a `saveCookies` boolean flag to ApiClient. If set to true,
the client will save and return cookies to the server.

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

* Update sample app for testing

* Fix indentation and remove leftover code

* Update sample for new rest template
2017-03-08 12:03:45 +08:00
jfiala
871b3ceef7 update templates and samples for spring-boot #4719 (#4736) 2017-03-07 23:35:21 +08:00
jfiala
2f43f98cfa update beanvalidation templates and samples jersey2 #4719 (#4732) 2017-03-07 23:35:06 +08:00
jfiala
6a7340378a update beanvalidation templates + samples #4719 (#4733) 2017-03-07 23:34:40 +08:00
jfiala
1e8312782b [Jaxrs-spec] Merge beanValidation/beanValidationParams.mustache (#4731)
* update beanvalidation templates #4719

* update jaxrs-sample #4719
2017-03-07 23:26:30 +08:00
jfiala
c4475861b0 update beanvalidation templates #4719 (#4734) 2017-03-07 23:26:06 +08:00
jfiala
6383872b5f update beanvalidation templates and sample for jersey2 #4719 (#4735) 2017-03-07 23:25:21 +08:00
Paŭlo Ebermann
404a9999a7 Fix (partially) #4898 for swift3 (#4916)
* fix (partially) #4898 for swift3.

* Update petstore samples for swift3 (after fix for #4898)
2017-03-07 17:28:08 +08:00
Paŭlo Ebermann
0f88e4a721 fix (partially) #4898 for MSF4J. (#4917) 2017-03-07 17:26:57 +08:00
wing328
913d05c17c [Python][Flask] Fix inconsistency between model name and file name (#4958)
* fix inconsistence between model name and file name in python flask

* add object as primitype type in python flask
2017-03-07 15:32:41 +08:00
dhuning
6ea3315b3e Implicit headers for SpringCodegen (#4858)
* Add a new option implicitHeaders with default false

* Change JavaSpring templates and codegen to handle implicit headers

* Add script to generate sample for implicitHeader option

* Add generated implicitHeader sample

* Fix alignment
2017-03-07 14:54:15 +08:00
Jacobo de Vera
7de1eeb987 [python] Triple quote strings with new lines in default values (#4941)
* Triple quote python strings in defaults

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

Fixes #4862

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

* Add newly generated python sample files
2017-03-07 14:46:38 +08:00
Val Polouchkine
122194c30e Fix typo (#4956)
Authorizatoin should be Authorization
2017-03-07 13:49:42 +08:00
Egor Masalitin
722b96bcec In case if basePath equals to / we should not append it to url, behaviour was changed to fit this requirements (#4942) 2017-03-06 23:48:20 +08:00
Paŭlo Ebermann
a710149cdd Fix #4898 for jaxrs (#4918)
* fix #4898 for JavaJaxRS (including all libraries).

* Updated samples for jaxrs (after fix for #4898).
2017-03-06 20:04:31 +08:00
wing328
f12554fd83 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-03-06 17:24:04 +08:00
wing328
0838c1a448 Merge branch 'topic/swagger_fix' of https://github.com/Daxten/swagger-codegen into Daxten-topic/swagger_fix 2017-03-06 17:20:42 +08:00
wing328
7782c32140 Merge branch 'fixqt5cppstaticlib' of https://github.com/fortiumant/swagger-codegen into fortiumant-fixqt5cppstaticlib 2017-03-06 15:44:24 +08:00
Zhanwei Wang
10950db2dd [JavaScript] Do not parse null and undefined as type. (#4933)
* [JavaScript] Do not parse null and undefined as type.

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

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

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

* Update tests to use option
2017-03-06 14:50:21 +08:00
Paŭlo Ebermann
e477ac9472 Fix #4898 for spring-cloud. (#4919)
Somehow I omitted this in #4875.
2017-03-06 14:47:52 +08:00
Matan Rubin
899ef8f1ef [JAXRS-CXF] [bug #4422] use java.util.Date when selecting dateLibrary=legacy (#4724)
according to the help message setting dateLibrary to 'legacy' should
make the code generator use java.util.Date.
before this change, when setting dateLibrary to 'legacy' made the
generator use javax.xml.datatype.XMLGregorianCalendar.
now, the generator uses java.util.Date such that the documentation and
behavior are consistent.
2017-03-06 14:25:15 +08:00
Paŭlo Ebermann
6c9b0ce257 Update samples for Scalatra after 2.2.2. (#4910)
* Update samples for Scalatra after 2.2.2.

* [scalatra] Revert changes to build.sbt

Changes were made in conjunction with the new finch generator. This
reverts those changes to Scalatra's previous build.sbt.

* Update scalatra samples again after revert of part of #3905.
2017-03-06 14:23:02 +08:00
Tony Tam
b9d9629a65 Merge pull request #4925 from jfiala/cxf_swagger-core_4924
[Jaxrs-cxf] Fix compile errors after update of swagger-core / add jackson dependencies to pom #4924
2017-03-05 10:31:02 -08:00
Johannes Fiala
f72340fb17 change jackson jaxrs version to 2.8.4 #4924 2017-03-05 19:17:27 +01:00
jsone-studios
7800641db2 Fixes #4913 (#4914) 2017-03-06 01:15:56 +08:00
Viktor Chukhantsev
35d3fb82ce [Ruby] Can only use content-type application/json with ruby-client #4867 (#4893)
* Fix ruby-client work with modern content types, like application/api.vnd+json

* Add specs.

* Fix regexp.

* Regenerate petstore client.
2017-03-06 00:44:15 +08:00
Johannes Fiala
165076a427 add jackson dependencies to pom #4924 2017-03-05 17:30:17 +01:00
Jonathan Leitschuh
66a510c9d3 Make the CodegenConfigurator serializable (#4890)
Closes #4887
2017-03-03 22:57:57 +08:00
wing328
061f4d07d8 fix issue with pom dep in jaxrs jersey1 (#4904) 2017-03-03 22:25:59 +08:00
Bart Kummel
30c2b6f262 Improved ExampleGenerator (#4797)
* Improved ExampleGenerator:

- Now takes into account enum and uri/url formats for strings.
- Uses example for referenced objects if available.
- Proper examples get generated for specific numeric formats, because more specific formats now get checked before generic format.
- Honors min and max values for numerical properties, if set.

* Ran script `bin/nodejs-petstore-server.sh`.

* Renamed log to logger to conform to coding standard.
2017-03-03 18:38:19 +08:00
Vlad Frolov
9516c81ebb [JavaScript] Added *WithHttpInfo methods in 'usePromises' mode to provide a way to get access to HTTP response object (e.g. headers or status code) (#3654) (#4902) 2017-03-03 18:20:52 +08:00
patulacci
e23a24c138 replaced SWG by classPrefix and ran tests (#4871) 2017-03-03 17:29:16 +08:00
Gábor Berényi
39a42d014b Feature/issue 4698 rxjava2 support (#4743)
* rx2 support

* NO_NOT_USE_RX is for internal use only; plus sanity check if both v1 and v2 are specified

* minor fixes

* one more small fix
2017-03-03 17:00:20 +08:00
wing328
dbe99c3af9 fix path variable in ts angular2 (#4756) 2017-03-03 16:59:23 +08:00
gigo1980
fa803d5cf5 Adjust Date ISO Dateformat for Query Parameters: ISSUE 4745 (#4812)
* Adjust Date ISO Dateformat for Query Parameters: ISSUE 4745

* Run Sample Model
2017-03-03 16:58:24 +08:00
wing328
835c7c0e0c [PHP][Silex] use original path name for path variable naming (#4817)
* use original path name in php silex

* fix path variable naming by camelizing the name
2017-03-03 16:49:00 +08:00
Hamed Ramezanian Nik
b894dc3827 Encode form paramerers properly\n (#4836)
Superagent doesn't encode form parameters properly. For example it doesn't encode objects which contain array. The following is a failed test case:
var my_opts = {
  'storyId': 65441,
  'id': [56, 352]
};
2017-03-03 16:48:11 +08:00
wing328
6c63558acc better python flask readme (#4844) 2017-03-03 16:45:43 +08:00
Paŭlo Ebermann
88c9b6062d Fix for #1219 (#4875)
* Update spring samples with current code.

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

* Regenerate samples after 2.2.2.

* use baseName instead of paramName for spring annotations.

* update spring petstore samples to show the effects.
2017-03-03 16:35:12 +08:00
Alexej Haak
195ff25f43 fixes progress for file upload with alamofire / swift3 2017-03-02 17:16:10 +01:00
Oliver Trosien
55b64fcbfd Remove maven-api dependencies on swagger-codegen module (#4840)
* Remove maven-api dependencies

* Use org.apache.commons.lang3.StringUtils
2017-03-02 18:05:21 +08:00
Bartek Kryza
1b1767e489 [Bash] Bugfix default curl options fix (#4832)
* Fixed default cURL parameter handling

* Fixed iterator increments in JSON body Bash generator

* Added tests for content type and default cURL params

* Fixed generated Dockerfile Bash script access rights

* Generated test sample client

* Updated Bash generator README
2017-03-02 17:48:30 +08:00
wing328
775f108d4e update version to 2.2.3-SNAPSHOT (#4894) 2017-03-02 16:54:37 +08:00
baartosz
26257daec3 fixed ApiException's methods return types (#4845) 2017-03-02 16:45:42 +08:00
Tony Tam
8504c12ce0 update to release versions 2017-03-01 14:22:34 -05:00
Tony Tam
b941fcfdb6 remove timestamp 2017-03-01 14:14:30 -05:00
Tony Tam
a27a76adf4 fixed missing dep 2017-03-01 13:21:14 -05:00
wing328
f15267c717 add missing dependency to jaxrs pom 2017-03-02 01:56:27 +08:00
Tony Tam
894f272f89 updated core versions 2017-03-01 08:51:18 -05:00
jfiala
de727d7d60 [JaxrsResteasy] Improvements for Resteasy for Jboss EAP 4512 (#4712)
* add language for resteasy eap #4512

* first implementation of jaxrs-resteasy-eap #4512

* add support for joda and java8 datetime types #4512

* add new file JacksonConfig and new sample eap-joda #4512

* add dynamic swagger support to jaxrs-resteasy-eap #4512

* adapt readme for eap #4512

* add tests for jaxrs-resteasy-eap #4512

* cleanup tabs #4512

* cleanup tabs #4512

* cleanup tabs #4512

* cleanup tabs / regenerate without joda #4512

* regenerate with updated templates #4512

* fix test (wrong setter invoked) #4512

* fix test #4512

* fix no invocation #4512

* replace tabs with spaces #4512
2017-03-01 00:20:35 +08:00
Antoine Kurukchi
471598359a Added include to qt5cpp to fix library compile
While creating a static library from the generated files, compilation issues arose due to QDateTime only being forward declared. Adding the include resolves the issue.
2017-02-22 09:53:43 +00:00
wing328
d11d0f88bb fix warning in swagger json/yaml generator (#4827) 2017-02-20 16:51:31 +08:00
jsone-studios
6746632834 Fix for #1940 - Show response headers (#4825) 2017-02-20 16:18:09 +08:00
Tristan Sokol
23d114e1eb Fix minor spelling mistake in readme (#4818) 2017-02-20 15:13:06 +08:00
wing328
bb81fc130a remove unused files for nodejs gcf (#4808) 2017-02-16 17:39:06 +08:00
Paul English
accd176382 Ensure that ApiInvoker.scala can support UUID types (#4807) 2017-02-16 17:00:26 +08:00
Adnan Baruni
24474126e1 Issue 4742 (#4763)
* add boolean datatype flags to CodegenResponse and logic to set them in DefaultCodegen

* use Boolean.TRUE.equals to check for isResponseBinary or isResponseFile
2017-02-14 14:20:13 +08:00
clasnake
ee23f8e50c Fix finch package name. (#4755) 2017-02-13 22:33:55 +08:00
Igor Khomenko
7df1f8e200 Update DefaultGenerator.java (#4760) 2017-02-13 20:59:36 +08:00
Sreenidhi Sreesha
9cf147f215 [Java] Change Boolean fields of CodegenParameter and CodegenResponse to boolean. (#4747)
CodegenOperation and CodegenProperty classes have boolean fields instead of Boolean.
This fix changes Boolean fields of CodegenParameter and CodegenResponse to boolean as well.

Boolean fields are not necessary. Other classes interacting with them have to check for null
before interacting with them which is unnecessary and leads to ugly code.
2017-02-13 19:45:42 +08:00
wing328
8f2e9bce6d remove trailing whitespaces in java api client (#4784) 2017-02-13 18:53:34 +08:00
Clem
74da89c6ac Fix issue when the swagger model contains an 'Object' class (#4695)
If the swagger model contains a class named 'Object' some mustache templates
will generate non compiling **Java** code.
2017-02-13 18:07:00 +08:00
BastiOfBerlin
a956966ff2 Update gitignore (#4767)
ignore dist folder
2017-02-13 18:03:48 +08:00
wing328
ef31efe8d9 remove default temp folder during initalization (#4749) 2017-02-09 12:22:13 +08:00
Jan
0d14496bd6 [Java-retrofit] Fix for #4750 String comparison with equals (#4751)
* [Java-Feign] Fixed String comparison using equals instead of == operator

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

* [Java-retrofit] Fix for #4750 String comparison with equals
2017-02-08 21:54:56 +08:00
wing328
d91135ec8f Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-02-08 17:00:01 +08:00
wing328
7998a30b92 Merge branch 'uuid-type' of https://github.com/MatanRubin/swagger-codegen into MatanRubin-uuid-type 2017-02-08 16:02:27 +08:00
Jan
2179b44413 [Java-Feign] Fixed String comparison using equals instead of == operator (#4740)
* [Java-Feign] Fixed String comparison using equals instead of == operator

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

* Fixed autocomplete support for bash-completion < 1.4

* Added mime type autocomplete for Zsh

* Fixed Bash url autocompletion

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

* Added generation of Dockerfile for packaging Bash rest clients

* updated test samples for Bash client generator
2017-02-07 23:15:05 +08:00
Matan Rubin
1339222bbc [Java][Issue #1806] generate using java.util.UUID for UUIDs
Before this change if a model had a property of type=string and
format=uuid, it would be generated as a Java String.
Now, it generates the property as java.util.UUID.
2017-02-07 13:38:20 +02:00
wing328
a123dd7ef1 Revert "rx2 support" (#4737) 2017-02-07 17:52:47 +08:00
Gábor Berényi
d12f428f42 rx2 support (#4708)
* rx2 support

* NO_NOT_USE_RX is for internal use only; plus sanity check if both v1 and v2 are specified
2017-02-07 17:44:22 +08:00
Jim Schubert
96b0d155b5 [csharp] Fix enum default value (#4681)
* [csharp] Prevent enum assign to string

see swagger-api/swagger-codegen#4670

* [csharp] Regenerate client sample
2017-02-06 17:33:10 +08:00
Joshua Helm
b891a4a4cf fix issue #4672 - XmlExampleGenerator does not properly handle properties of several numeric types (#4673)
* fix issue #4672 and bring XML default example values in-line with ExampleGenerator

* converted tabs to spaces
2017-02-06 17:30:29 +08:00
wing328
c0fc66ebec Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-02-06 15:33:11 +08:00
wing328
509a156879 Merge branch 'jaxrs_beanval_final_4091' of https://github.com/jfiala/swagger-codegen into jfiala-jaxrs_beanval_final_4091 2017-02-06 15:13:03 +08:00
Markus
4900427bf5 [JAXRS-CXF] Issue 4569 - Re-added usage of contextPath in api.mustache (basePath) (#4580)
* jaxrs-cxf: Re-added usage of contextPath in api.mustache (basePath)

* jaxrs-cxf: Added useAnnotatedBasePath and generateNonSpringApplication flags

 * useAnnotatedBasePath=true uses the @Path annotation in the generated interface to set the basePath, default is false

 * generateNonSpringApplication=true generates a web.xml with CXFNonSpringJaxrsServlets. If useAnnotatedBasePath=true only one servlet will be created, otherwise one for each API

* jaxrs-cxf generateNonSpringApplication: removed creation of multiple servlets

Multiple servlets were generated if useAnnotatedBasePath was false.
This is not necessary as there is only ONE basePath per contract

* jaxrs-cxf: added sample generation for useAnnotatedBasePath and generateNonSpringApplication
2017-02-06 14:11:41 +08:00
jfiala
a52a84a7d7 [Jaxrs-cxf-cdi] merge beanvalidation templates to single one #4719 (#4723)
* merge beanvalidation templates to single one #4719

* add beanValidationCore #4723
2017-02-06 14:03:26 +08:00
jfiala
38c879683a [Jaxrs-cxf-cdi] Add beanvalidation annotations updated (#4615)
* add check for hideGenerationTimestamp #4091

* update generated sample with no generated timestamps #4091

* add beanvalidation to jaxrs-cxf-cdi #4091

* add beanvalidation to jaxrs-cxf-cdi #4091

* update crlf

* replace tabs

* add check for hideGenerationTimestamp #4091

* update generated sample with no generated timestamps #4091

* add beanvalidation to jaxrs-cxf-cdi #4091

* add beanvalidation to jaxrs-cxf-cdi #4091

* update crlf

* replace tabs

* re-generate samples after rebasing #4091

* fix handling of inner enum templates #4091

* fix InputStream/Multipart imports and fileInputStream variable #4091

* fix paramName for files #4091

* consolidate beanValidationParams #4091

* add paramNameDetail #4615

* fix indentation and regenerate samples #4615

* reset samples jaxrs-spec to master

* update generated samples

* adapt Min/Max/DecimalMin/DecimalMax handling for int/long/else

* add ModelApiResponse
2017-02-06 00:55:30 +08:00
Markus
a83f8d0449 [JAXRS-Spec|Resteasy|CXF] Issue 4315 - Fixed bug generating arrays of enums (#4582)
* jaxrs-cxf: Fixed returning of enum arrays generating non-compiling code

* jaxrs-spec/resteasy: Fixed returning of enum arrays generating non-compiling code

* jaxrs-cxf: Switched to petstore-with-fake-endpoints-models-for-testing.yaml contract for sample generation

 * Fixed escape char issue in ApiOperation summary
 * Fixed code generation for non String-type enums
 * Fixed @PATCH annotation import

* jaxrs-spec: Switched to petstore-with-fake-endpoints-models-for-testing.yaml contract for sample generation
2017-02-05 23:01:18 +08:00
Johannes Herrnegger
95a8192c25 [Typescript-Angular2] Fixes #4703 (#4704)
* fix issue #4703

* run petstore
2017-02-04 13:00:26 +08:00
eamon316
23aee52bcd Feature/4606 (#4607)
* Issue #4606 (Spring) SubClass annotations are missing from the base class

* Issue #4606 (Spring) SubClass annotations are missing from the base class
   * Commit updated samples from ./bin/spring-all-pestore.sh
2017-02-03 22:30:32 +08:00
asgerjensen
4ba0ea9dc5 fix(jax-rs): fix package name in generated StringUtil.java to match where file is generated (#4677) 2017-02-03 21:46:29 +08:00
wing328
5282987851 [Python] update python requirement.txt and use single quote for safe characters (#4702)
* update python requirement

* update petstore sample
2017-02-03 21:35:40 +08:00