150 Commits

Author SHA1 Message Date
Marc Weiß
76560e34c9
replace deprecated ISO8601Utils with StdDateFormat (#17052) 2024-01-11 18:24:52 +08:00
Jorge Rodríguez Martín
61c40474af
[BUG][java][resttemplate] Fix NPE when query param with value null is exploded (#17568)
* Fix NPE when query param with value null is exploded

* Polish

* Add test

* Update tests

* Add integration test
2024-01-10 23:39:41 +08:00
Hansjörg Oppermann
8bab0ceb53
Generated methode ApiClient.parameterToPairs failed to handle empty collections #17460 (#17463)
* #17460 add missing empty collection check

* generate samples
2024-01-10 02:29:10 +08:00
Steven Sheehy
209344ba40
[java][native] Fix ObjectMapper deprecation warnings (#17558)
* Fix ObjectMapper deprecation warnings

Signed-off-by: Steven Sheehy <steven.sheehy@swirldslabs.com>

* Fix missing JsonMapper import

Signed-off-by: Steven Sheehy <steven.sheehy@swirldslabs.com>

---------

Signed-off-by: Steven Sheehy <steven.sheehy@swirldslabs.com>
2024-01-09 16:37:59 +08:00
William Cheng
4acbd69c3d update samples 2024-01-06 15:29:09 +08:00
Ilamparithi Natarajan
ddc7d4b1b5
[java][resttemplate] rethrow original exception when retry limits exceeded (#17488)
in rest template, when the retry limits exceeded
rethrow the original exception

also add 429 (Too many requests) status code to the
retry logic

fix #17478
2024-01-05 09:57:24 +08:00
William Cheng
c215bc681d
better java resteasy echo api client tests (#17473) 2023-12-26 10:25:55 +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
dabdirb
e63563a8fc
fix #16889 replace deprecated response code function (#17405) 2023-12-15 13:41:14 +08:00
renaud-twd
a9179e95dd
fix: java apache httpclient should support UTF-8 by default (#17395)
* fix(java): apache-httpclient serialization error

fixes following related issue:
https://github.com/OpenAPITools/openapi-generator/issues/12797

* docs(java): update samples and docs
2023-12-15 09:01:10 +08:00
rubiniselvaraj
4c4388e3c8
Fix for handling error in resttemplate (#17381)
* Fix with handling error

* Fix with handling error
2023-12-13 12:56:02 +08:00
rubiniselvaraj
a792a79059
Implementing retry logic to restTemplate (#17375)
* Implementing retry logic to restTemplate

* Fixing the issue

* Adding import

* Fix

* Fix

* minor update, add tests

* fix

* Adding the maxRetryAttempt, threadWaitTime as additionalProperty

* Updating the apiClient

* Removing reduntant variable

* Generating samples

* Fixing format

---------

Co-authored-by: Rubini <rubini@Rubinis-MacBook-Air.local>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2023-12-12 22:01:36 +08:00
William Cheng
4c4d0e485a
[java] Update logback to newer versions (#17259)
* update logback to newer versions

* update
2023-11-30 18:51:46 +08:00
Tomohiko Ozawa
4bedeef643
[Java][apache-httpclient][feign][okhttp-gson] Enable access token refresh (#17086)
* add setter of bearer token supplier

* run generate-samples.sh

* add test of bearer auth
2023-11-18 12:46:18 +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
Charles Treatman
c8b3da7388
[Java][okhttp-gson] remove unreachable code from templates (#17057)
* Remove checks for jackson and jsonb from okhttp-gson templates

* regenerate samples
2023-11-14 11:13:28 +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
Charles Treatman
166ebc50b0
[Java][okhttp-gson] validateJsonElement does not validate enum values (#16865)
* validate enum properties in validateJsonElement

* regenerate samples

* add test for enum validation in okhttp-gson models
2023-11-08 14:14:48 +08:00
Marc Weiß
74163f0ac8
bump gson-fire to 1.9.0 (#17002) 2023-11-07 22:35:05 +08:00
Mann Patel
a31b38b223
Added some Test Cases (#16994)
* New Test Case Added to AndroidClientCodegenTest

* New Test Case Added to GenApiControllerTest

* New Test Case Added to BirdAndCategoryTest

* New Test Case Added to WorkflowSettingsTest

* Modified GenApiControllerTest

* Added Test case in JavascriptClientCodegenTest

* Modified BirdAndCategoryTest

* Modified BirdAndCategoryTest

---------

Co-authored-by: Mann <mn906219@dal.ca>
2023-11-07 13:11:35 +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
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
Robert Danci
87f9d53c3a
[Java][client] Fix feign classcastexception when getting headers (#16745)
* Avoid ClassCastException when getting headers (the header values are Collection<String> and not List<String>)
Delete unused classes

* Remove feign10x

* Add unit test
Refactor to avoid creating the headers map when ApiResponse is not used
2023-10-10 14:53:32 +08:00
martin-mfg
e3db882ed4
[JAVA][KOTLIN][SPRING] upgrade dependencies (#16759)
* upgrade spring-boot-starter-parent

* upgrade springdoc and swagger-ui

* upgrade v3 swagger-annotations

* generate samples

* upgrade jackson

* fix spring cloud, remove temp comment

Putting "8" instead of "1.8" should be ok, because Spring Boot 3 requires Java 17 anyway, so it should be able to understand that 8 is the same as 1.8.

* generate samples

* upgrade JUnit 5, remove commons-io dependency, remove outdated samples/client/petstore/java/feign/feign10x/ files, generate samples

commons-io dependency was introduced in https://github.com/OpenAPITools/openapi-generator/pull/8484, but I don't see why it would be needed now or back then.

* update gson, generate samples

* update logback

* update feign

* update scribejava

* generate samples

* update httpmime

* okhttp-gson: update commons-lang & okhttp & junit-platform, remove mockito; generate samples

It seems Mockito is not used at all there.

* okhttp-gson: remove unnecessary sample files, generate sample files

* upgrade google-api-client & jersey-common, restore ClientTest, generate samples

* misc. upgrades in jersey2 and jersey3

jersey 3.1.3 is available already, but IntelliJ reports security problems in 3.1.3 and 3.1.2, so I used 3.1.1 instead.

* align some gradle&sbt files with poms, generate samples

* whitespace fix
2023-10-09 14:55:32 +08:00
William Cheng
a1d00e4785
[Java][okhttp-gson] fix AWS auth issue (#16721)
* fix samples

* fix awsauth in okhttp gson java client

* update github workflow
2023-10-04 18:28:50 +08:00
Jan Gosmann
7087b332f0
Replace deprecated Gradle properties (#16695)
* destinationDir -> destinationDirectory (scheduled to be removed in Gradle 9.0)
* archiveName -> archiveFileName (removed in Gradle 8.0)

Cp. https://docs.gradle.org/current/userguide/upgrading_version_7.html
2023-10-04 16:24:05 +08:00
William Cheng
5e8e2d7f6d
Prepare v7.1.0 in master (#16608)
* prepare v7.1.0 in master

* update
2023-09-18 17:37:36 +08:00
William Cheng
5ee18156db
[Java-Feign]: model combining properties and additionalProperties (#16546)
* [Java-Feign]: model combining properties and additionalProperties (#6146)

* update samples

---------

Co-authored-by: François Dodé <francois.dode@dawex.com>
2023-09-09 16:11:54 +08:00
William Cheng
14cfca7b06
[java][feign] Update feign client dependencies to newer version (#16545)
* update javae feign client dependencies to new versions

* update feign
2023-09-09 15:39:02 +08:00
William Cheng
47a85e880b
Add tests for http basic authentication in python client (#16488)
* add tests for http basic auth in python client

* add new files
2023-09-03 19:11:53 +08:00
William Cheng
ebc9bcda44
[java][native] Add tests for oneOf form parameters (#16487)
* add tests for oneOf form parameters

* update samples
2023-09-03 16:15:54 +08:00
martin-mfg
20692aa891
Properly handle mappings and import mappings after processOpts (#16216)
* make Java imports overridable

* fix for other dateLibraries

* complete core fix

* adapt test - step 1/2

* add unit test

* adapt test - step 2/2

* remove accidentally added file

* final small clean-up
2023-08-30 13:48:51 +08:00
William Caine
134dc98a71
fix: Using Map.Entry to avoid "reference to Entry is ambiguous" (#16445)
* fix: Using Map.Entry to avoid "reference to Entry is ambiguous"

when spec defines a model Entry it conflicts.  Also rest of mustache
uses  Map.Entry to matching it

* fix: Map.Entry - update samples
2023-08-30 12:57:53 +08:00
William Cheng
80121aa88f
Prepare v7.0.1 (#16409)
* prepare 7.0.1 in master

* update doc
2023-08-25 16:11:29 +08:00
William Cheng
ff19825610
[java] Remove hardcoded arrays in template (#16340)
* remove hardcoded arrays in template

* better model import in java client

* update

* better code format

* minor refactoring

* update
2023-08-19 10:20:48 +08:00
William Cheng
e69c58623f update samples 2023-08-17 12:03:43 +08:00
Marc Miltenberger
7a7309edb8
Fix Java GSON client not accepting optional null arrays (#16213)
* Add check for null JSON array in GSON Java api client

* Update samples
2023-08-10 22:58:23 +08:00
Marc Miltenberger
adac3b127f
Support for multipart/form-data; charset="utf-8" in Java GSON Generator (#16211)
* Support for multipart/form-data; charset="utf-8"

Previously, it was only checked for an exact equal string, which failed when there were additional options such as charset.

* Update samples
2023-07-29 00:22:19 +08:00
Luca
584f8448ee
[Java][Native] Fix multipart builder files array (#16055) (#16094)
* [Java] Fixed bug in native client generation when API accepts array of files (#16055)

* Adding test for java native client

* Updated samples
2023-07-24 15:57:21 +08:00
William Cheng
7b3681af47
fix isMap (#16043) 2023-07-11 17:14:44 +08:00
karzang
e9d98666a1
[Java][Client] Fix #12556 Support primitives and arrays in oneOf (#13897)
* [Java][Client] Fix #12556 Support primitives and arrays in oneOf

* Regenerate petstore samples

* Regenerate petstore test samples

* Treat 'BigDecimal' as primtive datatype

* Fix integration tests
2023-06-29 16:46:55 +08:00
bcalvez
7a73f75f70
[java][okhttp-gson] Remove JAX-RS dependency from generated okhttp-gson java client (#15896)
* Remove JAX-RS dependency from generated okhttp-gson java client

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2023-06-27 16:53:10 +08:00
martin-mfg
dcc53c0d53
[Typescript][Scala][Postman][Java] fix errors with missing models, missing description, BigDecimal (#15809)
* various fixes

* generate samples
2023-06-27 16:20:21 +08:00
William Cheng
6788f43af0
Better handling of Inline schema (#15682)
* skip allOf inline subschema created as $ref

* add option for fallback

* add back atleastonemodel

* add log

* update java, kotlin, js samples

* update tests

* fix native client test

* fix java client errors by regenerating test files

* clean up python

* clean up powershell

* clean up php

* clean up ruby

* update erlang, elixir

* update dart samples

* update ts samples

* update r, go samples

* update perl

* update swift

* add back files

* add back files

* remove outdated test files

* fix test
2023-06-11 15:35:58 +08:00
Frederic Jones
59ba00e1f3
Add support for swagger2 in [java] client generators (#15456)
* Add support for swagger2 in java client generator

* Target 7.x.x

* Upstream changes
2023-06-06 15:41:12 +08:00
martin-mfg
e152799569
[JAVA] fix "text/plain" with charset specifications (#15399) 2023-05-11 16:47:42 +08:00
William Cheng
0c3460f95b Merge remote-tracking branch 'origin/master' into 7.0.x 2023-05-10 15:00:56 +08:00
Tiffany Marrel
8a6c708884
[Java] Cleanup documentation (#15300)
* [Java] fix documentation of API authorization in README files

fix hierarchy level + add internal links + align wording across generators

* [Java] fix anchor links in documentation
2023-05-10 14:14:44 +08:00
Beppe Catanese
3d2ec72461
[JAVA] Okhttp-gson: blank line between annotations and method signature (#15430)
* Remove extra blank line

* Regenerate samples
2023-05-08 14:39:46 +08:00