14156 Commits

Author SHA1 Message Date
William Cheng
77ac70337b use ue full image 2020-05-25 21:05:14 +08:00
William Cheng
c342b8b79b test ue4 cpp in drone.io 2020-05-25 20:53:02 +08:00
William Cheng
c000eaef73
Add C++ UE4 client generator (#6399)
* Added new language: UE4 C++ client

* rename generator

* add copyright

* update doc

* fix with Locale.ROOT

* add new file

* minor improvements

* remove postProcessModels

Co-authored-by: Samuel Kahn <samuel@kahncode.com>
2020-05-25 18:33:48 +08:00
William Cheng
6be3bc0f8a
Add a link to the article in dev.to (#6421) 2020-05-25 17:17:40 +08:00
Jose Camara
4dbb5c9e0d
typescript-axios anytype is not defined (#6335)
* Include map for `AnyType` in `typescript`

* Exclude `any` from the list of types extracted from `anyOf`, `allOf`, `oneOf`

Exclude if there are other meaningful types

* Include new scripts and `yaml` to test the new case

* Execute the new sample for `typescript-axios`

* Filter out only `AnyType` instead of all `any` types

* Renamed and modified samples

- Included more examples using `oneOf, `allOf`, `anyOf`
- Includede examples when types that are translated to `any` are involved (`file`)
2020-05-25 10:21:58 +02:00
Slavek Kabrda
205514c455
[Java][jersey2] Make (de)serialization work for oneOf models, add convenience and comparison methods (#6323) 2020-05-25 15:17:52 +08:00
William Cheng
202d184ce2
Migrate OCaml petstore to use OAS v3 spec (#6348)
* migrate ocaml petstore to use oas3

* break the build

* Revert "break the build"

This reverts commit a7c12d90fea50c9739ed302f3c8e94e9f437d491.
2020-05-25 09:09:22 +08:00
Sebastien Rosset
583aa24152
[Python-experimental] Fix type error if oneof/anyof child schema is null type (#6387)
* Mustache template should use invokerPackage tag to generate import

* Fix runtime exception when composed schema has 'null' type

* Fix runtime exception when composed schema has 'null' type
2020-05-24 17:21:00 -07:00
Sebastien Rosset
afb3188fab
[Python-server] Fix blueplanet 'file not found' error (#6411)
* Mustache template should use invokerPackage tag to generate import

* fix 'cannot remove file error
2020-05-24 16:49:02 +08:00
Sebastien Rosset
60d5ed350c
[nodejs] Fix deprecation notice when running sample nodejs script (#6412)
* Mustache template should use invokerPackage tag to generate import

* Remove deprecation notice
2020-05-24 16:48:23 +08:00
Sebastien Rosset
e38168c2b5
[java-jersey2] Conditionally include http signature mustache template (#6413) 2020-05-23 17:32:06 -04:00
Jim Schubert
284a90f7b1
[bug] Fix path provider bug on CI (#6409)
* Fix path provider bug on CI

Previous path sorting logic failed on CI due to one or more files in the
cpp-qt5 script being associated with different path providers. This
caused a ClassCastException from Path#compareTo

This change uses Apache Commons PathFileComparator to sort by full path.

File list is copied to avoid sort side effects. Log on all exceptions.
2020-05-23 10:56:11 -04:00
William Cheng
3d0c4e1909
decomission nodejs server generator (#6406) 2020-05-23 18:41:52 +08:00
Jon Freedman
950508fd4b
[Java] Generate valid code if no Authentication implementations present (#5788)
* generate valid code if no Authentication implementations present

resurrects https://github.com/OpenAPITools/openapi-generator/pull/2861

* remove what I assume are human generated test cases

* need to iterate over authMethods in order to pull out name

* fix another test

* update more tests

* rename hasTokenAuthMethods to hasApiKeyAuthMethods

* remove duplicate methods, fix hasHttpBearerMethods check

* update templates

* update windows java-petstore files

* update windows java-petstore files

* re-generate

* re-generate

* restore samples.ci tests

* restore samples.ci tests
2020-05-23 18:36:03 +08:00
William Cheng
f200122c09 update java jersey2 samples 2020-05-23 15:47:10 +08:00
Sebastien Rosset
b3555d6801
[Java] Fix mustache tag in pom template for HTTP signature (#6404)
* Mustache template should use invokerPackage tag to generate import

* Fix tag for http signature in pom.xml
2020-05-23 15:35:01 +08:00
Sebastien Rosset
1da9092dad
[Python-experimental] Rename from_server variable to json_variable_naming (#6390)
* Mustache template should use invokerPackage tag to generate import

* Add unit test showing how to construct objects from a JSON dict

* rename from_server to json_variable_naming

* rename from_server to json_variable_naming

* fix code so it can execute in python 2.x

* rename variable

* fix typo

* fix typo

* fix deprecation warning

* fix deprecation warning

* fix deprecation warning
2020-05-22 19:09:12 -07:00
William Cheng
ed84e4542f
Add a link to medium blog post (#6403) 2020-05-23 09:28:19 +08:00
William Cheng
ce1967a82b
Clean up debug in test (#6398)
* remote system out println

* remove typeo
2020-05-23 09:28:02 +08:00
William Cheng
8cf59384f7 readding bin/swift5-petstore-readonlyProperties.json 2020-05-23 09:17:03 +08:00
William Cheng
029f7aa39c remove ./bin/swift5-petstore-readonlyProperties.json 2020-05-23 09:15:14 +08:00
Jim Schubert
b828860614 [samples] Regenerate python-experimental 2020-05-22 17:07:37 -04:00
Jim Schubert
70ca93570e
[core][general] Add metadata file tracking to aid in "Golden Tests" regeneration (#6325) 2020-05-22 16:48:32 -04:00
Sebastien Rosset
19e14237aa
[python-experimental] Add support for pep 3134, attach cause of exception (#6388)
* Mustache template should use invokerPackage tag to generate import

* Add exception cause

* using six module for exception chaining in Python 3.x
2020-05-22 09:44:15 -07:00
Sebastien Rosset
912604f3dc
[Java-jersey2] Add new ApiClient constructor with auth objects (#6393)
* Mustache template should use invokerPackage tag to generate import

* Add new constructor for Java ApiClient

* Add constructor with auth map
2020-05-22 23:54:05 +08:00
William Cheng
693e640872
Add links to blog post, youtube video (#6396) 2020-05-22 15:50:34 +08:00
William Cheng
573682e56d
Add @wing328 as the creater of PowerShell client generator (refactored) (#6395) 2020-05-22 15:41:47 +08:00
William Cheng
a8f9ea4873
add nullable support to oneof, anyof (#6392) 2020-05-22 15:03:51 +08:00
William Cheng
f10de73ed5
Add helper methods to determine if the spec has certain authentication defined (#6347)
* better import, add security methods

* add helper method to determine auth type when adding supporting files

* better docstrings

* fix boolean return

* update tests

* Revert "update tests"

This reverts commit 29cfc8ad663234ee20c73ac7be9c4dd2235ac34f.

* add test in shippable

* rename variables

* check if auth files are needed

* update tests

* revert check

* set java8 to true

* fix auth check

* better npe handling

* reoder methods

* undo changes to shippable.yml
2020-05-22 12:57:44 +08:00
Sebastien Rosset
69177517ef
[Python-experimental] Should accept float value serialized without decimal point (#6386)
* Mustache template should use invokerPackage tag to generate import

* A float may be serialized as an integer, e.g. '3' is a valid serialized float

* A float may be serialized as an integer, e.g. '3' is a valid serialized float

* add unit tests
2020-05-21 18:59:31 -07:00
Jon Schoning
3603dee3fb
[haskell-http-client] Ensure newytpes are generated when necessary (fixes #6350) (#6383) 2020-05-21 12:48:41 -05:00
Slavek Kabrda
cac4170c0f
[go-experimental] Fix marshalling of of go oneOf structures to work on non-pointer receivers (#6314) 2020-05-21 21:02:21 +08:00
Januson
c49d8fda8e
[M][REQ][JAVA]: Add option to generate arrays with "uniqueItems" true as Sets rather than Lists (#5466)
* [REQ][JAVA]: Add option to generate arrays with "uniqueItems" true as Sets rather than Lists
 - Update Java code generation to use sets instead of lists when uniqueItems is set to true
 - Add import resolution for sets
 - Add tests and fix broke tests

resolve #5254

* Update Javascript, Perl, Python and Ruby to preserve current functionality.

* Switch set implementation to LinkedHashSet

* Fix missing import for uniqueItems used on param.

* Fix missing import and return type for responses with uniqueItems

* Fix default values for array of enum

* Update generated samples

* fix merge issue

* Update generated samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-05-21 13:27:57 +08:00
Diogo Nunes
dec1365619
Use webclient exceptions in java webclient client (#6304) 2020-05-21 00:46:34 +08:00
William Cheng
2ec0754596
add pub to struct in single parameter (#6381) 2020-05-20 22:36:44 +08:00
Ramanth Addala
a0bfc3c1f2
replacing caTools dependency with base64enc (#6349)
* replacing caTools dependency with base64enc

* adding review fixes

* fix(r) : updated the cran repo url
2020-05-20 21:19:13 +08:00
Slavek Kabrda
5f2979c434
[go-experimental] Ensure that all oneOf/anyOf models have their Nullable<Model> defined (#6363) 2020-05-20 17:29:03 +08:00
Sebastien Rosset
755336f9d9
[Java] Upgrade http signature library to version 1.4 (#6370)
* Mustache template should use invokerPackage tag to generate import

* upgrade to http signature library version 1.4

* Use updated HTTP signature library

* Run sample scripts

* Add code samples in README file for HTTP signature

* fix java imports

* Update http-signature version
2020-05-20 15:51:08 +08:00
Jérémie Bresson
e66aaa29c0
Update swagger parser to 2.0.20 (#6372) 2020-05-20 12:00:33 +08:00
Natan Laverde
40a329f0f7
[BUG] [Server: C++] [Qt5] Fix missing headers and wrong status code (#6345)
Change helper method '''writeResponseHeaders''' implementation to just set the headers, instead of write them, and also rename the method to '''setSocketResponseHeaders''', to maintain the new semantic.
The implementation of '''QHttpEngine::Socket::write''' or '''QHttpEngine::Socket::writeJson''' implementations will call '''Socket::writeData''' that writes the Headers and Status Code before write the content if they are not already written.
If these methods are not called (e.g.: empty reply), we could set the headers just before close the socket.
2020-05-20 11:12:13 +08:00
William Cheng
5fe34fbd74
Add oneof/anyof support to PowerShell client generator (#6361)
* add oneof/anyof support to powershell client gen

* fix tests
2020-05-19 21:42:17 +08:00
William Cheng
096b8f8828
[Go][Experimental] Avoid duplicated import in enum model (#6355)
* avoid double import of fmt

* update go exp petstore oas3

* import for go client exp only
2020-05-19 20:17:45 +08:00
Ermolay Romanov
2f9aa282e5
[typescript-rxjs] restore prototype inheritance for clone & its clients (#6001)
* [typescript-rxjs] restore prototype inhertance

- previously clone() and its clients in the BaseAPI class were generic
- with removal of the generic argument, these methods became unavailable
  to the API classes inheriting from BaseAPI
- original generic was imprecise, as these are not statics
- return type of `this` is the correct notation

* [typescript-rxjs] Chery-pick from #5465 by @denyo

  - this is done to prevent the changes slated for 5.0 from conflicting
  - apply destructuring changes from
      - denyo:feature/rxjs-statuscode-and-progress@673d67c
2020-05-19 10:06:08 +02:00
William Cheng
d92b8833b0
reset to nil, replace tab wtih space (#6352) 2020-05-19 15:34:53 +08:00
Natan Laverde
f8a144bdc1
[C++] [Qt5] [Server] read json (#6343)
* [C++] [Qt5] [Server] [Bug] fixed Incomplete Read JSON

Emit signal requestReceived only after request content is entirely received.

* [C++] [Qt5] [Server] [Bug] fixed Incomplete Read JSON

Emit signal requestReceived only after request content is entirely received.
2020-05-18 11:32:13 +02:00
William Cheng
d4b55d6767 update php petstore oas3 samples 2020-05-18 17:27:46 +08:00
alxnegrila
e5c72a0ab6
[PHP] ObjectSerializer fix for array of objects (#6331)
* [PHP] ObjectSerializer fix for array of objects 

Array of objects translate to "map[string,object][]" and they fail to deserialize. This is because the deserialization does not parse the mapping string correctly. A quick fix is trying moving array deserialization before object deserialization.


Example object
    ObjectExample:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            additionalProperties: true

* Update sample

Co-authored-by: Alexandru Negrila <alex@arntech.ro>
2020-05-18 17:23:27 +08:00
Slavek Kabrda
634291f4b8
[go-experimental] Ensure enum deserialization checks enum values (#6315) 2020-05-18 16:42:40 +08:00
Nikita Karnaukh
eefcd62d5b
[Kotlin][Client] Added supporting Retrofit2(RxJava/RxJava2/Coroutines) (#5750)
* Added support Retrofit2(RxJava/RxJava2/Coroutines) to Kotlin client code generator

* Added generated samples for Retrofit2(RxJava/RxJava2/Coroutines) on Kotlin

* Fixed generating retrofit2 without Rx/Coroutines

* Fixed MultipartBody template, remove redundant space after MultipartBody.Part annotation

* Fix documentation diff.

* Fix generating build.gradle file for samples.
Add dependencies for rxJava/rxJava2 and rx retrofit's adapter.

* Update generated sample with rx dependencies

* Update generated sample with coroutines

* Update generated sample with RxJava 2 dependencies

* Update and refactoring scripts for sample generation

* Update generated sample code

* revert changes by mistake

* revert changes by mistake #2

* Fix return type for first RxJava

* Add RxJavaCallAdapterFactory to ApiClient scheme for RxJava 1/2

* Fix script loggin

* Update generated code for RxJava 1/2

* Fix kotlin.md documentation by script export_docs_generators.sh

* Update Kotlin samples project in pom.xml

* Revert "Update Kotlin samples project in pom.xml"

This reverts commit 9de4d0ba

* Fixed "" wrapping number types for annotation value
Fixed generating polymorphic interfaces for Gson, interface fields can't be marked with @SerializedName annotation, it's enough to mark it in child model.
Fixed instantiationTypes(array, list, map) for Kotlin generator

* Update Kotlin samples project after last fixes

* Update Kotlin samples project for kotlin-jvm-*

* Update Kotlin readme.md documentations

* Update Kotlin client sample changes

* Fixed encoding braces for generics model

* Update Kotlin client sample changes

* Update Kotlin client sample after merge with master

* Fixed adding empty braces for inherit from Map/Array

* Update sample model after last fix with empty braces

* Revert adding @SerializedName to Kotlin interface fields through @get:SerializedName as for Jackson

* Update Kotlin client samples with adding @get:SerializedName
2020-05-18 16:26:27 +08:00
Slavek Kabrda
d1e8d632ef
[go-experimental] Add convenience wrapper function for oneOf members (#6316) 2020-05-18 15:57:05 +08:00