18059 Commits

Author SHA1 Message Date
Justin Black
d1b61bdc04
adds get/setHasMultipleTypes to Java schema classes (#10715)
* Adds getter and setter for hasMultipleTypes and implements it in CodegenModel

* Adds getter and setter to CodegenProperty

* Updates CodegenParameter

* Updates CodegenResponse

* Samples regenerated
2021-10-27 14:16:53 -07:00
William Cheng
1c38bfd5a0
update microprofile to newer version (#10714) 2021-10-27 23:42:46 +08:00
bflamand
27c82e8ed2
Typescript saga immutablejs enhancements and small fixes (#10444)
* first commit: add cli option for saga and records. Added dummy sagas.mustache test file.

* More progress with default values. First prototype for isEntity and isUniqueId.

* record generation complete

* record generation complete

* progress with saga generation

* progress with saga generation

* first fully working saga generation

* merge with latest master

* removed unneeded "items" properties.

* moved global CodegenModel modifications into subclass ExtendedCodegenModel used exclusively by TypescriptFetchClient. Adding missing samples files.

* moved global CodegenOperation modifications into subclass ExtendedCodegenOperation used exclusively by TypescriptFetchClient.

* moved global CodegenProperty modifications into subclass ExtendedCodegenProperty used exclusively by TypescriptFetchClient.

* moved global CodegenParameter modifications into subclass ExtendedCodegenParameter used exclusively by TypescriptFetchClient.

* added the missing "allSagas" export.

* renamed & reworked "meta data response" flags to a more useful general concept of "operation return passthrough"

* added vendor flag keepAsJSObject as escape hatch to support circular dependencies in models and other special cases. Also fixed issues with default values for some records properties.

* added autodetection for passthrough to simplify standardised specs.

* fix small issue with passthrough void

* fix small issues with passthrough void and missing passthrough imports in some cases. Fix issues with enum default values.

* fix small issues with passthrough void and missing passthrough imports in some cases. Fix issues with enum default values.

* Added "reservedRecordField" feature to support remapping fields names that cannot be used in Records. Added missing export to record: toApi().

* added uniqueId inference. Fix small generation when uniqueId property is an array.

* removed feature "reservedRecordField" and replaced it with existing built-in "reserved words" feature. Fix minor issues with typings in generated files.

* Changed api recType names to make them less likely to cause name conflicts. Added generated ApiEntities (record, reducer & selector) files.

* Moved location of ApiEntities related files and fix issues with exports.

* - merge latest master
- renamed fake test apis to better fit the "pet theme"
- added mode for "SourceOnlyLibrary" (same as used in codegen typescript jquery)

* - missing ganarate sampless

* - Modified way to export apiEntitiesSelectpr to reduce typescript analysis time for consuming project. Removed tab characters in mustache files. Reformat code for TypeScriptFetchClientCodegen to try to remove false positive for tabs vs spaces.

* - added markErrorsAsHandled property to api sagas. Increased typescript version to address some typing errors on library build.

* - fix bug in saga interfaces. Upgraded to typescript "strict" mode to ensure proper typechecking info is generated.

* - added optional id for apiEntity selectors. Added toInlined() support to convert an entity to an inlined model recursively.

* - minor tweak for apiEntitySelector to accept null id

* - minor tweak for apiEntitySelector

* - runned ensure up to date.

* Revert "- runned ensure up to date."

This reverts commit ea9b4aed

* - runned ensure up to date.

* - runned ensure up to date.

* - added more enhancements: New "toInlined" functionality. Support for more complex double array types. apiBaseConfiguration is not sent completely for Api.init().

* - merge master

* - fix generated api bug in some cases for typescript fetch when no request params are present.

* - commented broken tests

* - fix generate samples analysis.

* update surefire to newer version

* - un-commenting test files with issues.

* factored similar utility functions in ExtendedCodegenProperty and ExtendedCodegenParameter.

Co-authored-by: Bruno Flamand <bflamand@stingray.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-10-27 16:35:02 +02:00
William Cheng
5e857e749d
add an option for configKey (#10707) 2021-10-27 15:07:41 +08:00
Maximilian Zellhofer
6bbafdfa30
Allow specification of configkey for microprofile clients (#10693) 2021-10-27 14:28:17 +08:00
cyangle
ae39d782e0
Update crystal client gitignore.mustache with shards related files (#10698) 2021-10-27 14:23:55 +08:00
Justin Black
3a667784ac
Adds ComposedSchema to store schema composed schemas (#10653)
* Adds ComposedSchema and the ability to set it in CodegenModel and CodegenProperty

* Adds ComposedSchemas class and adds getters and setters for it in schema implementors

* Adds and uses getComposedSchemas

* Makes method private

* Uses setComposedSchemas for CodegenParameter and CodegenResponse

* Samples regeneratoed, tweaked string representation

* Removes null default

* Removes anyOfProps, oneOfProps, allOfProps

* Removes unneeded line
2021-10-26 12:49:32 -07:00
Justin Black
8d490835b7
Adds setPrettyPrint and the reslver MethodValueResolver.INSTANCE (#10683) 2021-10-26 09:45:21 -07:00
Peter Leibiger
f1ab3edbc0
[dart] Fix pub server URL (#10695)
* replace private pub server with official pub server URL
2021-10-27 00:33:58 +08:00
cyangle
01a4569995
Remove .rspec and .rubycop.yml from crystal client (#10701) 2021-10-27 00:21:19 +08:00
rudolficzek
d1089d785c
fix import mappings for service in angular typescript (#10644)
* fix import mappings for service in angular typescript

* add unit test

* regenerated samples
2021-10-26 13:49:18 +02:00
itaru2622
97e079fde0
add no_proxy support to python client (#10648)
* add no_proxy support to python client

* add unittest for no_proxy supporting, python client

* update samples for no_proxy supporting, python client

* fix input parameter in samples/openapi3/.../tests_manual/test_extra_pool_config_options.py

* re-implement no_proxy support to python client according to PR conversation #10648

* re-update samples for no_proxy supporting, python client
2021-10-26 10:12:42 +02:00
WILLIAM CHENG
c59a987e00 update meta codegen 2021-10-25 13:44:34 +08:00
WILLIAM CHENG
3594b3452d Merge remote-tracking branch 'origin/5.4.x' into 6.0.x 2021-10-25 13:31:12 +08:00
WILLIAM CHENG
42f4e863b7 prepare 5.4.0-SNAPSHOT 2021-10-25 12:13:33 +08:00
William Cheng
378465702c
Prepare v5.3.1 in the master (#10681)
* prepare v5.3.1

* update doc

* update readme
2021-10-25 01:16:07 +08:00
William Cheng
bb124e1178
Prepare v5.3.0 release (#10680)
* prepare 5.3.0 release

* remove docker-tag-latest-release
v5.3.0
2021-10-24 22:22:29 +08:00
William Cheng
602cffbb13
[java][okhttp] Add CI tests for streaming (#10678)
* add ci tests for streaming

* use spaces instead of tabs

* update samples
2021-10-24 18:59:15 +08:00
William Cheng
fcef9fab63
update doc for java useAbstractionForFiles option (#10677) 2021-10-24 16:21:28 +08:00
William Cheng
8069d183f3
[Java] Add streaming endpoint support (#9813)
* add streaming endpoint support to java client

* update doc
2021-10-24 16:02:49 +08:00
WILLIAM CHENG
1cd591bf7d update doc 2021-10-24 12:28:46 +08:00
Troy P
91d0e2dad0
(fix #9673) This change introduces a flag to have tests generated under the pythonSrcRoot directory if it's specified. (#9674)
This change also introduces AssertJ as a new dependency.
2021-10-24 12:22:18 +08:00
William Cheng
2413783288
update build.gradle to work with gradle 7.x, add test (#10669) 2021-10-24 12:19:52 +08:00
William Cheng
ec2ed98269
better comment/docstrings in jersey2 apiclient (#10668) 2021-10-24 12:19:20 +08:00
William Cheng
bb37a71d06
update dependencies in build.sbt to newer versions (#10667) 2021-10-23 16:17:46 +08:00
Maciej Sitarz
2875c7e14d
Improve Apache Httpclient support (#10624)
* Move apache-httpclient templates to proper dir

* Add template for Gradle

* Fix few JavaDoc compile warnings

* Add properly generated samples

* Empty just trigger PR checks rebuild
2021-10-23 14:57:32 +08:00
cyangle
27459b5003
[crystal] Fix some issues in crystal client templates (#10629)
* Fix some issues in crystal client templates using google drive v3 oas3 api spec

* update crystal petstore sample code

* Address PR comments

Raises on unsupported feature
clean up extra new lines in partial_model_enum_class.mustache

* Use size instead of length

length is undefined for String or Array

* Fix typo

* Use default value instead of nil

* remove unused template file

* Use ::File instead of File as file type to avoid conflicts

The spec could also have a File model

* support file upload in multipart/form-data post body

* Revert breaking changes in api template

* Use double quotes to quote string values

single quotes are used for single char in crystal

* Update api_client to use global ::File and update petstore samples

* JSON Annotation Field key's value should be double quoted

* Handle nil values for form_params

* Remove default values from method definitions due to grammar error

* Fix integration tests
2021-10-23 11:34:08 +08:00
WILLIAM CHENG
afacdb229a Merge remote-tracking branch 'origin/master' into 6.0.x 2021-10-23 10:16:27 +08:00
William Cheng
7b7d7db0c7
[Java][okhttp] rename enum (#10642)
* rename java enum with uppercase

* add tests for snake case lambda

* update file header

* update feign templates with new enum names

* update okhttp template wth lambda

* fix tests
2021-10-23 10:15:30 +08:00
William Cheng
885a813f86
update java jersey2 dependencies (#10659) 2021-10-23 10:13:39 +08:00
Tomasz Prus
b1950dd488
[Python] Remove virtualenv deprecated option from test scripts. (#10666)
* [Python] Remove virtualenv deprecated option from test scripts.

* [Python/asyncio] create venv with Python 3.x
2021-10-22 17:32:44 -07:00
Jordan M. Adler
e7dace6099
[typescript] Add headers to ApiException (#10153) 2021-10-22 08:50:03 +02:00
WILLIAM CHENG
df197e4a91 Merge remote-tracking branch 'origin/master' into 6.0.x 2021-10-22 11:57:00 +08:00
William Cheng
37006f8a03
add snak case lambda (#10658) 2021-10-22 10:49:38 +08:00
William Cheng
681578d1b5
rename enum constants (#10631) 2021-10-22 09:26:48 +08:00
WILLIAM CHENG
e85c67edc7 Merge remote-tracking branch 'origin/master' into 6.0.x 2021-10-22 09:17:23 +08:00
William Cheng
fa5401be37
remove invalid arg in newer version of jvm (#10652) 2021-10-22 09:16:12 +08:00
Bilal Shaikh
4c8279e3f2
fix(NestJS): use correct typing for default headers (#10616)
* fix(NestJS):  use correct typing for default headers

closes #10615

* Update modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache

Co-authored-by: Alexey Makhrov <amakhrov@gmail.com>

* update

Co-authored-by: Alexey Makhrov <amakhrov@gmail.com>
2021-10-21 07:57:31 +02:00
Arturo
108e8e513a
add try-with-resources statement to unclosed streams (#10641) 2021-10-21 11:08:27 +08:00
William Cheng
0a003c39b2
[TS] fix CI failure by installing node v16 (#10649)
* install node v16 instead of latest stable

* fix install

* fix install

* fix typo
2021-10-21 01:06:23 +08:00
AlexMog
c16562995b
fix: missing typescript local variable name 'from' (#10587)
Co-authored-by: Alexandre Moghrabi <alexandre.moghrabi@circular.xyz>
2021-10-19 21:45:08 +02:00
Vesa Poikajärvi
124511e7be
[typescript-axios] Update to Axios 0.23.0 (#10626)
* [typescript-axios] Update Axios to 0.23.0

BREAKING CHANGE: Axios 0.23.0 has a breaking TypeScript defintion change
which is incompatible with older versions of Axios.

* [typescript-axios] Update samples

* [typescript-axios] Use default binding for config to support older versions

With 2 generics arguments and leaving the AxiosRequestConfig arguments to it's
default the generated code can work both with 0.23.0 and older versions
2021-10-19 07:55:39 +02:00
William Cheng
730636ad31 Merge remote-tracking branch 'origin' into 6.0.x 2021-10-19 12:55:59 +08:00
Hugo Alves
ff286aa06f
[Java][Feign] Add http status to feign result (#10583)
* Add .circleci/config.yml

* Add Http status to the feign response wrapper

* Add Http status to the feign response wrapper

* Add Http status to the feign response wrapper

Fix typo

* Add Http status to the feign response wrapper

Fix typo

* Rename HttpResponse to ApiResponse
2021-10-19 00:04:32 +08:00
Yuriy Belenko
357f186c4e
[php-slim4] Migrate PHPUnit config (#10230)
* Migrate PHPUnit9 config file template

* Refresh samples
2021-10-17 18:19:43 +08:00
Yuriy Belenko
9f92322b90
[php-slim4] Bump required PHP version to 7.3 (#10228)
* Change minimum PHP version to 7.3

* Refresh samples

* Remove PHP8 notice from readme

Signed-off-by: Yuriy Belenko <yura-bely@mail.ru>
2021-10-17 18:19:14 +08:00
William Cheng
1bffeef146
Add links to Youtube videos on openapi-generator (#10612) 2021-10-17 18:13:01 +08:00
Richard Willis
a7ace4fb56
Add link to TypeScript/Fetch article (#10611) 2021-10-17 15:15:33 +08:00
Eric Durand-Tremblay
11bfc66782
Issue #10591 kotlin enum defaultValue (#10592)
* Issue #10591 kotlin enum defaultValue

* Updated sample

* Register sample

Co-authored-by: Eric Durand-Tremblay <etremblay@kronostechnologies.com>
2021-10-16 13:47:31 +08:00
Benjamin Heiss
69452360ab
Issue-7869: Update to Guzzle 7, removed all deprecated Guzzle\Psr7 function calls by their static counterparts and updated FakeHttpClient interface to Guzzle7 client (#10585)
Co-authored-by: Benjamin <Benjamin.Heiss@tngtech.com>
2021-10-16 13:24:11 +08:00