57 Commits

Author SHA1 Message Date
Simon Podlipsky
2327562af4
fix(php-nextgen): do not call static methods dynamically (#21163) 2025-04-29 15:29:52 +08:00
William Cheng
dbf720c093
Prepare 7.14.0 release (#21159)
* Revert "v7.13.0 release (#21157)"

This reverts commit 4b805ff6b7ac5bd2557555810357569fe2677311.

* prepare v7.14.0 release

* update samples
2025-04-27 22:04:03 +08:00
Juan Treminio
346231083f
[PHP] - Add FormDataProcessor to handle nested ModelInterface data (#20990)
* [PHP] - Add FormDataProcessor to handle nested ModelInterface data

* Generating samples

* Updates php-nextgen and psr-18

* Adds tests

* Some more tests

* One last test

* Updating files

* Fixing diff

* Test fix

* Updating samples
2025-04-23 15:16:47 +08:00
Juan Treminio
6b13ad522f
[PHP] - Add range HTTP code support (#20992)
* [PHP] - Add range HTTP code support

* Adding response body to 200

* Fix diff; update php-nextgen sample

* Working on unit tests

* Removes dangling files

* Finalize tests

* Remove dangling files

* Add tests for no response body exception
2025-04-07 00:50:58 +08:00
Juan Treminio
8f24df4165
[PHP] Fix converting objects to formdata (#20888)
* Output of CLI commands per PR comments

* Rebuilding PHP examples, PSR-18

* Rebuilding PHP examples

* Adds explanation for ::flatten_array(); optimized array_is_list pollyfill

* [PHP] Fix converting objects to formdata

* flatten_array -> flattenArray to match code style

* Adds unit test

* Revert "Output of CLI commands per PR comments"

This reverts commit 2eaa93731c354c9cb64a41187ba25a1b271cfdea.

* Includes php-nextgen; tightens up ::toFormValue()

* Missing ArrayAccess import

* Adds test for refactored ObjectSerializer::toFormValue()
2025-03-19 15:39:57 +08:00
Brian Ferri
cde0f551fc
[PHP-NEXTGEN] make allowable values enum getter static (#20820)
* [PHP-NEXTGEN] make allowable values enum getter static

* [PHP-NEXTGEN] make allowable values enum getter static
2025-03-08 16:39:48 +08:00
William Cheng
a79aad8420
Prepare 7.13.0 (#20758)
* Revert "v7.12.0 release"

This reverts commit 073723cb4d41187f839fbb46565d109293fa22d7.

* set version to v7.13.0-SNAPSHOT

* update samples

* update doc
2025-02-28 13:48:36 +08:00
Gijs Blanken
65df3c22b9
Rewrite the PHP Laravel generator (#20526)
* remove legacy laravel generator

* initial setup of my vision for the laravel generator

* update the php laravel samples

* update php laravel docs

* moved api validation into controller and handle edge cases presented by sample generation

* updated samples

* added php-laravel to github workflow php8 and removed php7 workflow as it only contained old laravel

* preemptive work to support union types as soon as php serde supports them

* updated samples

* update templates in accordance to samples output

* fix pipelines and update samples

* correct serde version

* fixed phpunit execution and updated samples

* added named routes

* remove

* readd samples

---------

Co-authored-by: gijs.blanken@futureof.finance <gijs.blanken@finly.nl>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-02-17 21:50:13 +08:00
Julian Vennen
a68ad56ea9
[php-*] Explicitly declare nullable parameters (#20524)
* [php-nextgen] Explicitly declare nullable parameters explicitly

* Fix some deprecation warnings in other php generators

* [php-nextgen] Fix PHP 8.4 deprecation warnings with nullable/optional array parameters
2025-01-23 18:06:15 +08:00
William Cheng
1fa07bf46c
Prepare 7.12.0 (#20512)
* Revert "v7.11.0 release (#20508)"

This reverts commit a7240eeefeedeefe7fc80ef22747dfc67e126324.

* prepare 7.12.0 snapshot version

* update samples

* update readme
2025-01-21 00:10:09 +08:00
Julian Vennen
3d2ff493e6
Use conditional access for enumref query params (#20418) 2025-01-09 13:22:43 +08:00
Julian Vennen
eceef28850
[PHP][php-nextgen] Improve method parameter typing (#20361)
* Fix #20354 - Nullable mixed type is not allowed

* Add parameter types for request and asyncWithHttpInfo functions
2024-12-21 15:53:51 +08:00
Julian Vennen
e87c4ea6c0
[PHP][php-nextgen] Fix usage of enums in parameters (#20294) 2024-12-16 19:19:24 +08:00
William Cheng
654f62ce3c
Prepare 7.11.0 (#20130)
* Revert "prepare 7.10.0 release (#20128)"

This reverts commit 12dfe8fe74a1515d1e69e00df9abe4128aa44160.

* update to 7.11.0-SNAPSHOT, update samples

* update docs
2024-11-18 20:15:29 +08:00
Julian Vennen
6bd3d53eee
[PHP/Dart/Python] Correctly escape strings in single quotes (Fixes #17582) (#19529)
* [PHP/Dart/Python] Correctly escape strings in single quotes (Fixes #17582)

* Move escapeTextInSingleQuotes method to DefaultCodegen, add docblock
2024-11-09 16:50:12 +08:00
William Cheng
e2c458b9ea
Prepare 7.10.0 (#19809)
* Revert "prepare 7.9.0 release (#19808)"

This reverts commit 4145000dfebe7a9edea4555c8515383da7602458.

* prepare 7.10.0 snapshot

* update doc

* update samples
2024-10-08 11:21:54 +08:00
kruegge82
5902af4e75
in case of defined status codes > 299 switch will have no effect. issue 7788 (#19483)
* in case of defined status codes > 299 switch will have no effect. As described in issue 7788

so we get only an error if statusCode is not defined AND not between 200 and 299

https://github.com/OpenAPITools/openapi-generator/issues/7788

* in case of defined status codes > 299 switch will have no effect. As described in issue 7788

so we get only an error if statusCode is not defined AND not between 200 and 299

https://github.com/OpenAPITools/openapi-generator/issues/7788
2024-10-07 16:01:36 +08:00
Imants Horsts
5e7cf1cfdd
By default should use static configuration class instance, otherwise new instance is created every time (#19775) 2024-10-05 14:57:08 +08:00
Julian Vennen
78f2f7010f
[PHP] Add missing qualifier for enum parameters (#19567) 2024-09-23 16:17:52 +08:00
Julian Vennen
a5384d42b4
[PHP] Remove NUMBER_ prefix from enum vars if a name is provided, show enum descriptions (#19555)
* Remove NUMBER_ prefix from enum vars if a name is provided, show enum descriptions

* Update php model tests
2024-09-16 17:23:11 +08:00
Sobhan Sharifi
0643f526af
Fix ObjectSerializer::isEmptyValue to not consider "0" as "" (#19472) 2024-09-02 16:03:36 +08:00
William Cheng
91da2fd240
Prepare 7.9.0 snapshot (#19386)
* Revert "v7.8.0 release (#19385)"

This reverts commit 6bdc452f92d49dcac7ac21dfe8751c8cc4267b98.

* update samples for v7.9.0-snapshot
2024-08-19 16:14:51 +08:00
Şerban Ghiţă
539aab05a7
[BUG] PHP Client - ObjectSerializer::buildQuery flattens array params resulting invalid URL params (param=a&param=b vs param[]=a&param[]=b) #19233 (#19236)
* [BUG] PHP Client - ObjectSerializer::buildQuery flattens array params resulting invalid URL params (param=a&param=b vs param[]=a&param[]=b) #19233

* Added tests (replaced old provider data). This looks like a breaking change

* Fix space

---------

Co-authored-by: Serban Ghita <serban.ghita@virta.global>
2024-08-07 17:15:59 +08:00
Emilien Escalle
7f551bb9a0
feat(php-nextgen-client): add support for streaming (#19192)
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2024-07-31 17:32:10 +08:00
Julian Vennen
3e263ce3fc
php: Fix typedoc comment for headers in ApiException (#19217) 2024-07-23 10:00:48 +08:00
William Cheng
20cfce0b4a
Prepare v7.8.0 (#19048)
* Revert "v7.7.0 release"

This reverts commit f3dd32385e02065ad298801ca11b8871bcb3a92a.

* prepare v7.8.0

* update readme

* update doc

* update samples
2024-07-02 16:45:53 +08:00
William Cheng
741bf0c035
Prepare 7.7.0-SNAPSHOT (#18709)
* Revert "7.6.0 release"

This reverts commit d76f9d32d11a03be2b40ebff728ef0ff86332fcb.

* prepare 7.7.0 snapshot in master

* update samples
2024-05-20 17:27:17 +08:00
Simon Podlipsky
98d026118c
feat(php): allow to pass raw boolean to api (#18520)
This allows users to use APIs that require booleans in query params not to be cast to int, e.g. `&foo=true`. Currently, `true` is cast to `1` so it's passed as `&foo=1`. That might not be supported by the target API.

The fix contains copy-pasted function from guzzlehttp/psr7 `Query::build()` with minor tweak.
2024-05-01 18:10:00 +08:00
William Cheng
807250a430
Prepare 7.6.0 (#18412)
* Revert "v7.5.0 release"

This reverts commit 1eafe2aebf33b13bee0ead66d62a6436e7db059d.

* update master to v7.6.0 snapshot

* update readme

* update samples
2024-04-17 19:05:37 +08:00
Viktor Szépe
172c4d11b4
Remove param tag for non-existent parameter in ObjectSerializer (#18347)
* Remove param tag for non-existent parameter in ObjectSerializer

* Remove all discriminator parameters
2024-04-11 13:17:15 +08:00
ふぁ
5e9546451c
[Python] Add echo_api test object serialization for multipart requests (#18176)
* [python] echo add test object serialization for multipart requests

* [echo api] update samples

* [echo api] update samples
2024-03-23 21:40:10 +08:00
William Cheng
4ff7e0ec3f
Prepare 7.5.0 snapshot (#18068)
* Revert "7.4.0 release"

This reverts commit eda049348425171df772a7b9087cc97db718cfda.

* prepare 7.5.0 snapshot version

* update samples

* update doc
2024-03-11 11:10:52 +08:00
Ross Bender
cf2435f335
Add support for controlling output of OpenAPI Generator version in generated files (#17952)
* add initial openapi config and java generated files

* add java implementation for adding generator version

* regenerate sample client files

* remove tabs

* only show generated version if build info exists

* set build info for batch generation

* update generator doc for new global flag

* use existing property for generator version

* update templates to include generator version

* update templates for better generator version syntax

* revert undesired changes

* regenerate samples for openapi client

* update templates to correct formatting/newlines

* correct description text and add to usage doc

* add generator cli option for all codegen types

* use more concise version info; update existing codegens to support new prop

* correct wrong prop reference

* add initial test coverage for new prop

* update last (scala) templates with new prop

* update samples after upstream merge

* use consistent version output

* use better sample project id/name

* revert using option for generator version in templates
2024-03-09 15:52:08 +08:00
Simon Podlipsky
ec42f88c6a
refactor(php): unify $hostSettings variable name (#17828) 2024-02-12 16:13:55 +08:00
Simon Podlipsky
f3ac4498df
refactor(php): use self::markTestIncomplete instead of instance calls (#17824)
It's reported by phpstan as `Dynamic call to static method PHPUnit\Framework\Assert::markTestIncomplete().`.

The method is static, therefore it should not be called from instance context.
2024-02-12 15:48:44 +08:00
Simon Podlipsky
1e9bccca16
feat: generate EOL in VERSION file (#17829)
The EOL is missing so let's add it in order to comply with POSIX standard:

Line
> A sequence of zero or more non- <newline> characters plus a terminating <newline> character.
2024-02-12 15:40:55 +08:00
William Cheng
783e68c7ac
7.4.0 snapshot (#17818)
* Revert "7.3.0-release (#17817)"

This reverts commit d617b46c86b9075c5e0d63fe3798e2982f5259ac.

* update samples, docs, readme
2024-02-08 16:07:22 +08:00
Jonathan
f323a3e788
[Python] deserialize enum json response (fix #17789) (#17791)
* deserialize enum json response (python)

* adapt python samples: adding enum deserialization

* add echo test for enum json response deserialization (python)

* update samples
2024-02-08 10:52:43 +08:00
William Cheng
d0187ab359
Add tests for query parameters (array of integer/string) (#17686)
* add tests for query parameters in python client

* update other samples

* update samples
2024-01-24 10:20:18 +08:00
Milad
8c014372aa
[Java RESTEasy client] updating test to use the Java RESTEasy echo api client (#17367) (#17470)
* updating test to use the Java RESTEasy echo api client (#17367)

* regenerated samples

* set source and target to 1.8 to fix workflow failure, adapted parser
2023-12-26 09:32:51 +08:00
William Cheng
5eab3cef19
Prepare 7.3.0-SNAPSHOT (#17456)
* Revert "v7.2.0 release (#17455)"

This reverts commit fe638d009363c142c246ff089032f243e0b4ee01.

* set version to 7.3.0-SNAPSHOT

* update doc
2023-12-22 16:55:58 +08:00
Viktor Szépe
39d5b4ebf9
Replace stray TAB characters with spaces (#17311)
* Replace stray TAB characters with spaces

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2023-12-05 18:01:25 +08:00
William Cheng
391df3b81c update samples 2023-12-05 15:36:33 +08:00
Artur Neumann
0098d56a6a
[PHP-NG] allow 'object' type in serializer (#17118) 2023-11-18 10:41:36 +08:00
Artur Neumann
f81d44bb29
[PHP-NG] check if json_decode was able to decode response (#17120) 2023-11-18 10:08:32 +08:00
Tomohiko Ozawa
37451fa569
[Java][resttemplate] Add test for bearer auth (#17081)
* add bearer auth API to echo-api

* run generate-samples.sh

* add resttemplate echo-api sample

* add bearer auth test

* remove @Ignore
2023-11-16 00:38:49 +08:00
William Cheng
53289263d9
Prepare v7.2.0 (#17050)
* update version to 7.2.0-SNAPSHOT

* update samples

* update doc
2023-11-13 18:53:20 +08:00
William Cheng
49208144e1
Better handling of allOf in request body (#16991)
* better handling of allOf in request body, add tests

* additional checks

* fix description
2023-11-05 22:43:45 +08:00
Yuriy Belenko
3bc4f67333
[php-nextgen] Remove deprecated @category phpdoc (#16829)
* [php-nextgen] Remove deprecated @category phpdoc

@category tag is deprecated accordingly to:
* [PhpDocumentor](https://docs.phpdoc.org/guide/references/phpdoc/tags/category.html)

* Refresh samples
2023-10-15 09:35:02 +08:00
Robert Schweizer
9e07f85eb5
[python] Add tests and fix enum path parameters (#16769)
* test: Tests for enum params in path, query and header

* fix: Get enum ref values correctly in path parameters

Closes #16688

* fix java tests failure

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2023-10-10 17:10:30 +08:00