Commit Graph

11983 Commits

Author SHA1 Message Date
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
William Cheng
2101780a09
test kotlin in shippable (#2465) 2019-03-22 07:58: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
William Cheng
fef2970dab commnet out kotlin client jdk7 test 2019-03-20 23:47:44 +08:00
William Cheng
522ccee7f3 remove publishPlugins 2019-03-20 22:40:53 +08:00
William Cheng
d32564da51 comment out kotlin tests 2019-03-20 22:34:49 +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
William Cheng
c10463600a
detect tab for all files under module (#2456) 2019-03-20 15:14:18 +08:00
William Cheng
59cdea7b5e
Add a link to "An adventure in OpenAPI V3 code generation" (#2457) 2019-03-20 15:14:01 +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
William Cheng
546a230c73 comment out gradle plugin publish 2019-03-20 11:44:04 +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
William Cheng
43fcd19509 add semi colon to gradle tasks 2019-03-19 22:35:48 +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
William Cheng
ed30e85d1e
Remove security tests from the master branch (#2433)
* remove security tests as these will be test in branch instead

* remove openapi3 security script
2019-03-18 17:21:47 +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
kemokemo
a57504481b chore: add removing old files function to the Windows batch files. (#2422) 2019-03-17 21:27:51 +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
kemokemo
243ec9aa8e [Go] Add a process to delete old files for the sample update scripts (#2410)
* chore: add removing old files function to the scripts.

chore: add removing old files function to the scripts.

* docs: update by ./bin/go-gin-petstore-server.sh

* docs: update by ./bin/go-petstore-server.sh

* docs: update by ./bin/go-petstore-withxml.sh

* docs: update by ./bin/openapi3/go-petstore-server.sh

* docs: update by ./bin/security/go-petstore.sh
2019-03-15 22:14:20 +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
Jon Schoning
33786e11f3
[haskell-http-client] add support for import-mappings (#2381)
import mappings take the form of:
```
--import-mappings %DATATYPE%=%MODULE%
```

full example (with --type-mappings):
```
--type-mappings intstr.IntOrString=IntOrString
--import-mappings IntOrString=Kubernetes.CustomTypes
```

The import-mapped module will be an exposed module of the generated library.

The import mappings will be re-exported from ImportMappings, which itself is re-xported from Models.

Model.hs
```
module Kubernetes.Model (module Kubernetes.Model, module Kubernetes.ImportMappings) where
import Kubernetes.ImportMappings
```
ImportMappings.hs:
```
module Kubernetes.ImportMappings (module ImportMappings) where
import Kubernetes.CustomTypes as ImportMappings (IntOrString(..))
```
2019-03-13 18:30:03 -05:00