5702 Commits

Author SHA1 Message Date
Jean-François Côté
fdee2c19da Simple update of the sample folders with code as is 2019-07-09 07:49:53 -04:00
Jérémie Bresson
3943d1cc9d [java] fix javadoc configuration (#3302)
* [java] fix javadoc configuration

* [java-pkmst-microservice] fix generated javadoc
2019-07-08 21:25:47 +08:00
William Cheng
3f9e374c8d
update js flow dep to fix security issue (#3296) 2019-07-08 17:00:38 +08:00
Justin Black
109808e60d [Python] Adds new client generator, python-experimental (#3244)
* Adds python-experimental generator

* Adds python-experimental samples folder which uses its own v2 spec

* Adds enusre-up-to-date updates

* Removes samples/client/petstore/perl/t/AnotherFakeApiTest.t

* Removes comment line from python-experimental generator

* Reverts perl docs file

* Updates perl sample client

* Adds python-experimental to pom.xml

* Copies the python test foldeers tests and testfiles into python-experimental

* Copies python test folder into python-experimental

* Moves python testing from Travis (samples pom.xml profile) to Circlci (samples.circleci pom.xml profile)

* Adds python-experimental pom.xml

* Adds python-experimental makefile and .sh files

* Chenges python-experimental to use gitignored venv rather than .venv which is not ignored when testing

* Adds dev-requiremnts.txt and removes .travis.yml from python-experimental so CI tests will pass

* Moves python-experimental from CicleCI to Travis to get support for multiple python environments

* Updates generator java comment so CI tests will run over again
2019-07-06 22:43:29 +08:00
Nathan Broadbent
78551d0180 Set error_reporting(E_ALL) in phpunit.xml settings, to crash on undefined variables (#3266)
* Set error_reporting(E_ALL) in phpunit.xml settings, so that undefined variables will always cause a test failure

* Update petstore sample for php-laravel
2019-07-06 22:21:41 +08:00
William Cheng
e9809294a5
update travis, support java9+ (#3279) 2019-07-05 23:32:10 +08:00
Balázs Zsoldos
bd17a15572 Avoid nullsafe errors in typescript-rxjs runtime.ts (#3255)
* #3253 Avoid nullsafe errors in typescript-rxjs runtime.ts

* #3253 Updating samples
2019-07-05 18:42:30 +08:00
William Cheng
0b79c5b6be
Add new Go client (experimental) generator (#3268)
* add new go experimental generator

* extends go client codegen

* add go samples and test

* comment out haskell client test
2019-07-04 22:56:49 +08:00
Josh Burton
310f5feda0 [dart-jaguar] Makes converters publicly accessible so they can be used serialization/deserlization outside of the API client (#3245) 2019-07-04 15:13:23 +08:00
Ramanth Addala
0cb921251d feat(r): Added handling exception with ApiException class and better documentation (#3217)
* feat(r): Added handling exception with ApiException class and document generation

* feat(r):enhancements to exception handling and documentation

* fix(r): fixes and reverting the man folder

* fix(r): minor fix of import statement

* fix(r): generated the docs file

* fix(r) minor doc casing fixes
2019-07-03 22:05:21 +08:00
Marc Etter
95ba9525f9 [elm][haskell-servant] Fix issue 3256 (#3262)
* [elm] fix empty operation exception (#3256)

* [haskell-servant] fix empty operation type (#3256)

* [elm][haskell-servant] update samples
2019-07-03 18:07:21 +08:00
William Cheng
35262aa7d1
move openapi 3 samples to the correct folder (#3267) 2019-07-03 13:18:52 +08:00
Jérémie Bresson
40a293dcda Update to swagger-parser to 2.0.13-OpenAPITools.org-2 (#3239)
* Update to swagger-parser to 2.0.13-SNAPSHOT

* Update samples

* Update swagger-parser to 2.0.13-OpenAPITools.org-2
2019-07-02 16:37:41 +08:00
Michael Petö
1730a4efce Fix typo in javascript generator template (#3249)
* Fix typo in javascript generator template

* Update sample client
2019-06-30 12:07:49 +08:00
Mateusz Szychowski (Muttley)
731b162942 [C++][Pistache] Fix warnings (#3238)
* [C++][Pistache] Fix warnings

Remove unecessary semicolon (Wpedantic)
Remove unused parameter name (Wunused-parameter)

* [C++][Pistache] Update Petstore sample
2019-06-28 19:21:01 +02:00
Thiago Arrais
e46bd7dd18 [go] Serialize multipart array of complex objects as JSON (#2965)
* Serialize multipart array of complex objects as JSON

* Update sample client

* Update sample client
2019-06-28 23:14:13 +08:00
wing328
51014839fd add new perl file 2019-06-28 18:00:48 +08:00
Sai Giridhar P
6578cef260 [python] : Make example code snippet compilable (#3148)
* feat(python): Making example compilable

* feat(python): Updating pet project

* feat(python): Updating comments

* feat(documentation): Fixing comments style

* feat(documentation): Updating documentation

* feat(documentation): Fixing comments style
2019-06-28 17:53:25 +08:00
wing328
a41448ab9c update perl petstore samples 2019-06-28 16:34:17 +08:00
Roman Müller
73966a0152 [KOTLIN Spring] add interfaceOnly option (#3050)
* move template definition to processOpts()

* add interfaceOnly option for kotlin-spring

* add template for interface only option
2019-06-27 12:23:50 -04:00
wing328
35a6f9d6e6 remove corrupted files 2019-06-27 12:12:44 +08:00
Mateusz Szychowski (Muttley)
68a5fa4c8b [C++][Pistache] Catch exception instead of runtime_error (#3225)
* [C++][Pistache] Replace runtime_error with std::exception

* [C++][Pistache] Update Petstore sample

* [C++][Pistache] Fix catch-value warning
2019-06-26 19:13:54 +02:00
Tomasz Prus
5b9283beca feat: configurable limit of simultaneous connections (python/asyncio) (#3200)
* feat: configurable limit of simultaneous connections (python/asyncio)

* fix: remove unused import (python/asyncio)
2019-06-25 14:13:43 +08:00
Ramanth
f681764067 [R] feat(r): Inclusion of useragent, timeout and serialization (#3084)
* feat(r): Inclusion of useragent timeout and serialization

* fix(r): fixing name of timeout parameter

* fix(r): fixing unit tests

* fix(r): fixing minor issues

* fix(r): updated r petstore batch command

* fix(r): minor unit test fix

* fix(r): refactor of useragent passing and other minor
2019-06-25 14:12:13 +08:00
Bernd
9518e2a02e [typescript-rxjs] refactor to arrow functions and short hand object creation (#3077)
* feat(typescript-rxjs): change BaseAPI to arrow functions, use shorthands where possible

* feat(typescript-rxjs): replace null checking with throwIfRequired helper function in api controllers

* feat(typescript-rxjs): use shorthand syntax for object creation of query and header params

* feat(typescript-rxjs): provide fallback for previously exported RequiredError and querystring

* refactor(typescript-rxjs): change order of query and headers definition

* feat(typescript-rxjs): regenerate samples

* fix(typescript-rxjs): missing closing curly

* fix(typescript-rxjs): add condition to prevent undefined parameters in header or query params
2019-06-25 12:04:40 +08:00
Johan Brandhorst
2b55413371 [Go][Client] Use configured Scheme and Host in requests (#3115)
* [Go][Client] Ensure test errors don't crash

Previously we did not interrupt execution of a test case
when an error was returned from an API call. This was
causing the tests to crash as soon as we try to
dereference the response.

We now fail the tests as soon as the first API error
is received.

* [Go][Client] Use configured Scheme and Host in requests

Previously we were simply setting the Host header and
completely ignoring the configured scheme.
2019-06-25 12:02:20 +08:00
William Cheng
74c569ebf8
Make sure Perl client samples are up-to-date (#3207)
* Make sure Perl samples are up-to-date

* update perl samples
2019-06-25 10:34:44 +08:00
Mathieu Debove
06cfdbbdc6 Add missing javax dependencies for Java > 8 (#3188)
* Add missing javax dependencies for Java > 8

* update spring petstore samples
2019-06-24 21:42:49 +08:00
wing328
55ae485fd0 update kotlin samples 2019-06-24 21:01:36 +08:00
Thibault Duperron
a882e4b3a5 Add Flow import to kotlin spring reactive (#3107)
* Add Flow import to kotlin spring reactive

* Add runBlockingTest to api tests

* Add kotlin-springboot-petstore-server-reactive.sh to ensure-up-to-date

* add reactive check for  runBlockingTest

* Samples
2019-06-24 14:26:30 +08:00
Thibault Duperron
1d8c9dcc0b Ktor Fix KtorExperimentalAPI import (#3108)
* Ktor Fix KtorExperimentalAPI import

Fix #2967

* Samples
2019-06-24 14:23:22 +08:00
Sai Giridhar P
2773b32c36 [csharp] Adding http response details on api_docs and making example snippet compilable (#3129)
* feat(csharp): Adding http response details

* feat(csharp): Updating pet project

* feat(csharp): Updating pet project

* feat(csharp): Updating pet project

* feat(csharp): Updating pet project

* feat(csharp): Updating pet project
2019-06-24 11:35:52 +08:00
Sai Giridhar P
a038fcc9c8 [java][jesery2]: "InjectionManagerFactory not found" issue (#3153)
* feat(java-jersey2): Fixing InjectionManagerFactory issue

* feat(java-jersey2): Update pet project
2019-06-24 11:33:57 +08:00
MBcom
1540ae7951 added api key authentication to aspnetcore 2.1 (#3089)
updated samples
2019-06-21 21:54:08 +08:00
Sai Giridhar P
2a5af92cdf [csharp-netcore]: Adding http response details in api_docs and making example snippet compilable (#3128)
* feat(csharp-documentation): Improving documentation and example

* feat(csharp-documentation): Updating pet project

* feat(csharp-documentation): Minor updates

* feat(csharp-documentation): Updating pet project

* feat(csharp): Updating pet project

* feat(csharp-netcore): Updating pet project
2019-06-21 21:09:13 +08:00
Min Kim
0e2eed6892 Perl: Basic bearer auth support (#3192)
* bearer token support

* [generator] running scripts
2019-06-21 18:32:11 +08:00
Ramanth
46c18ad4dd [R] feat(r) : Alternate PR for serialization fixes along with WithHttpInfo method enhancement (#3099)
* feat(r): fixing serialization and deserialization issues

* feat(r): pet store file generated with serialization fixes

* fix(r): updated the query params with keyname in get request

* fix(r):fix issue with package name and other minor

* fix(r): fixing unit tests

* feat(r): adding api calls WithHttpInfo method

* fix(r): reverting unit test changes

* feat(r): saving changes for reference

* Revert "feat(r): saving changes for reference"

This reverts commit 0d091b5c20f8f7f83e8b3318c1f7ddf5c0a4cced.

* feat(r): minor refactor of method position

* fix(r): fixing bug in withhttpinfo method args passing

* fix(r): generated petstore with fix
2019-06-21 16:38:32 +08:00
William Cheng
8e11fd9fe4
Prepare 4.0.3-SNAPSHOT (#3185)
* update version to 4.0.3-SNAPSHOT

* update readme

* update gradle, maven plugin

* update release schedule

* update samples
2019-06-20 18:50:49 +08:00
William Cheng
fae9d4a37b
4.0.2 release (#3181)
* remove snapshot version

* update stable version

* remove build.gradle sample from relesae script
2019-06-20 12:39:15 +08:00
Rhuan
93edd7650b Fix rubocop obsolescence (#3175)
* Update obsolete rubocop configuration

* Update obsolete rubocop config

* Update obsolete rubocop config
2019-06-20 01:50:29 +09:00
Michael Edwards
242d296082 Idiomatic Rust returns for Error conversions (#2812)
* Idiomatic Rust returns for Error conversions

* Regenerate Rust samples
2019-06-14 09:26:36 +01:00
sunn
a864ae90de
Add API timeout handling (#3078) 2019-06-12 20:16:12 +02:00
Akihito Nakano
2a5a272300 Bump up babel-cli version to fix security alert (#3121)
* Bump up babel version

* Update samples

bin/javascript-flowtyped-petstore.sh

* The dependency `babel-preset-react-app` requires `NODE_ENV` or `BABEL_ENV`

* Run `env BABEL_ENV=development npm run build` to update the samples
2019-06-08 22:12:13 +08:00
sunn
6c98046ee6
[C++] [cpprestsdk] Add examples and test for cpprestsdk (#3109)
Add examples and test for cpprestsdk
2019-06-07 23:37:49 +02:00
Gabriel Féron
3df525ee33 Add enum support to rust and skip none option serialization in clients (#2244)
* Add support for enum schemas and properties to the rust generator

Also:
* Skip serializing a field with serde if it's optional and empty
* Fix borrow checker error when using &std::path::Path (should be std::path::PathBuf)
* Add script to generate sample with rust-reqwest
* Regenerate petstore sample for both rust targets
* Remove go code from README.md

* Fix formatting of serde skip_serializing_if attribute
2019-06-07 17:28:43 +01:00
sunn
6660b74247
Add Q_DECLARE_METATYPE to the generated models and remove ref in signals (#3091) 2019-06-06 16:13:11 +02:00
William Cheng
19f47d0caa
[Java][okhttp-gson] Update dependencies (#3103)
* update java client depedency to the latest version

* update java samples
2019-06-06 13:32:58 +08:00
William Cheng
86e53d6f0b
fix NPE in go generator (#3104) 2019-06-06 01:57:16 +08:00
Adi Gerber
6379022c42 scala-play-server: fix API doc url (#3096) 2019-06-06 01:50:39 +08:00
Chris Couzens
4e9d226443 Ruby: Avoid double escaping path items (#3093)
`URI.encode` is obsolete. `CGI.escape`, `URI.encode_www_form` or
`URI.encode_www_form_component` are recommended instead.
https://ruby-doc.org/stdlib-2.6/libdoc/uri/rdoc/URI/Escape.html#method-i-escape

URI.encode has different behaviour to CGI.escape:

```ruby
URI.encode('hello/world?test%string')
=> "hello/world?test%25string"
CGI.escape('hello/world?test%string')
=> "hello%2Fworld%3Ftest%25string"
```

I recently raised pull request #3039
201cbdce29cc6cdbbbe9efcb1afb250a05bc2ffd

That pull request escapes path items at insertion.

Before either pull request, the path item 'hello?world' would go into
the URL as 'hello?world'. That behaviour was insecure as if an attacker
could control the path item value, they could change the URL the
application connected to.

After #3039 'hello?world' would go in as 'hello%253Fworld'. This was
safer than before, but it's still not correct.
If I'd realised at the time, I would have made it correct at the time.

What this pull request does is make it go in as 'hello%35world', which
is correct.

ApiClient::build_request_url was URI.encoding the whole path.
This wasn't protecting against all undesirable characters in the path
items, but was escaping % characters a 2nd time which was unhelpful.

I have additionally removed URI.encode from Configuration::base_url as I
can't see any benefit it could be bringing.
There is no justification for it in the commit where it was originally
added: 47c8597d36a9bc0983ba5c40e2489bb094f9f076
2019-06-05 19:54:23 +09:00