Commit Graph

3618 Commits

Author SHA1 Message Date
Harald Walker
4417bb6b32 #5649 Fix FileAlreadyExistsException when downloading file using jersey2 (#5654)
* #5649 Fix download file copy

* Include generated pet store samples and fix indentation

* Regenerate petstore sample to fix indentation
2017-05-18 15:12:53 +08:00
Cas Perl
a6b7f60ac7 Python improved (#5512)
* ignore .vscode

* fixed test case for models requiring mandatory attributes. added deserialize test for enum class

* construct model with mandatory attributes. improve class reflection (e.g. deserialize). disable generated empty model unit test for further FIXME

* rebuilt samples

* FIXME comment

* FIXME comment

* fix deserialization enum test
2017-05-17 21:18:51 +08:00
Benjamin Douglas
be3cfda3ce Disable Jackson FAIL_ON_INVALID_SUBTYPE in feign (#5597)
* Disable Jackson FAIL_ON_INVALID_SUBTYPE in feign

With this change, Jackson does not fail even if it doesn't recognize a
discriminator type name. This is helpful when upgrading a microservice with
a new subtype while keeping compatibility with its old clients. The instance
is returned as null instead of throwing an exception deep in the feign
framework, allowing clients to gracefully degrade.

* Disable FAIL_ON_INVALID_SUBTYPE for all Jackson-based projects
2017-05-16 21:20:05 +08:00
wing328
de427297ec update petstore samples for flask connexion 2017-05-16 21:09:16 +08:00
Kyle Cacciatore
046b730446 Upgraded connexion to 1.1.9 - required change to encoder as connexion is isolating implementation specific code (#5645) 2017-05-16 21:07:21 +08:00
wing328
0a67696de8 Merge branch 'empty_classes' of https://github.com/bbdouglas/swagger-codegen into bbdouglas-empty_classes 2017-05-16 17:51:42 +08:00
wing328
1fc969b050 Merge branch 'sync_samples' of https://github.com/bbdouglas/swagger-codegen into bbdouglas-sync_samples 2017-05-16 16:51:41 +08:00
Brendan Burns
c5d1c5d73b Extract out a new helper method from java ApiClients (#5648) 2017-05-16 13:59:06 +08:00
Takuro Wada
a7d5684679 [Python] add an option to Config in order to specify safe chars for path parameter (#5628) 2017-05-14 11:54:26 +08:00
Takuro Wada
11baad6e4b [TypeScript-jquery] set default return type as any (#5630)
* [TypeScript-jquery] fix bug of empty returnType appearing if returnType is not provided

* chore: add security sample for typescript-jquery
2017-05-14 11:36:09 +08:00
sdoeringNew
98d53bc8d2 #5619 added getValue() method in generated Enum classes in Java (#5620) 2017-05-13 00:03:44 +08:00
Brendan Burns
e7a1f5fb17 [Java] Add custom SSL KeyManagers for okhttp-gson Java clients (#5629)
* Add the ability to set SSL KeyManagers for okhttp-gson Java clients

* Update generated code.

* Update security model files.
2017-05-12 23:49:00 +08:00
wing328
68864a2eea [JavaScript] Minor fix to JS doc and add swagger-codegen version to the file header (#5623)
* fix JS doc using instance instead of default

* update JS header with codegen version

* roll back change in swagger codegen version in pom.xml
2017-05-12 16:49:20 +08:00
wing328
9b68f02f83 [Java][Spring] Undo "Add examples defined in the spec to Spring MVC server generator " (#5599)
* remove unused pom.xml in go pestore

* remove example support in JavaSprin (undo changes)
2017-05-10 17:31:43 +08:00
kenisteward
ec7b80abab #4962 Empty Response body handling in typescript-angular2 - added returning an empty object on response.json() failure (#5585) 2017-05-10 15:46:33 +08:00
Voydz
5a257a0558 [csharp] fixes for netstandard (json serializing and project files) (#5590) 2017-05-10 15:24:43 +08:00
wing328
fd3cae6c4b rename .swagger folder to .swagger-codegen 2017-05-09 17:07:45 +08:00
sabras75
824842290d Fix#5510 (#5582)
* Add overloads on signals.
The overload adds the NetworkError and the error string to the signal. Both signal will be emitted. Clients are supposed to subscribe to  only one of the overloads.

* refactor generated code alignement

* Do not use method overload for signals. Instead, have another naming convention for signal that carries Error information.
 Why ? Because signal overloading and QT5 connector with method referencing do not mix well (see http://stackoverflow.com/questions/16794695/connecting-overloaded-signals-and-slots-in-qt-5). It would need to specify exactly which overload to take. That is cumbersome to write AND is a breaking change for the consumer of the generated code.

* update qt5 sample files
2017-05-09 16:34:17 +08:00
wing328
621ff06a89 update java petstore sample 2017-05-08 18:33:25 +08:00
Vincent Coetzee
409638676e Added code to templates to ensure correct generation of code for Swift3 (#5390)
* Added code to templates to ensure generation of code for Swift3 that builds on both Apple platforms and Linux. Fixed a bug in the Model decoders that prevented code from building for Linux

* Ran the script to generate the PetStore API
2017-05-08 18:26:30 +08:00
Takuro Wada
a81cff0ed0 [typescript-angular2] change OpaqueToken to InjectionToken<string> (Issue #5565) (#5569)
* change OpaqueToken to InjectionToken<string> and add useOpaqueToken option for typescript-angular2 (#5565)

* run security shell
2017-05-08 18:08:54 +08:00
Marcus Low Junxiang
adb213bc00 Modifying resty dependency to use stable release instead of HEAD (#5579)
* Modifying resty dependency to use stable release instead of HEAD

* adding dependency to pre-integration test
2017-05-08 09:55:13 +08:00
Luca Favatella
ea16da813c [Erlang] Plant CI for server (#5559)
* [Erlang] Address apparent reproducibily issue of sample

Spotted running `bin/erlang-petstore-server.sh` on d08d55d41 .

Apart from newlines, this is the opposite change of ec6248cbc .

* [Erlang] Perform basic testing of sample server on CI

* [Erlang] Install recent Erlang/OTP version

... in order to satisfy `jesse` compilation.

The error I faced is:
```
$ curl -f -L -o ./rebar3 https://s3.amazonaws.com/rebar3/rebar3 && chmod +x ./rebar3 && ./rebar3 version && export PATH="${TRAVIS_BUILD_DIR}:$PATH"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  766k  100  766k    0     0  1041k      0 --:--:-- --:--:-- --:--:-- 1041k
rebar 3.3.6 on Erlang/OTP R16B03 Erts 5.10.4
...
===> Verifying dependencies...
===> Fetching jesse ({git,"https://github.com/for-GET/jesse.git",
                                 {tag,"1.4.0"}})
===> Fetching jsx ({git,"https://github.com/talentdeficit/jsx.git",
                               {branch,"v2.8.0"}})
===> Skipping jsx (from {git,"git://github.com/talentdeficit/jsx.git",
                                    {tag,"2.8.0"}}) as an app of the same name has already been fetched
===> Compiling jsx
===> Compiling jesse
===> Compiling _build/default/lib/jesse/src/jesse_tests_util.erl failed
_build/default/lib/jesse/src/jesse_tests_util.erl:28: can't find include lib "common_test/include/ct.hrl"
_build/default/lib/jesse/src/jesse_tests_util.erl:55: undefined macro 'config/2'

_build/default/lib/jesse/src/jesse_tests_util.erl:24: function do_test/2 undefined

_build/default/lib/jesse/src/jesse_tests_util.erl:72: function test_schema/3 is unused
_build/default/lib/jesse/src/jesse_tests_util.erl:102: function get_path/2 is unused
_build/default/lib/jesse/src/jesse_tests_util.erl:105: function load_schema/1 is unused

[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
	at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
	at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
	at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
	at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
	at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (Erlang Test) on project ErlangServerTests: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
```

* [Erlang] Bump `jsx` dependency to latest stable version

* [Erlang] Disable sample server from CI until compilation works
2017-05-06 11:23:30 +08:00
mguan-trulia
918343b684 issue #3365 adding accept encoding for PHP (#5525) 2017-05-06 10:40:08 +08:00
Alexander
9212c21567 [PHP] Add default value to method signature if present in Swagger spec (#5571)
* Add default value to method signature if present in Swagger spec

* Update pet store PHP code
2017-05-06 10:39:14 +08:00
beatcracker
d214e0ad4b [PowerShell] module to serve as template for PowerShell generator (#5509)
* Added PowerShell module. See #4320

MVP PowerShell module to serve as a template for a PowerShell generator.

* Fixed function name

* Removed module manifest

It should be generated by the build script

* Ignore module manifests

* Removed binding from prop. name for Pet
2017-05-05 17:21:11 +08:00
wing328
167cbe9726 remove trailing comma in ts angular template (#5563) 2017-05-05 17:05:45 +08:00
wing328
8e0d940e0a update cpprest petstore sample 2017-05-05 16:20:59 +08:00
Jim Schubert
8e6dfce83e [csharp2] Extend generator from AbstractCSharpCodegen (#5552)
* [csharp2] Extend generator from AbstractCSharpCodegen

* [csharp2] regenerate sample
2017-05-05 15:58:01 +08:00
Ravi
f101a43b9e [C++][CppRest] Add CMake file template to generate CMakeLists build file (#5561)
* Add operationId in exception message

* add number data type mapping

* removing mergetool lines

* first draft of cmake file

* compiles generated source files with 64 bit cpprest and boost

* using glob recurs to add source files

* using glob recurse for source files

* cmake to build statuc library

* add cmake style comments, use project source dir and lib

* fix_issue5488: Add supporting files and source files separately

* fix_issue5488: Add supporting files and source files separately

* fix_issue5488: Add supporting files and source files separately

* fix_issue5488 - updated header comments

* updated samples
2017-05-05 15:47:39 +08:00
wing328
1e9fe51175 use original value of pattern (#5554) 2017-05-04 18:01:52 +08:00
Andrea Polci
fd17955685 #5548 Avoid html escaping of pattern in bean validation (#5549)
* Issue #5548 Avoid html escaping of pattern in bean validation

* Run spring-all-petstore.sh and java-petstore-all.sh scripts
2017-05-04 17:12:13 +08:00
wing328
a7e42ee2b6 add validatable flag for .net 3.5 (#5544) 2017-05-03 21:32:25 +08:00
wing328
e28471341c add switcgh to determine java8, java7 (#5541) 2017-05-03 16:41:58 +08:00
Benjamin Douglas
7406d07aca Reverting petstore sample gen (fails tests) 2017-05-02 19:55:47 -07:00
Benjamin Douglas
34d9dca5e7 Update samples to current code/scripts
This is the result of

  - `$ git checkout master`
  - `$ bin/run-all-petstore`

No change was made to the code, just ran the aggregate sample generation
script.
2017-05-02 10:33:06 -07:00
wing328
3744a3f8f5 add option to skip client side validation in ruby client (#5528) 2017-05-02 21:30:59 +08:00
herrerog
70f4c72421 [Python]: correct query_params type. (#5503)
query_params is a list of tuple, so defined it as a list by
default instead of a dict.

This fix below issue on the client side.

Traceback (most recent call last):
  File "test.py", line 13, in <module>
    api_response = api_instance.seek("the")
  File "python-client/swagger_client/apis/seek_api.py", line 168, in seek
    (data) = self.seek_with_http_info(recherche, **kwargs)
  File "python-client/swagger_client/apis/seek_api.py", line 245, in seek_with_http_info
    collection_formats=collection_formats)
  File "python-client/swagger_client/api_client.py", line 323, in call_api
    _return_http_data_only, collection_formats, _preload_content, _request_timeout)
  File "python-client/swagger_client/api_client.py", line 135, in __call_api
    self.update_params_for_auth(header_params, query_params, auth_settings)
  File "python-client/swagger_client/api_client.py", line 512, in update_params_for_auth
    querys.append((auth_setting['key'], auth_setting['value']))
AttributeError: 'dict' object has no attribute 'append'

Signed-off-by: Gregory Herrero <gregory.herrero@gmail.com>
2017-04-29 12:07:09 +08:00
wing328
556be7dfd6 update qt5 c++ petstore samples 2017-04-28 22:47:05 +08:00
sabras75
994e4fd8ff Fix#5481 (#5499)
* Add CPP_NAMESPACE option

* update mustache template to exploit cppNamespace option

* update sample files

* correction : missing namespace replacement in template
2017-04-28 22:19:37 +08:00
Xin Meng
c7979da74d add withCredentials to the configuration (#5484)
* add withCredentials to the configuration

1. `withCredentials` in Request is `false` default
2. if want to set the `withCredentials` as `true` (for CORS request),
 instance `Configuration` object and set the `withCredentials` as `true`.

* simplify the code according to the code review
2017-04-28 18:11:23 +08:00
Daniel Woodel
bfae01cd35 [swift3] Swift3 code generator & templates fixed to support additional properties, updated petstore for CI (#5407) 2017-04-28 01:58:54 +08:00
guidovezzoni
663db1b72a Fix issue5425 (#5483)
* issue 5425 : [Android] Bug generating parcelables constructors for custom classes ( missing getClassLoader() )

* issue 5425 : changes in generated code

* ran ./bin/java-petstore-all.sh and committed the changes
2017-04-28 01:23:32 +08:00
wing328
2324e927bd [Java][Spring] fix missing import for java.io.IOException (#5501)
* fix issue about import io exception for spring mvc

* fix spring-mvc-petstore-j8-async script, config

* update spring cloud client, restore petstore.yaml
2017-04-28 00:45:06 +08:00
wing328
42a5a13fef [Java][Spring] Fix spring cloud client due to enhancement in adding server example responses. (#5497)
* add use spring cloud client option

* uncomment spring cloud client test

* remove scala-related tests from pom.xml for circleci

* fix mismstach tag
2017-04-27 20:00:56 +08:00
wing328
e8feca2753 [Android] add windows batch, better code foramt (#5496)
* remove trailing space in cpprest, update samples

* add android batch files, better code format, sync petstore.json with
petstore.yaml

* restore petstore.json and sync it to petstore.yaml

* update circleci pom.xml

* add new android files

* add new android files
2017-04-27 17:58:38 +08:00
wing328
89464cbe5f Update pom.xml for CircleCI to test java-related projects only (#5477)
Update pom.xml for CircleCI to test java-related projects only
2017-04-27 00:49:03 +08:00
wing328
58db6a5e14 Revert "Issue#5376- changes to include swagger version in generated api files (#5449)" (#5489)
This reverts commit 702f193f61.
2017-04-26 17:53:36 +08:00
Elizabeth Thomas
702f193f61 Issue#5376- changes to include swagger version in generated api files (#5449)
* Elizabeth - changes to include swagger version in generated api files

* Filtering version.properties in swagger codegen module

* Removing resource filtering from swagger codegen cli module

* Merging master
2017-04-25 23:28:16 +08:00
Elizabeth Thomas
efb337dd92 Issue 5413 - Use ConstructorBased Injection for ObjectMapper (#5430)
* Converting to constructor based injection

* Correcting spelling mistake

* Adding the bean for ObjectMapper

* Adding files modified by running the petstore scripts

* Adding final qualifier to objectMapper variable in apiController mustache
2017-04-25 23:11:18 +08:00