Commit Graph

10146 Commits

Author SHA1 Message Date
Jérémie Bresson
2034f61e53 Add HideGenerationTimestamp getter and setter in the CodegenConfig interface (#8009) 2018-04-12 15:38:10 +08:00
Jérémie Bresson
d0e2d7684d Getter and Setter for hideGenerationTimestamp (#7998)
* Create unit test to control regressions

* Change HIDE_GENERATION_TIMESTAMP handling

* Add new test case: set values with the setters

* Add 'isHideGenerationTimestamp()' getter
2018-04-11 23:44:12 +08:00
HugoMario
338b9c04b8
Merge pull request #8003 from swagger-api/issue-7999
show number as strings
2018-04-10 19:48:40 -05:00
Hugo Mercado
b5ffeff925 added test to verify behavior. 2018-04-10 19:36:23 -05:00
Hugo Mercado
57a8f9f599 show number as strings 2018-04-10 10:21:52 -05:00
Ignacio Molina Cuquerella
c91ce17aee Feature/javaPlayWithAsynchronousControllers (#7705)
* Add property 'supportAsync' to allow the use of CompletionStage of java8

* Add support for completionStage in play-framework templates

* Add script to generate samples for play-framework async controllers

* Add generated samples for java play framework with asynchronous controllers

* Add missing templates and generate samples

* Remove useless comments from generated samples in play framework async

* Fix ControllerImp template for java play framework

* Add script for java play framework async to general script

* Regenerate java play framework server samples

* Fix missing whitespace

* Fix unnecessary blank lines at imports

* Fix tabulation issue

* Fix tabulation issue in controllers

* Remove blanks from api Imp

* Remove more empty lines

* Add blank between methods

* Remove blanks before call to service method

* Fix some tabulations in java play async templates

* Regenerate samples for java play async
2018-04-09 22:41:22 +08:00
Bjarni Þór Jónsson
009dcf0090 Mark not required swagger properties as optional typescript properties (#7806)
* Mark `not required` swagger properties as optional typescript properties

Properties that aren't required in the swagger contract should be marked as optional typescript properties, i.e. with `?` after their name when they are defined.

* Adding Petstore samples files generated with the optional property change
2018-04-09 22:12:17 +08:00
Andrew Diamond
12abfb9686 [aspnetcore] Update Dockerfile (#7873)
* Update Dockerfile

* Readd telemetry optout

* Update Petstore samples
2018-04-09 22:09:51 +08:00
Benjamin Berman
2e69e6c03e build.gradle should not have commas here (#7985)
The commas are invalid syntax and create the error:

```
A problem occurred evaluating project ':client'.
> Could not get unknown property 'testCompile' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
```
2018-04-07 21:41:43 +08:00
Fabian Braun
ce930e7a63 [Jaxrs-cxf] Add bean-level cascaded beanvalidation for pojos (@Valid) fix #4738 (#7807)
* add valid for pojos #4738

* add Valid to imports for pojos #4738

* Do not generate Valid-annotation for Date-types and UUID

* * add Valid-annotation to Containers.  #4738

Collection-valued, array-valued and generally Iterable fields and properties may also be decorated with the @Valid annotation. This causes the contents of the iterator to be validated.
Quoted from: http://beanvalidation.org/1.1/spec/

* add equivalent windows-bat-script for jaxrs-cxf-petstore-server.sh

* differences on jaxrs-cxf-generated-classes introduced by other changes (not related to this PR)
2018-04-07 15:16:22 +08:00
William Cheng
d2bd41dc81
remove TypescriptInversifyAdditionalPropertiesIntegrationTest.java to (#7983)
skip integration test errors
2018-04-06 22:15:57 +08:00
ChrisNguyenGeek
85048f6a05 Removed a duplicated entry in the config file (#7981) 2018-04-06 16:33:41 +08:00
Yukio Ejiri
a3322fbf7e [kotlin] Add OkHttpClient.Builder to ApiClient. (#7907) 2018-04-06 15:27:39 +08:00
benbenw
bdd2c2a4ee Misc typescript Angular code generation improvements (#7898)
use const instead of let when possible
add missing semi-colon
replace " with '
2018-04-06 15:12:23 +08:00
Daiki Matsudate
40d5d09905 [Swift4] accept empty content with default client (#7921)
* [swift4] update mustache to accept empty body

* [swift4] update client

* [swift4] update client tests
2018-04-06 14:59:29 +08:00
Akihito Nakano
35d681b254 Fix the missing tag on FakeApi (#7952) 2018-04-06 14:27:08 +08:00
Akihito Nakano
4a5d16b236 [PHP] Fix string length validation (#7953)
* Add a test case which reproduces the issue

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

* Change `strlen` -> `mb_strlen` in order to count the length correctly

* Regenerate the samples
2018-04-06 14:20:05 +08:00
Benjamin Gill
37faaf9266 [rust-server] API version constant and composite version support (#7969)
* Add constant with API version

* Use semver::Version for ApiVersion

* Go back to API version as a string

* Rust composite services

* Actually use the version from the swagger file
2018-04-06 13:27:13 +08:00
Jérémie Bresson
386b9f432a Modify "postProcessOperations" for "jaxrs-cxf-client" (#7886)
* Fix sh script for 'jaxrs-cxf-client' and generate sample

* Modify "postProcessOperations" for "jaxrs-cxf-client"

* Update "jaxrs-cxf-client" sample
2018-04-05 23:34:37 +08:00
Yukio Ejiri
3c5fb1d809 [kotlin] Add json annotation to each enum value. (#7908)
* [kotlin] Add moshi.Json annotation.

* [kotlin] update petstore samples.

* [kotlin] Remove extra new lines.
2018-04-04 15:26:19 +08:00
Gualtieri Mario
e2c58fad71 Add typescript-inversify code generator (#7885)
* Add typescript-inversify language

* Add windows script


Add windows script

* Use rxjs instead of rx and encoding only the value of URL parameters

* Remove lodash dependency


Remove lodash dependency

* Readd linux user detail on run-docker script

* Solve import problems

* Remove configuration template

* Add usePromise config's variable

* Align Test to check usePromise config parameter

* Add possibility to receive all the httpResponse

* Better ts-lint on api service

* Update sample client example with new ts-lint

* Update petstore sample with new ts-lint
2018-04-04 00:30:53 +08:00
gs
240aad8686 Additional reserved python keywords (#7956) 2018-04-04 00:15:15 +08:00
William Cheng
74fa9418d8
add link to Swagger Codegen eBook in Japanese 2018-04-04 00:14:06 +08:00
murzic4
bad1885b47 fix #7906 [cpprest] add parameterToString for number type with unspecified format (double) (#7929) 2018-04-02 16:44:09 +08:00
Martin Delille
23b31aba89 [qt5cpp] Fix crash when API return a map container (#7933)
* [qt5cpp] Fix crash when API return a map container

* qint32 => {{returnBaseType}}
2018-04-02 16:24:57 +08:00
aneeshkasokan
1b8df5c20f Update ObjcClientCodegen.java (#7950)
Added "class" as a reserved keyword for Objc.
2018-04-02 15:05:32 +08:00
Euan Kemp
b443573945 [Rust] Implement minimal auth support (#7338)
* [Rust] Implement minimal auth support

This is pretty much the bare minimum needed to get v2 auth working.

This is partly based on the Go implementation.

* [Rust] properly format query string

* [Rust] Improve auth formatting

* [Rust] Regenerate petstore sample
2018-04-02 14:58:26 +08:00
Benjamin Gill
6c7813e79c [rust-server] asynchronous support via hyper v0.11 (#7896)
* End use of deprecated openssl method

* Enhance rust-server to use hyper 0.11 to support handling operations asynchronously

The changes are complete and working (at least for microservices tested within Metaswitch).  This isn't completely compatible with the (previous/current) synchronous swagger-codegen.  Specifically,

*   `Client` is no longer `Send + Sync`
*   Api implementations used by Server are no longer expected to be `Send + Sync` (which is good, because it's quite hard if `Client` isn't)
*   the code to create `Client`s and `Server`s, and hook them into `hyper` or `tokio` is different.

Importantly, though, the business logic itself should be unchanged.

* Re-adds the `basePath` element to all server endpoints. This mean clients and servers can talk to each other again.

* Fix multipart formdata codegen

* Fix up handling of multipart messages
* Fix server -> client multipart message response
* Correct handling of optional file types

* Add authorization header to requests with basic auth

* Add client support for `application/x-www-form-urlencoded`

* Import uuid library if headers use UUID type

* Add BASE_PATH to the server module.

* Wrap client connector

* Support both query and body parameters on the same operation
2018-04-02 10:32:45 +08:00
Ben Wells
c8650d0e34 Make optional properties in models optional parameters (#7859)
* Make optional properties in models optional parameters

Move incorrect location of typescript-node client

* Add typescript node package.json to swagger ignore
2018-03-31 12:12:06 +08:00
William Cheng
f2d56b038b
add d-date to swift technical committee 2018-03-30 17:29:36 +08:00
Daiki Matsudate
46e5dddb05 removing trailing spaces (#7943) 2018-03-30 17:13:51 +08:00
Ben Wells
260375c9e1 Fix typescript-node generation of array type models (#7861) 2018-03-30 11:08:30 +08:00
Gerlando Caldara
45a2b5cae8 Update README.md (#7940)
Add Acando Company to list "Companies/Projects using Swagger Codegen"
2018-03-30 10:16:42 +08:00
Akihito Nakano
d58835e571 [PHP] Improve: Make validation strict (#7724)
* Add test case which reproduce the problem

refs https://github.com/swagger-api/swagger-codegen/pull/7686#issuecomment-368200011
> 1. We should pass true as 3rd argument of in_array()

* Add test case for setter

* Strict validation

* Update samples

* Tweak expected value according to changes in #7723
2018-03-25 23:17:46 +08:00
Akihito Nakano
6d88d073ca [NodeJS] make serverPort configurable via CLI option (#7899)
* Add "serverPort" option

* Use port number passed via CLI option if specified

* Replace hand-written param name with the constant

* Rename serverPort -> defaultServerPort

* Fix failed test

https://travis-ci.org/swagger-api/swagger-codegen/builds/357674590
2018-03-25 23:12:15 +08:00
Jeremy Bohrer
fc7e083467 Add interfaces option (#7831)
[TypeScript][Fetch] Add interfaces option
2018-03-25 23:01:18 +08:00
davidbilge
40c30dd2f1 Fix inputSpec for multi module builds (#7883)
Prefix path to `inputSpec` with maven's `${project.basedir}`. The codegen-maven-plugin will look inside the current working directory so whether a relative path works or not is depending on where the maven build is invoked from. Using `${project.basedir}` makes the path absolute.
2018-03-25 22:51:40 +08:00
Ben Wells
ea2474d707 Fix strict class initialisation in auth classes (#7860) 2018-03-23 01:12:28 +08:00
etherealjoy
3b031ed2b8 [qt5cpp] delete callback data allocated before signal emission (#7840)
* Small fixes to prevent crash when empty json body is provided.

* Add deleteLater wrapper for pointers passed to user code to prevent memory leak.

* Updates to move Object Wrapper to separate file

* Add Prefix to class name
2018-03-21 20:51:17 +08:00
Philippe M
d1850091a7 Improve JMeter Template : Fix Issue 7773 (#7774)
* Improve JMeter Template:
In CSV DataSet ignore first line as it contains headers
Share CSV for Thread-Group instead of doing it across all threads
Use scheduler
Add variables definable through properties for:
- Rampup
- Duration
- Threads
Drop HttpClient 3.1 customization
Remove in Test Plan Element host and port as they are defined in User
Variables

* Improve JMeter Template : Fix Issue 7773
This comment #7773
As per request update samples
2018-03-21 20:46:47 +08:00
HugoMario
22f0b8db43
Merge pull request #7882 from swagger-api/issue-7839-null-fields
removed null fields
2018-03-20 21:07:26 -05:00
Hugo Mercado
74fa3b1e13 removed null fields 2018-03-20 18:07:26 -05:00
Martin Delille
fedfb0cda7 Factorize addOption/addSwitch method (#7814) 2018-03-21 00:31:01 +08:00
etherealjoy
73bd24db7d [cpprest] Add support for nested vectors (#7820)
* Small fixes to prevent crash when empty json body is provided.

* cpprest : Add toJson and toHttpContent array support.

* petstore : Run script.

* cpprest : Fix toHttpContent function header.

* petstore : Run script.

* cpprest : Add support for primitive response without enclosing item.

* cpprest : Fix spaces.

* cpprest : Fix build if bodyParam is optional.

* cpprest : Fix vector of vector param.

* Small updates to use utf encoding
Add * operator for ^required
2018-03-21 00:30:17 +08:00
Daiki Matsudate
3b7230b170 [Swift 4] Fix APIHelper to accept array parameter (#7821)
* fix typo

* use URLComponents instead of NSURLComponents

* add encode method for any type

* Add public initializer for modelObject

* change id to _id

* fix APIHelper funcs for array query parameters

* make public to write unit test

* add APIHelperTests

* fix typo

* fix regression
2018-03-21 00:23:47 +08:00
SergeyLyakhov
f023327558 [JAVA] 4709: codegen with parcelableMode fails to build if using arrays in swagger. (#7867) 2018-03-21 00:10:24 +08:00
swavans
f943332d62 Updated version number (#7880)
updated version number of swagger codegen to current stable
2018-03-20 23:59:15 +08:00
William Cheng
8e34f9a98b
update to newer version of ruby (#7879) 2018-03-20 23:58:47 +08:00
Sergey Petrachkov
9443179d10 Update README.md (#7877)
add actonica to the list of users
2018-03-20 23:58:31 +08:00
garte
f9b2839a30 Check date value before calling to_iso8601 (#7769)
* Check date value before calling to_iso8601

When deserializing a date value the value has to be a string when
calling to_iso8601. Otherwise it fails with a match error due to a
is_binary() guard.

* Fix: to_iso returns tuple with three values.
2018-03-19 15:15:38 +08:00