4110 Commits

Author SHA1 Message Date
William Cheng
592cb64465
minor code improvement based on sonarcloud reports (#10364) 2021-09-10 18:12:23 +08:00
Mike Marchetti
9464999d9c
fix: handle deepcopy of openapi objects (#9735) (#9735)
- Add __deepcopy__ and __copy__ to OpenApiModel
- pass discriminator inside deepcopy if exists
- add test cases for deepcopy of models
2021-09-09 09:16:59 -07:00
William Cheng
477e2365c7
improve git_push.sh (#10356) 2021-09-09 12:49:03 +08:00
William Cheng
a8ee07c132 replace tabs with 4-spaces 2021-09-09 12:27:31 +08:00
shayan-eftekhari
4626b185fe
[cpp-restsdk] Fix ModelBase::fromJson(const web::json::value&, int64_t&) bug which incorrectly returns zero (#10300)
* BUG FIX: A missing semicolon in cpp-pistache-server generated code.

* BUG FIX: Provide default values of schema in cpp-pistache-server generated code.

* BUG FIX: Provide default values of schema in cpp-pistache-server generated code.

* Fix a bug in cpprest-sdk generator (Issue #8450)

* Fix a bug in cpprest-sdk generator (Issue #8450)

* Fix a bug in cpprest-sdk generator (Issue #8450)

* Revert "Fix a bug in cpprest-sdk generator (Issue #8450)"

This reverts commit 7d8f842860f94deb78fb519716f9984e1efad878.

* Fix a bug in cpprest-sdk generator (Issue #8450)
2021-09-09 11:57:45 +08:00
agilob
d2d06f0503
Add ArchUnit to test format of loggers and Abstract classes (#10335)
* Add archunit to programatically test format and scope of loggers

* Fix use of loggers

* Update error message

* Add check for abstract class

* Test if classes with abstract in name are abstract

* Make abstract class abstract

* Rename test class

* Make logger private final

* Make logger private
2021-09-09 11:54:51 +08:00
Thomas Hervé
36ae0b9ffe
Handle nullable items in Go arrays (#10268)
If an item in a go array is nullable, we want to represent it as a pointer,
otherwise it will be deserialized with a default value and it will be
impossible to differentiate it from null.
2021-09-09 11:53:23 +08:00
Bas Huisman
54e98c86bb
make updateParamsForAuth protected for java webclient (#10351)
Co-authored-by: Bas Huisman <bash@lostlemon.nl>
2021-09-09 11:27:52 +08:00
klhmeyer
66f86d890d
Update pojo.mustache (#10353)
For setters the Jackson based property name conversion  (e. g.  from _-separated to CamelCase) is missing. So I propose this.
2021-09-09 11:26:26 +08:00
Kraust
0eba15f042
Updated the HTML2 Doc Curl Examples to provide sample Request Body & Query Param examples. (#10323)
* Updated the HTML2 Doc Curl Examples to provide sample Request Body & Query Param examples.

* Updated the HTML2 Doc Curl Examples to provide sample Request Body & Query Param examples.

Co-authored-by: Kraust <kraust@cock.li>
2021-09-09 11:24:13 +08:00
William Cheng
6629f8f996
Show an error instead of NPE when schema is not defined (#10348)
* show warning instead of npe when schema is not defined

* better error message
2021-09-09 11:22:14 +08:00
Martin Delille
2239ca36fd
cpp-qt-client: Fix cppcheck warnings (#10322)
* Fix cppcheck warnings

* Improve coding style

* Add 4 spaces
2021-09-08 16:10:28 +08:00
Ahmed Yarub Hani Al Nuaimi
86ead27a40
Windows adaptations and installer configuration (#10326)
* Undefine reserved keywords
Cast to correct type when applicable to be compilable on C++ compilers
Add conditional instllation of configuration files

* Update samples

* Use default installation method if no configuration script is provided

* Undefine stdin/stderr/stdout only for model files

* Undefine stdin/stderr/stdout only for model files in samples

* Remove #undef directives

* Add stdin/stderr/stdout to reserved words for libcurl-C generator

* Expose all symbols when compiling libcurl as a shared library on Windows
Install header files
Set correct flags for target link libraries

* Remove line

* Regenerate samples

* Add comment

* Update documentations

* Revert "Update documentations"

This reverts commit 0e25659de2d68753e1e033eaa83e769c028de5cb.

* Update documentations

* Add versioning support

* Add versioning support

* Add comment
2021-09-08 10:55:49 +08:00
Jorge Rodríguez Martín
a24e7e2af3
Fix default value for enum type in RequestParameter was not added (#10332) 2021-09-08 10:16:00 +08:00
Matthias Wimmer
2640c369e8
[elm] fix generated invalid code for enums (#10328)
As described in
https://github.com/OpenAPITools/openapi-generator/issues/8343 invalid
code was generated when the OpenAPI uses enums. With this the
decoders/encoders are called at the correct place.
2021-09-08 10:04:48 +08:00
MATSUBARA Nobutada
2c5943d32f
Fix response array and dict in elm template (#10310) 2021-09-08 10:00:13 +08:00
hackerman
8eed5d0c89
[csharp-netcore] verbose null checking (#10333)
This patch addresses an issue where csharp-netcore failed to generate compilable code when required attributes were of complex types.

By using the non-shorthand syntax for checking if the value is set, and throwing an error in that case, the compile issues have been resolved.

Closes #9442
Closes #5442
2021-09-08 09:59:42 +08:00
ahjota
85767829cb
[R] Fix shellcheck violations in git_push.sh.template (#10345)
* shellcheck

* regenerated sample
2021-09-08 09:58:34 +08:00
andrew-matteson
bc3ee32498
Angular 12 Support: Typescript upgrade + HttpContext (#10336)
* Basic Angular 12 support.

* Make samples

* Pass HTTP Context for Angular client

* Generate samples for Angular-v12

* Add all samples
2021-09-07 08:23:52 +02:00
Justin Black
b258bba5dd
Revert "Updated template so that generated code now renders docstrings and function parameters nicely in IDE. (#10331)" (#10338)
This reverts commit ae88cf14dae6404beeb7efb8ba881ea86c12f37c.
2021-09-06 20:20:04 -07:00
bflaton
ae88cf14da
Updated template so that generated code now renders docstrings and function parameters nicely in IDE. (#10331)
Endpoints are still accessible in generated code, mainly to satisfy some test cases.
2021-09-06 15:01:33 -07:00
Jimi Steidl
1da6c223e6
Fix condition bug in dart-dio-next OauthInterceptor (#10317) 2021-09-03 20:27:58 +08:00
Peter Leibiger
a558554961
Add OAS3 allowEmptyValue for query params (#10312)
* add the special case of empty query parameters to the fake API
2021-09-03 16:32:51 +08:00
Guus Bloemsma
490c747c2b
[kotlin-client] OkHttp call is now non-blocking (#10303)
* suspend method is now non-blocking

* added required imports

* generated the samples

* suspend method is now non-blocking

* added required imports

* generated the samples

* Cancelling the call when the coroutine is cancelled
Only use coroutines when requested
Not adding potentially unavailable imports

Co-authored-by: Guus Bloemsma <Guus.Bloemsma@Rabobank.nl>
2021-09-03 11:56:31 +08:00
Kaijia Feng
8cc2bc4fa7
[Java][RestTemplate][WebClient] Fix typo in comments (#10311) 2021-09-02 21:03:29 +08:00
Josh Bridge
6331eb6293
[Java] Return content type on default spring reactive responses (#10099)
* Return content type on default spring reactive responses

* Return content type on default spring reactive responses

* Refactor apiUtil and use request mediaType

Co-authored-by: Joshua Bridge <jbridg12@jaguarlandrover.com>
2021-09-02 11:19:13 +08:00
Artem
d68d65ce00
Fix java examples (#10257)
* TAP-655 fix examples java

* update samples
2021-09-02 11:08:35 +08:00
Eric Durand-Tremblay
f9fa62a79e
Issue #10244 fix php enum default value initialization (#10273)
Co-authored-by: Eric Durand-Tremblay <etremblay@kronostechnologies.com>
2021-09-02 11:03:31 +08:00
Oleh Kurpiak
c148539ce3
[Java][Spring] fix imports for nullable helpers (#10234) 2021-09-02 11:01:12 +08:00
林裕凯
74f84b6f9b
[Java][Spring] fix enum variables in path parameters which generated allowableValues with double quote(#6762) (#10285)
Co-authored-by: Yukai Lin <yukai.lin@ericsson.com>
2021-09-02 10:45:04 +08:00
LionH
67e515447e
Adding the useOptional in the ApiController (#6735)
* Adding the useOptional in the ApiController

* If jdk8 is disabled but useOptional is enabled, avoid duplicate import.
2021-09-02 10:32:15 +08:00
William Cheng
a3f012545d replace the tab with 4-space 2021-09-01 14:13:49 +08:00
Yuriy Belenko
062cc96011
[php-slim4] Reduce log noise (#10229)
* Add AbstractAuthenticator once

* Refresh samples
2021-09-01 10:59:18 +08:00
Bruno Coelho
de1c2fd545
[swift][client] upgrade alamofire to version 5.4.3 (#10292)
* [swift][client] initial swift upgrade

* [swift][client] upgrade alamofire
2021-09-01 10:08:00 +08:00
Foorack / Max Faxälv
d980431a96
[Rust][Client] Default version to spec version if not provided as property (#10296)
* [Rust] Default version to spec version if not provided as property

* fix(ci): OpenAPI was null during test
2021-09-01 10:05:37 +08:00
bgong-mdsol
0c7ec41aff
[sala-sttp]Add 'clone' in reservedWords list (#10293)
* add 'clone' to reservedWords

* scala - add reserved keyword clone
2021-09-01 02:28:43 +08:00
Esteban Gehring
7c4d2b87f6
[typescript] fix compilation error for file upload (#10288) 2021-08-31 18:33:09 +08:00
Ahmed Yarub Hani Al Nuaimi
bfaa38daa0
Fix names of pre- and post- scripts for building libcurl (#10284) 2021-08-31 11:13:47 +08:00
Nathan Baulch
5d68bd6a03
Fix thousands of spelling typos (#10272) 2021-08-28 22:58:24 +08:00
Artem
2d239271e5
#10264 fix spaces in signatures (#10265)
* TAP-198 fix spaces in spring java

* update samples
2021-08-28 22:57:08 +08:00
William Cheng
7bdbfed467
Remove skipReadonlyPropertiesInInit option (#10269)
* remove skipReadonlyPropertiesInInit option

* fix removal

* more removal

* fix again
2021-08-28 22:43:53 +08:00
Ahmed Yarub Hani Al Nuaimi
8818bf260e
Libcurl CMake adaptations (#10249)
* Enable using more recent CMake versions
Remove default build type
Add OpenSSL using imported targets
PreTarget and PostTarget scripts
Do not build as shared by default
Fix typos

* Default to building shared libraries

* Remove add_compile_definitions()
Correctly add target link libraries

* Fix syntax

* Fix Indentation
2021-08-27 14:16:30 +08:00
Bo Chen
c3eb442900
[Go-client] Fix the ineffectual assignment to err in decode (#10275)
Fixes: #10064

Signed-off-by: Bo Chen <chen.bo@intel.com>
2021-08-27 13:32:34 +08:00
Ween Jiann
3b8f66cd1f
[go-server] Fix: param names clash with variables, added suffix (#10243)
* Postfix "Param" to param names in controller

* Regen samples
2021-08-27 13:07:31 +08:00
Bradley Friedman
3446bc6337
[bugfix] [cpp-ue4] API often tries to set reference to null when calling GetHttpRetryManager (#10277)
* [cpp-ue4] implemented null check and fatal log for GetHttpRetryManager]

* [cpp-ue4] reimplemented null check as checkf rather than Fatail UE_LOG

* [cpp-ue4] regenerated samples and docs
2021-08-27 12:57:14 +08:00
Lazar Prijović
ae5db7ee20
[cpp-ue4] Add missing convertors for arbitrary-typed variables (#10276)
* Add missing convertors for TSharedPtr<FJsonValue>

* Update samples
2021-08-27 12:55:10 +08:00
Bradley Friedman
0948a95b8c
[cpp-ue4] bug-fix issue 10205: response json parsing logging a error to unreal console when there is no actual parsing problem (#10221)
* [cpp-ue4] Fixed a bug where respose json parsing was not taking 'writeOnly' or 'required' into account and was logging a error to the console when there was no actual problem.

* [cpp-ue4] Moved comments to tail of line in response to improve code appearance.  Added baseName to comments for clarity of reading.

* [cpp-ue4] removed comments from template from previous commits.

* [cpp-ue4] added back ParseSuccess flag flip for TOptional, as the templated version of TryGetJsonValue does actually handle the absense of the field correctly for TOptional.

* [cpp-ue4] reworked looping in model source template's FromJson to better mirror the loop in WriteJson

* [cpp-ue4] more concise version of writeOnly change to FromJson
2021-08-26 17:04:47 +08:00
Lazar Prijović
691a10ad8e
[cpp-ue4] Fix model generation for arbitrary-typed values (#10267)
* Replace AnyType declaration with FJsonValue

* Rebuild docs
2021-08-26 16:35:25 +08:00
Nathan Baulch
9c66d33171
[go] Support for response status code ranges (#10075) 2021-08-25 11:15:23 +08:00
Aanisha Mishra
67fbb1081e
Skip setting readOnly properties with default values in model constructors (#10196)
* skipReadonlyPropertiesInInt flag to go SDK

* minor amendments

* update docs for go
2021-08-25 10:21:02 +08:00