Commit Graph

4097 Commits

Author SHA1 Message Date
William Cheng
ddb0920fed
Fix C# client enum issue (#774)
* fix csharp enum issue

* fix numeric enum value

* add docstring to exlain isDataTypeString

* fix docstring by adding return

* fix ToJson in hash model

* remove BaseValidate for map model

* restore csproj file
2018-08-11 11:34:20 +08:00
Akihito Nakano
21777f2759 [JavaScript] Update vulnerable dependencies (#784)
* Update vulnerable dependencies

* Update samples: javascript-es6

* Update samples: javascript-promise

* Update samples: javascript-promise-es6

* Update samples: javascript

* Update samples: petstore-security-test/javascript

* Rename operationId if it starts with a number

* Update samples

bin/javascript-petstore.sh
bin/javascript-es6-petstore.sh
bin/javascript-promise-petstore.sh
bin/javascript-promise-es6-petstore.sh
2018-08-10 21:50:33 +08:00
Yusuke Iinuma
afdef8f890 [Ruby] Fix method split (#780)
* Fix methods split for readable

* Recreate sample
2018-08-10 17:25:22 +08:00
William Cheng
748d1d70cb
update groupId in pom (#779) 2018-08-10 15:48:19 +08:00
Daniel Miller
987fd77042 [cpp-restsdk] Support multi-line descriptions (#753)
* Update IndentedLambda to take optional prefix

* Add `multiline_comment_4` to CppRestSdkClient

* Update cpp-restsdk example
2018-08-09 19:01:15 -04:00
William Cheng
90a8b81728
Prepare 3.2.1-SNAPSHOT release (#748)
* prepare 3.2.1 SNAPSHOT release

* update doc to use 3.2.0 stable version
2018-08-07 01:31:37 +08:00
Alexey Alekhin
05db32fea2 [Elm] Template improvements (#661)
* Add elm template parameter to the samples testing script

* Update elm-date-extra package; fixes #458

* Update generated elm samples

* Use Elm doc comments; remove some unneccessary newlines

* Update generated Elm samples

* Remove unnecessary parenthesis around non-optional container type
2018-08-06 18:17:59 +08:00
William Cheng
c116c8fb9b
[PHP] Decommission "packagePath", add new option "packageName" (#681)
* remove packagePath from php file location, use -o instead

* fix php symfony top folder

* restore pacakgePath

* update php laraavel samples

* remove packagePath from PHP generator

* add new silex files

* update window batch - php silex

* fix openapi3 silex script
2018-08-06 18:10:34 +08:00
Jon Schoning
f6c21057e1
[haskell-http-client] regen samples (#709)
* [haskell-http-client] regen samples

* ensure the haskell-http-client samples are always up-to-date
2018-08-05 15:11:52 -05:00
William Cheng
f6146b212f
[PHP] better operationId handling, add CI for PHP slim server (#723)
* better operationId handling, add CI for PHP slim

* use spaces instead of tabs

* replace tab with space

* install php
2018-08-03 10:47:54 +08:00
David van Laatum
a258cf3fc6 #714 prevent throwing another exception if the request fails eg connection reset (#715)
* prevent throwing another exception if the request fails eg connection reset

* prevent throwing another exception if the request fails eg connection reset
2018-08-03 00:02:09 +08:00
William Cheng
f0425d77ef
[Ruby] Better handling of operationID starting with a number (#719)
* better handling of operationId starting with numbers in Ruby

* update Rubocop to use Layout
2018-08-02 22:00:50 +08:00
William Cheng
40024ac72a
[Go] Prefix enum number with _ (#703)
* prefix enum number with _ in go

* reformat code, use else if
2018-08-02 10:13:01 +08:00
William Cheng
ab08dd1d26
Better handling of operationID starting with numbers (#691)
* add numeric operationid to test spec

* better handling of operationId in more generators

* fix go toOperationId

* update samples

* update java samples

* update java samples (vertx, webclient)

* update java google api client sample

* fix typo, update OAS3 test spec, update php petstore (oas3)

* defer camelize in operationid

* remove duplicated sanitizeName
2018-08-01 22:31:58 +08:00
William Cheng
21141f682f
Fix Javadoc string error in Java (rest-assured) client (#702)
* fix docstring

* trigger build failure

* Revert "trigger build failure"

This reverts commit 12cd26f0ca981db37d177a55001dac8b6afcd0bf.

* update java samples
2018-08-01 22:13:41 +08:00
Victor Orlovsky
82156b6639 Added constant "httpMethod", "summary" (#697) 2018-08-01 12:02:11 +08:00
René Winkelmeyer
d1fc923b66 Re-implementation of Apex client code gen (#698) 2018-07-31 23:02:25 +08:00
William Cheng
d8ec6b2003
[Apex] migrating to OpenAPI Generator project (#692)
* [apex] migrating to OpenAPITools

* migrate apex to openapi-generator
2018-07-31 15:28:54 +08:00
William Cheng
036fa6918c
fix operation id starting with number for python client (#682) 2018-07-30 15:42:06 +08:00
sunn
b587052de4 cpp-tizen extends AbstractCppCodegen (#676)
* cpp-tizen extends AbstractCppCodegen

* Update javadoc comment
2018-07-30 15:33:00 +08:00
Rubén Martínez
68d80ab67d [Java][Client][RestTemplate] Fixed invalid URL-encoding of query parameters (#646)
Fix for the #644
2018-07-30 08:38:10 +02:00
Jérémie Bresson
a8e8acead7
[java] add useNullForUnknownEnumValue option (#633) 2018-07-26 11:00:45 +02:00
Jeremie Bresson
70cdd27e75 Merge remote-tracking branch 'origin/master' into 3.2.x 2018-07-25 16:51:19 +02:00
William Cheng
86d7009f4c
replace tab with spaces, fix empty spaces in new lines (#632) 2018-07-24 17:30:54 +08:00
Daniel Miller
530065137d [cpp-restsdk] Generate mockable APIs (#595)
* Port GMock feature from NativeInstruments

swagger-codegen fork:
https://github.com/NativeInstruments/swagger-codegen/pull/9

* Update petstore for Mockable APIs

* Fix shared_ptr in templates for File params

* Add guards in templates for GMock APIs

* Regenerate samples without GMocks

* Add useful constructors for GMock APIs

* Add constructors to API header interface

* Update samples with explicit monadic constructors

* Add default implementations for destructors
2018-07-24 15:31:21 +08:00
Euan Kemp
2e6bec7345 [Rust] Split out request logic, implement form parameters (#528)
* [Rust] Move request logic into standalone file

This reduces the number of variables which are used in the generated
operations, thus fixing #512.

This also fixed a TODO related to URI parsing errors.
Other than that, it is meant to be functionally identical.

* [Rust] Add support for non-file form params

Up until now, they just weren't there at all

* [Rust] Use more rustic terms in example
2018-07-23 23:10:53 +08:00
William Cheng
667e3130fe Merge remote-tracking branch 'origin/master' into 3.2.x 2018-07-23 23:04:28 +08:00
Rubén Martínez
0da55081c9 [Java][Client][RestTemplate] Do not create new Object for empty body (#605)
#513 Fixed error that causes exception when trying to perform HTTP requests without a body and an empty Object is used as body instead. In these cases an exception is thrown indicating that it is not possible to find a message converter for java.lang.Object and application/json.
2018-07-20 17:49:12 +02:00
Tomasz Prus
8867d2b34c Support for python 3.7 by renaming async to async_req (#519)
* feat: support for python 3.7

* fix: regenerate other sample clients
2018-07-20 22:14:18 +08:00
William Cheng
888da52181 Merge remote-tracking branch 'origin/master' into 3.2.x 2018-07-19 18:46:18 +08:00
Georg Rollinger
f7617bc628 [typescript][jQuery] Fix promise resolution (#581)
* typescript-jquery: fix promise resolution

The type annotation that is generated for an API states that the
JQueryPromise<...> will be resolved with a single value.
The implementation, on the other hand resolves with two.

This changes the implementation to resolve the promise in accordance
with the type annotation.
It also adds another type specifying what will be passed if the promise
is rejected.

* Update petstore sample for typescript-jquery
2018-07-19 18:04:43 +08:00
William Cheng
e02e875978
Update gradle dependency for Java RESTEasy API client (#597)
* update resteasy gradle dependency

* remove java8 option when testing resteasy (java)
2018-07-19 17:57:21 +08:00
Marvin
52cd17ecc7 [Java][RESTEasy] Fixed setting of custom headers (#599)
Fixed header generation. Previously the key was used as value parameter.
2018-07-19 11:55:01 +02:00
Niklas Werner
80cf1324c5 C Generator Sample - Improvements (#558)
* Added a .gitignore to ignore the build folder

* Added a CMakeLists and a basic implementation of a double linked list

* Added the pet model

* changed the behaviour when a list gets freed - the data of each element doesn't get freed anymore

* Added the tool uncrustify in order to make code look better

* Uncrustified code

* added an implementation(constructor and deconstructor) for the category model

* Added a third party JSON library

* The pet struct now uses pointers for its members; the pet struct now has a proper constructor and a basic toJSON method

* The pet model now gets fully serialized into JSON

* Fixed the example url...

* Added third party library libcurl

* Modified category struct and added an unit test

* Added a foreach macro and added two functions

* Added a tag model and an unit test

* the pet struct now uses no double pointer for it's name anymore and no pointer for the enum status anymore; the pet struct can now be fully converted to json and parsed from json

* Added the struct APIClient and an unit test

* Uncrustified the unit test for category

* Added ifdef in pet.h to prevent errors

* Added one API endpoint to get a pet by id

* Added a "== 0" comparison that I forgot

* Added some kind of debug functionality to test-petApi.c

* Removed the DEBUG define

* Moved the c petstore example from samples/client/c to samples/client/petstore/c

* Renamed function getPetById to petApi_getPetById to avoid name collisions

* Removed unecessary method in list.c

* Added POST functionality; added petApi_addPet method and improved unit-test for petApi; cleaned up some code in apiClient

* removed two methods in list.c(string/tag to JSON) and moved their code directly in the pet_convertToJSON method

* Removed old, already commented out, puts artifact in apiClient.c

* Added a convertToJSON method to the category model

* Added a convertToJSON method to the tag model

* changed how the convertToJSON method works in the pet model

* Adjusted the unit-tests on how the convertToJSON method now works(now returns a cJSON* instead of a char*)

* apiClient_t now needs to be given to API methods as a parameter. This means apiClient_t can now be reused in multiple methods.

* Added an untested concept for how authentication could be handled

* Tested basicAuth using wireshark and added untested OAuth2 feature

* Added support for api key authentication using the http-header and tested functionality using wireshark

* Renamed the dataToPost parameter in apiClient_invoke to bodyParameters

* Renamed apiKey_t to keyValuePair_t and implemented GET queries

* Spaces are now being replaced with + in querryParameters

* Renamed assembleHeader to assembleAPIKeyAuthentication and added support to change the request type

* Implemented the option to provide custom httpHeader fields to apiClient_invoke

* Added support for form parameters to the apiClient_invoke method

* update petstore sample
2018-07-19 12:22:38 +08:00
John Wang
0f0d8a01cb [Golang][client] Add option for standard Go generated code comment (#555)
* update go generated code comment

* update samples for go petstore

* update code generation comment

* update samples for go petstore

* Trigger CI due to previous Shippable race condition

* add -DwithGoCodegenComment=true option

* reset samples

* add withGoCodegenComment=true to bin/go-petstore-withxml.sh

* update samples/.../go-petstore-withXml using -DwithGoCodegenComment=true
2018-07-19 12:21:51 +08:00
delenius
995edc0b75 Fix version incompatibility in resteasy client (#594) 2018-07-19 10:50:59 +08:00
Jean-François Côté
5344a02bbc
Multiple enhancements to typescript fetch generator (#145) 2018-07-18 13:38:47 -04:00
Jeremie Bresson
45ed374b62 Merge remote-tracking branch 'origin/master' into 3.2.x 2018-07-18 12:19:41 +02:00
Jérémie Bresson
1e596496a5
Prepare 3.1.2-SNAPSHOT (#589) 2018-07-18 11:44:23 +02:00
Daonomic
0a52f56ba4 Support for discriminator.mapping (#536) 2018-07-18 06:14:42 +02:00
Matthieu Berthomé
84ef98f067 [Python][Client] pure library client package (#470)
* Python client pure library package

* check onlyPackage CLI option

* run /bin/python-petstore.sh, update the python samples for CI

* onlyPackage local variable instead of classp property

* fix CI: __future__ absolute_import must be first in file

* update samples

* generateSourceCodeOnly

* updated samples
2018-07-16 15:49:08 +08:00
William Cheng
d863c3e5f4
Add travis.yml to test java6 option (#568)
Add travis.yml to test java6 option, update Java (Jersey2) dependencies
2018-07-15 16:00:07 +08:00
Jérémie Bresson
5a0a8f6a87 Java6 support: fix pom and gradle files, avoid diamond notation (#560) 2018-07-14 21:13:23 +08:00
William Cheng
df815344d1
fix NPE in body parameter due to incorrect parameter/consume (#563) 2018-07-14 20:19:10 +08:00
William Cheng
478d6ced4e Merge remote-tracking branch 'origin/master' into 3.2.x 2018-07-14 01:35:54 +08:00
Akihito Nakano
26e70fe642 [Ruby] Rename files/folders (#534)
* Rename templateDir: rails5 -> ruby-on-rails-server

* Rename script: rails5-petstore-server.sh -> ruby-on-rails-server-petstore.sh

* Rename sample folder: rails5 -> ruby-on-rails

* Rename script(openapi3): rails5-petstore-server.sh -> ruby-on-rails-server-petstore.sh

* Update ruby-on-rails-server-petstore.sh

* Rename templateDir: sinatra -> ruby-sinatra-server

* Rename script: sinatra-petstore-server.sh -> ruby-sinatra-server-petstore.sh

* Rename sample folder: sinatra -> ruby-sinatra

* Update script

* Rename templateDir: ruby -> ruby-client

* Rename script: ruby-petstore.sh -> ruby-client-petstore.sh

* Update scripts

* Update samples

- bin/ruby-sinatra-server-petstore.sh
- bin/ruby-on-rails-server-petstore.sh
- bin/ruby-client-petstore.sh
- bin/security/ruby-client-petstore.sh
2018-07-13 22:28:17 +08:00
Jeremie Bresson
0cc60d39d2 Merge remote-tracking branch 'origin/master' into 3.2.x 2018-07-13 07:25:49 +02:00
John Wang
19fd48e33b [Golang][client] fix formData file parameter name use (#506)
* support form-data file MIME `name` parameter

* update test spec and Go client for form-data file name

* update samples for ensure-up-to-date

* update mustache template

* update samples for Go client

* improve assignment location

* update samples
2018-07-13 00:53:38 +08:00
John Wang
93832340a5 add RFC-3339 formatting to parameterToString (#502) 2018-07-13 00:50:21 +08:00
Tomasz Prus
a0936bec02 feat: use local_var_params to avoid collision with api parameters (#521) 2018-07-12 21:30:57 +08:00