5759 Commits

Author SHA1 Message Date
William Cheng
14bebcd2f2
string comparison bug fix, minor format change (#10446) 2021-09-22 11:06:18 +08:00
William Cheng
acdf357b76
Revert "Accept header forces application/json type even if server (#10337)" (#10440)
This reverts commit 18301d00112e064d80d94f1ca5d6ca6032808ddd.
2021-09-21 18:17:05 +08:00
Aleksandr Nekrasov
ef0186c9cf
[scala] Fix Array[Byte] type for Openapi type string format byte (#10426)
* [scala] fix byteArray mapping in AbstractScala

* fix testng framework instead of junit for sttp codegen

* regenerate scala examples

* regenerate docs and examples

* fix test
2021-09-21 12:15:49 +08:00
Wojciech Trocki
18301d0011
Accept header forces application/json type even if server (#10337)
* fix!: accept should not force application JSON 

Generated code offen provides range of accept methods.
This method improperly takes JSON as preferred

Example:
	localVarHTTPHeaderAccepts := []string{"application/zip", "application/json"}

* chore: generated changes
2021-09-21 12:04:00 +08:00
Andrew
61852a072a
[go]: fix anyOf compilation error (#10431) 2021-09-21 12:01:35 +08:00
Wojciech Trocki
a939676c0d
fix: expose allowed values of the enum (#10386)
* fix: expose allowed values of the enum

Fixes #10385

* chore: update examples
2021-09-21 11:58:38 +08:00
adessoDpd
1a48c5f19f
[Wsdl] Handle schema property of type array with oneOf items and other minor updates/fixes (#10434)
* add handling of array of oneOfs

* handle res model-type lowercase name +shorten code

* remove unnecessary vendor-extension model enum

* handle openapi lowercase schema name for array res

* change xs:anytype to string for file responses

* update checkstyles

* remove not needed imports again

* update samples

* upper/lowercase use local getdefault

* update  samples again
2021-09-21 11:46:05 +08:00
RomainPruvostMHH
04e67acd0a
Fix issue 8352: [Java][RestTemplate][WebClient] Incorrect handling of free form query parameters (#10428)
* [Java][RestTemplate][WebClient] fix issue #8352 handling of free-form
query parameters with Java

* replace tab by spaces

* commit samples files generated by the generate-samples.sh script
2021-09-21 11:40:56 +08:00
Pi Delport
ce30a3f3bc
fix(rust,client): convert form isArray values to string (#10420) 2021-09-21 11:36:02 +08:00
Jon Schoning
1247e77453
[haskell-http-client] add ability to choose additional characters in querystring which should not be encoded (e.g. "+" or ":") (fixes #3459) (#10424) 2021-09-19 02:02:22 -05:00
Vitaliy Kim
b13e37839a
fixes OpenAPITools#10403 (#10404) 2021-09-19 12:29:20 +08:00
Pi Delport
10288397f9
fix(RustServerCodegen): fix reserved word model rename log message (#10418) 2021-09-19 11:49:35 +08:00
Pi Delport
2bd20a08de
fix(rust,client): use local_var prefix for configuration (#10419)
* fix(rust,client): use local_var prefix for configuration

This avoids conflicting with params named "configuration".

* chore(rust,client): capture updated samples
2021-09-19 11:44:42 +08:00
Thomas Leplus
80fb9e9889
Use 'this' to assign to class field. (#10417) 2021-09-19 11:42:34 +08:00
Gregor
a463c11354
10408: made Validate public. (#10413) 2021-09-19 11:41:18 +08:00
bgong-mdsol
fdb13c3e2e
add the correct import of enum (#10412) 2021-09-17 09:38:48 +08:00
Surya Asriadie
0936b43dfd
[Kotlin] Fix default value for kotlin class (#10407)
* Fix default value for kotlin class

* fix style: remove trailing line

* fix ktorm schema
2021-09-17 01:12:41 +08:00
Foorack / Max Faxälv
f9320cae68
[typescript-axios] Upgrade axios from 0.21.1 to 0.21.4 (#10381)
* Upgrade typescript-axios from 0.21.1 to 0.21.4

* Update samples
2021-09-16 10:39:38 +08:00
bgong-mdsol
aac9aa681e
fix not type found ByteArray (#10166) 2021-09-16 10:24:44 +08:00
Jon Schoning
df877a8cf9
[haskell-http-client] fixes for GHC 9 (#10400)
- update stack/deps to LTS 18.10 for ghc-8.10.7
- fixes for GHC 9
- update samples
2021-09-14 16:15:58 -05:00
bflaton
9479d35081
Python client docstring (#10339)
* Updated template so that generated code now renders docstrings and function parameters nicely in IDE.

Endpoints are still accessible in generated code, mainly to satisfy some test cases.

* fixed manual tests
2021-09-14 09:38:48 -07:00
Bruno Coelho
084e0930d0
[kotlin][client] fix warning (#10390) 2021-09-14 21:20:16 +08:00
Bruno Coelho
27727acf52
[swift5][client] Fix issue 9953 (#10387)
* [swift5][client] Fix issue 9953

* [swift5][client] update docs
2021-09-14 11:39:32 +08:00
Bruno Coelho
0211f7b82e
[kotlin][client] add support for okhttp requests with empty body (#10369)
* [kotlin][client] add support for okhttp requests with empty body

* [kotlin][client] add support for okhttp requests with empty body
2021-09-14 11:33:06 +08:00
Ahmed Yarub Hani Al Nuaimi
29f3869bda
Fix installation script (#10378) 2021-09-14 11:31:21 +08:00
Martin Delille
dd6e399ff5
Fix ci again (#10388)
* Fix ci again

* Improve .gitignore
2021-09-14 11:23:18 +08:00
Bruno Coelho
2732c45cc1
[swift5][client] code formatting and dependencies ordering (#10370) 2021-09-13 20:00:20 +08:00
Noor Dawod
495f6eb30c
Dart2 template linting (#10263)
* Bump jimschubert/query-tag-action from 1 to 2

Bumps [jimschubert/query-tag-action](https://github.com/jimschubert/query-tag-action) from 1 to 2.
- [Release notes](https://github.com/jimschubert/query-tag-action/releases)
- [Commits](https://github.com/jimschubert/query-tag-action/compare/v1...v2)

Signed-off-by: dependabot[bot] <support@github.com>

* Updated Dart2 template to fix linting errors when using recommended rules.

* Updated Petstore code.

* Revert to having no EOF marker at end of few files.

* Fix a call on null value.

* Updated Petstore code.

* Add more checks for nulls.

* Updated Petstore code.

* Updated Petstore code.

* Revert back decoding an enum value.

* Revert back decoding an enum value.

* Updated Petstore code.

* Revert to older version of _convertParametersForCollectionFormat method.

* Updated Petstore code.

* Updated template and Petstore files.

* Adjust doc for analysis_options file.

* Updated Petstore sources.

* Shorten command to replace path parameters.

* Updated Petstore code.

* Add a space for readability.

* Adjust template per feedback.

* Remove unneeded break statements.

* Updated Petstore code.

* Keep a new line character when replacing parameter names (like before).

* Remove string interpolation.

* Updated Petstore code.

* Remove commented code.

* Regenerate Petstore code.

* Regenerated Petstore code.

* Use another parameter name to stop variable shadowing.

* Regenerated Petstore code.

* Put description adjacent to the class.

* Add another global ignore for all files: constant_identifier_names

* Use const for contentTypes and authNames.

* Regenerate Petstore code.

* Use shorter code to check for an empty array.

* Regenerate Petstore code.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-13 09:40:15 +08:00
Martin Delille
1eb4d886e6
cpp-qt-client: Fix CI (#10376) 2021-09-12 23:41:03 +08:00
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