Commit Graph

7199 Commits

Author SHA1 Message Date
William Cheng
3b017c59f1
Add better example code for R object (#2492)
* add better example for r object

* better code format
2019-03-24 23:21:31 +08:00
William Cheng
e0caa6fd66
better code format for kotlin, python (#2491) 2019-03-24 21:45:33 +08:00
Thibault Duperron
0935f5345d Kotlin model name camelize (#2430)
* Kotlin model name camelize

* Update samples
2019-03-24 10:47:05 +08:00
Tom Ghyselinck
f7943257c5 Python flask pythonic params (#2374)
* Using connexion `pythonic_params` support while keeping OpenAPI spec file correct with reference to the original spec file.

* - Add `camelCase` query parameter which shows the incorrectnes of the conversion of the OpenAPI spec file in Python server implementation(s).

* Also use `pythonic_params=True` for the `python-aiohttp` implementation.

* - Updated Python related samples.

* The unit tests must provide the correct query parameters.

* - Updated Python related samples.
2019-03-24 10:36:26 +08:00
Akira Tanimura
033ab8a6f5 [Ruby] Use Integer instead of Fixnum in Ruby client (#2475) (#2481)
* use Integer instead of Fixnum in Ruby client (#2475)

* update samples (#2475)
2019-03-23 18:48:10 +08:00
davidwcarlson
1adc962f2b java-jersey2 - Always render setBearerToken regardless of whether OAuth2 is in use. (#2479) 2019-03-23 18:38:00 +08:00
vtitov
4a7dfecf24 Bugfix/maven classpath schema (#2409)
* multi-module example for maven plugin master

* read byte source from classpath like swagger-parser does

* renamed schema to openapi.yaml for multi-module examples

* renamed schema to openapi.yaml for multi-module examples
2019-03-23 18:34:04 +08:00
Jan Buchar
db1b63780d Add return type declaration to typescript-fetch runtime (#2466)
* Add return type declaration to typescript-fetch runtime

closes #2461

* Regenerate samples
2019-03-22 14:42:31 +08:00
Vincent Devos
e3716262e5 [Kotlin client]fix warning when else all covered (#2470) 2019-03-22 14:40:14 +08:00
Gaurav Yadav
ee75366051 Added proxy headers option for urllib3 (#2467)
* adding headers option to pass in rest client

* running ensure uptodate
2019-03-22 11:22:10 +08:00
Hector Jusforgues
d839af5b1e [typescript-axios] Fix JSON serialization of falsy request bodies (#2446)
* [typescript-axios] Fix JSON serialization of falsy request bodies

Fix #2445

* [typescript-axios] update petstore samples
2019-03-22 10:57:53 +08:00
William Cheng
2e777c04d4
Better handling of operationId with slashes (#2469)
* better handling of operation id with slashes

* update smaples
2019-03-22 10:41:53 +08:00
Justin Black
b1955f3517 Adds exceptions module to python clients (#2393)
* Adds python client exceptions module and updates samples

* Adds python style updates, detects integers in exception paths with six

* Updates to ruby samples which circleci needs

* Removes petstore-security-tests samples

* readme char removal (triggers ci tests)

* Readme fix, triggers CI tests

* Updates python client sample
2019-03-22 10:40:32 +08:00
Gaurav Yadav
45ad72b032 Adding retries option to override default value 3 of urllib3 (#2460)
* adding retries option to override default value 3 of urllib3

* running petstore for python

* adding files for samples in petstore run

* running ensure-up-to-date
2019-03-22 08:24:23 +08:00
Kevin Smith
1a19edb0e5 Add build script and remove babel (#2439)
* Add build script and remove babel

This change adds a build script which uses babel to transpile generated es6 source to es5, such that it can then be used in node projects or published as a package to npm. The `babel` package is also removed as it is deprecated, and superseded by `babel-cli`.

See https://github.com/OpenAPITools/openapi-generator/issues/2126#issuecomment-473926663

* update samples
2019-03-21 22:36:56 +08:00
Kevin Turner
2f8e4fe32b [TypeScript][Node] async promises and imports (#2452)
* async promises and imports

* Sample regen

* Correct licence info

* update samples
2019-03-21 22:27:38 +08:00
Akihito Nakano
77545df80d Add RuboCop to Gemfile (#2464)
* Add Rubocop

* Update samples

./bin/openapi3/ruby-client-petstore.sh
./bin/ruby-client-petstore.sh
2019-03-21 22:00:08 +08:00
john lilley
dc78405a68 1391 jel minimal overwrite option (#2451)
Option to overwrite only changed files
2019-03-21 00:17:10 +08:00
Michael Ramstein
49f3e9a355 [Elixir] Deserialize responses based on status code (#2355)
* Update Tesla dependency and replace Poison with Jason

* Use new Tesla method to set headers

* Fix jason dependency definition

* Use list for Headers instead of a map

* Rollback to Poison because Jason does not support 'as:' option to decode to arbitrary struct

* Use new return signature from Tesla 1.0 in decode function

* catch error when a struct is given as second parameter to RequestBuilder.decode

* Update modules/openapi-generator/src/main/resources/elixir/request_builder.ex.mustache

Co-Authored-By: yknx4 <yknx.4.b@gmail.com>

* Update modules/openapi-generator/src/main/resources/elixir/request_builder.ex.mustache

Co-Authored-By: yknx4 <yknx.4.b@gmail.com>

* Evaluate response based on status code

* Generate Petstore

* pin poison to ~> 3.0.0 since 4.0.0 does not work atm

* run ./bin/openapi3/elixir-petstore.sh
2019-03-20 21:35:50 +08:00
Vincent Devos
37c275b3fb [KOTLIN Client] Update to latest kotlin version (#2375)
* [KOTLIN Client] Update to latest kotlin version

gradle - okhttp3 - kotlintest version update
add some test case in sample

* [KOTLIN Client] Update to latest kotlin version

gradle - okhttp3 - kotlintest version update
add some test case in sample
2019-03-20 18:26:00 +08:00
Tom Ghyselinck
8bb01ed149 Unit tests should not be skipped when MediaType defines its underlying structure as json (*/*+json, according to [RFC6838, section 4.2.8](https://tools.ietf.org/html/rfc6838#section-4.2.8)). (#2390) 2019-03-20 18:18:45 +08:00
Vincent Devos
218c2e75ab [MAVEN PLUGIN] fix javadoc + sonarlint (#2399) 2019-03-20 16:16:59 +08:00
Justin Black
b67318ef21 Adds spec additionalProperties + nullable examples (#2405)
* Adds v2 spec additionalproperties examples, adds v3 spec nulllable model example, updates samples

* Remaining samples updates

* Adds csharp generator update to handle models with multilevel parent types, which works for the AdditionalPropertiesObject model, samples updated
2019-03-20 15:31:28 +08:00
Ramzi Maalej
3100afce26 second part of fixing Sonar issues (#2295)
* fix sonar issues

* fix csharp model issue

* refactor code
2019-03-20 15:12:00 +08:00
Keiju Matsumoto
8df619ef8a [Kotlin] Add optional parameters to the method of api (#2432)
* Add optional parameters to api

* Update petstore samples

* Remove default arguments
2019-03-20 11:04:47 +08:00
Ale Figueroa
bf7838cd81 [Elixir] Update Tesla dependency to version 1.0 (#2326)
* Update Tesla dependency and replace Poison with Jason

* Use new Tesla method to set headers

* Fix jason dependency definition

* Use list for Headers instead of a map

* Rollback to Poison because Jason does not support 'as:' option to decode to arbitrary struct

* Use new return signature from Tesla 1.0 in decode function

* catch error when a struct is given as second parameter to RequestBuilder.decode

* Update modules/openapi-generator/src/main/resources/elixir/request_builder.ex.mustache

Co-Authored-By: yknx4 <yknx.4.b@gmail.com>

* Update modules/openapi-generator/src/main/resources/elixir/request_builder.ex.mustache

Co-Authored-By: yknx4 <yknx.4.b@gmail.com>
2019-03-20 10:28:19 +08:00
Jacob Weber
3320d3cbe1 Handle collection params in path (assume csv for now). (#2259) 2019-03-19 22:59:16 +08:00
Hemant Zope
7ad479e13d [C] Update README and adding object.c/h files (#2377)
* modify handing reserved keyword and set isEnum in local codegen to avoid conflict with other codegen

* update README mustache

* added object header and body mustache
2019-03-19 22:41:34 +08:00
Jim Schubert
93baa5d835 Initial attempt at deploying to gradle plugin portal (#2440) 2019-03-19 21:43:28 +08:00
Dale King
d93fd31bb1 [dart] Fix authentication for dart (#2419)
* [dart] Fix authentication so all forms of Swagger 2.0 authentication work

* Run changes on petstore examples

* Amend dart2 generated README to cover basic authentication

* Amend dart2 generated README to cover authentication methods

* [dart] Fix authentication so all forms of Swagger 2.0 authentication work

* Run changes on petstore examples
2019-03-19 10:08:43 +08:00
dragosnutu
1f45ea7d1a [#2425] - implemented yaml parsing for config file. (#2434) 2019-03-18 21:49:45 +08:00
William Cheng
0b15fac3e1
fix java doc issue (#2435) 2019-03-18 20:58:14 +08:00
Jens Oberender
82700e5958 Fix for the added interceptor and when the http client is set several times, which leads to a stack overflow because of too many interceptors. (#2420)
Also added tests for that.
2019-03-18 11:04:43 +08:00
Adrian Price
9bb94fe95d Fix #2340 (#2387)
Test case was using an invalid mixture of File.getAbsoluteFile|Path()
and File.getCanonicalFile|Path() to identify generated output files.
2019-03-18 11:02:59 +08:00
William Cheng
d18bf044e8
[Java][C#][JS] remove localVariablePrefix (#2423)
* remove localVariablePrefix from template

* remove local variable prefix option from java gen

* remove local var from c#, js

* update doc
2019-03-18 10:46:33 +08:00
Karl von Randow
28ddad44e5 TypeScript: add typeRoots to tsconfig (#2395)
* TypeScript: add typeRoots to tsconfig

This avoids typescript looking in parent directories to find type definitions. We don’t _need_ this behaviour from typescript, as this module is self-contained. If we don’t block this behaviour from typescript, and you put the generated source inside a project that already has a node_modules/@types directory, you can run into conflicts when some types require newer versions of TypeScript than is used by this module.

* Update petstore examples for all TypeScript variants
2019-03-17 21:22:33 +08:00
William Cheng
22d21afceb
Fix boolean example value in ruby client generator (#2431)
* fix boolean example value in ruby

* update samples
2019-03-17 18:06:02 +08:00
Vincent Devos
a6a1264f25 [GRADLE] upgrade to 2.16 in java/scala/androit client to fix Vulnerability (#2416) 2019-03-17 17:40:11 +08:00
Akira Tanimura
40253a5b82 [Ruby] Fix type mapping for Ruby (#2385) (#2386)
* maps 'boolean' to 'Boolean' in Ruby (#2385)

* update Ruby client samples (#2385)
2019-03-17 11:07:00 +08:00
William Cheng
94466d54b3 Remove global options from PHP generators (#2403)
* remove global options from php generators

* update doc
2019-03-17 09:57:45 +09:00
sunn
2ea4025d2b
Fix generation of optional file when model name prefix is selected (#2341) 2019-03-16 17:38:19 +01:00
sunn
f41f50c3e5
[C++] [Qt5 Server] server allow api handler override of generated code (#2308)
* Allow overriding the default API handler to use a derived class from generated code
* Allow overriding the default api handler
2019-03-16 17:36:50 +01:00
Jason Henriksen
e5a0d18374 PR for ability to easily debug newly created codegen classes. (#2388)
* 2nd attempt to make the automatic checkin testing work

* trying to submit the samples in hopes that the CI matches them and passes

* found some samples I hadn't updated.  Maybe this is it?
2019-03-16 12:53:45 +09:00
Bilal Amarni
07e8b5ae03 [go] support decoding plain string responses (#2414)
For the following spec:

``` yaml
      responses:
        "200":
          description: Pong.
          content:
            text/plain:
              schema:
                type: string
```

The generated client currently fails with `undefined response type`.

In this scenario, `v interface{}` is a string pointer which can be
populated regardless of the content-type.
2019-03-15 22:17:37 +08:00
Jon Schoning
c9737cf97d
[haskell-http-client] add cli option customTestInstanceModule (#2406)
setting `customTestInstanceModule` will import typeclasses from the
specified module into tests/Instances.hs, to provide typeclass
instances for types not known by the generator

this property set using `--additional-properties`

example:
```
--additional-properties=customTestInstanceModule=CustomInstances
```
2019-03-15 07:34:46 -05:00
William Cheng
5ba35ecd31
[R] url-encode path parameters (#2397)
* url encode path parameter

* convert number to string before encoding
2019-03-14 20:54:10 +08:00
Jimmi Dyson
065bbc7bdb [Go] Fix up json check regexp and support vendor-specific mime types (#2322)
* [Go] Fix up mimetype regexps

* [Go] Support vendor-specific JSON mime types

* [Go] Tidy up unmarshalling content type checks

* [Go] Generate sample clients
2019-03-14 16:40:00 +08:00
Vincent Devos
f2ff473155 [Kotlin Server Ktor] upgrade to stable version (1.1.3) (#2333)
* [Kotlin Server Ktor] upgrade to stable version (1.1.3)

* [Kotlin Server Ktor] upgrade to stable version (1.1.3)

fix indentation

* [Kotlin Server Ktor] upgrade to stable version (1.1.3)

fix indentation

* add missing kotlin ktor in Server stubs list

* [Kotlin Server Ktor] upgrade to stable version (1.1.3)

fix compilation warnings
2019-03-14 16:38:39 +08:00
William Cheng
3e085e9492
update java okhttp dependencies (#2368) 2019-03-14 16:35:08 +08:00
Tom Ghyselinck
83bc863b2b Python apikey cookie (#2367)
* The `ApiClient` will now have support to store and use HTTP Cookies (as APIKey auth).

* Use Cookie authentication for user management.

* - Updated Python related samples.
2019-03-14 16:33:35 +08:00