195 Commits

Author SHA1 Message Date
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
William Cheng
4c4d0e485a
[java] Update logback to newer versions (#17259)
* update logback to newer versions

* update
2023-11-30 18:51:46 +08:00
William Cheng
8e36014ae6 update samples 2023-11-19 17:36:25 +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
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
William Cheng
d9920a5b81 update samples 2023-11-16 00:56:05 +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
Robert Schweizer
e47e7041f7
[python][Feat] Deserialize error responses (#17038)
* refactor: Clean up _response_types_map formatting

It matches black's behavior of having trailing commas now.

* test: Add test to reproduce #16967

* fix: deserialize responses even if no returnType

Closes #16967

* refactor: Simplify ApiException subclasses

* refactor: Move exception subtype choice to ApiException

* feat: Deserialize error responses and add to exceptions

* test: Add for error responses with model
2023-11-16 00:37:04 +08:00
devhl-labs
dd4143b75e
[csharp] Added .net8 (#17075)
* added .net8

* change .net version in the github action

* upgrade manual sample
2023-11-15 15:35:02 +08:00
Segev Finer
a460b7ea87
[typescript-axios] Upgrade to axios@^1 (#14518)
* [typescript-axios] Upgrade to axios@^1

* Try fixing tests
2023-11-14 15:06:15 +01:00
Robert Schweizer
61fde48501
fix: Disable warnings for model_* properties (#17066)
For model classes with model_something fields, pydantic raises a warning by default:
`Field "model_something" has conflict with protected namespace "model_".`.

These warnings make no sense here, because most users of the generator have established APIs
that they cannot change to conform to pydantic's safety rules.

Pydantic will raise an error if we ever conflict with a current attribute like `model_dump`.
2023-11-14 21:50:35 +08:00
Rolf Rando
2ca958642b
Add socks5 proxy support for OpenAPI generated python client (#16918)
* add socks5 proxy support (requires additional import)

* updated examples

* build samples. updated to support pydantic python option

* rename sock to socks for correct protocol name

* add proxy headers for pydantic

* fixed param changes from conflict resolution
2023-11-14 12:28:05 +08:00
OliverTetzTT
d1b148a7d3
[python] added handling for boolean content type (#17020)
* added handling for boolean content type

* adapted addition to newer version of template

* [python] updated samples
2023-11-14 11:30:10 +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
William Cheng
f83e4ffb9b update PS samples 2023-11-13 08:55:52 +08:00
William Cheng
372894dd1d
Add powershell echo test, rename api key names (#17043)
* add powershell echo test, rename api key names

* update
2023-11-13 00:09:46 +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
Meo
ced9660123
[ts][axios] fix bugs in base.ts (#16997)
* Update base.ts

* update base.ts

* update mustache template

* update samples

---------

Co-authored-by: yangqiuyi <yangqiuyi@yaocheng.cn>
2023-11-07 18:07:15 +01: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
849cf88ba7
Update C# dependencies to newer versions, update reserved word list (#16996)
* update c# dep to newer versions, update reserved word list

* update doc, list
2023-11-07 12:32:23 +08:00
Robert Schweizer
65ccf0492c
fix: Raise exceptions on non-2xx responses (#16999) 2023-11-07 10:44:45 +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
Charles Treatman
db9fd9a094
[Go] validate required fields when unmarshalling JSON (#16863)
* validate required properties when unmarshalling JSON

* build project & update samples

* Add test for required field validation
2023-11-04 22:58:25 +08:00
Yohei Kitamura
61629ae8ed
[python] Add back __enter__ and __exit__ methods for non asyncio (#16979) 2023-11-04 16:54:17 +08:00
Ian Cubbon
83822d269a
[Bug][Go][Client] Downloaded File Does Not Exist When Returned to Caller (#16954)
* Keep the file that gets written out to by the client->decode function

* Update the echo-api test case to check the file returned exists
2023-11-02 11:46:15 +08:00
Mark Haley
a4267ee630
fix parameters_to_url_query returns booleans with upper letter (#16947)
* chore: add test to show python bool url params are not lower case

* fix: python parameters_to_url_query template to properly detect booleans

* fix: typo in test

* fix: typo in test

* chore: update test name to snake case and be more descriptive
2023-11-01 23:30:32 +08:00
William Cheng
8d76ab9511
[Go] Add multiple file upload support (#16956)
* add go echo api client github workflow

* add support for multi file upload in go client

* update go samples
2023-11-01 11:35:25 +08:00
Cameron Koegel
c2a4163bdb
[typescript-axios] Fix Explode Query Parameters (#16898)
* [typescript-axios] Fix Explode Query Parameters

* use `paramName` instead of `baseName`

* add config, workflow and tests for echo api

* generate echo api sample

* update test dependencies and add gitignore

* update space in package json and regenerate samples

* remove tsc in test package

* update samples

* undo samples

* regenerate samples

* regenerate samples again
2023-11-01 09:41:06 +08:00
ふぁ
8827da8012
[python] fix typing for API responses (#16802)
* [python] remove _preload_content

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] remove _return_http_data_only

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] remove async_req

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] fix typing for API responses

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] update samples

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] fix AttributeError

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] remove _preload_content

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] fix response_type

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] fix typo

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] update simplify RESTClientObject

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] update split call_api into 4 functions

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] update samples

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] update improve stream

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] remove kwargs

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] update ApiResponse

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] add method for each return value

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] update test

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] update samples

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] update docs

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] add constantParams

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] fix ImportError

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] fix SyntaxError in RESTResponse

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] add ApiResponse model_config

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] fix when isBinary is str

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] update type

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] update samples

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] add rest with pydantic v1

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] update format

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] update format and type

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] add test

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] update type to pydantic strict type

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] remove leftover files

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] remove descriptions per field

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] add test

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] fix test

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] fix test

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] remove multiprocessing

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] update samples

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] add blank line to docstring

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] update docstring

Signed-off-by: ふぁ <yuki@yuki0311.com>

* [python] remove unwanted imports in rest

Signed-off-by: ふぁ <yuki@yuki0311.com>

---------

Signed-off-by: ふぁ <yuki@yuki0311.com>
2023-10-30 12:37:23 +08:00
Dawson Akins Conway
244a3b4c13
[ruby] Make File Downloads Threadsafe (#16876)
* Make Generated Ruby Code Threadsafe

* missed one

* Generate Samples
2023-10-28 20:31:18 +08:00
Torgil Folger
58f058f3e9
[csharp] RemoteCertificateValidationCallback was not called on async methods; resolves #14608 (#16886)
* Update ApiClient.mustache

added missing line in config mapping

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2023-10-28 20:29:38 +08:00
Šimon Lukašík
b13a1a05ef
[ruby|client] Fix unmarshalling errors of enums inside other objects (#16900)
* [ruby|client] Fix unmarshalling errors of enums inside other objects

Ruby|Client autogenerated model classes for Enums do not expose openapi_one_of
method. Instead they expose openapi_any_of method like:

      # List of class defined in anyOf (OpenAPI v3)
      def openapi_any_of
        [
          :String
        ]
      end

Both types (objects and enums) do respond to build() method.

* Regenerate samples
2023-10-27 00:55:33 +08:00
Ivan Giuliani
ae590c4712
[Ruby] Add support for populating a gem metadata (#16872)
* [Ruby] Add support for gems metadata

This defaults to an empty hash, but can be overridden with any custom
object by the callers via the `gemMetadata` property.

* Regenerate samples

The gemspecs files will now include a metadata field
2023-10-23 22:05:19 +08:00
Josh Raker
d1fa38e286
[BUG][GO] Add support for all +json and +xml suffixed media types (#16816)
* Add support for all +json and +xml suffixed media types to generated Go client

* Export JsonCheck and XmlCheck and add external tests

* Remove client_test.mustache
2023-10-17 00:47:09 +08:00
Josh Raker
c5d6884c63
[BUG][GO] Replace references to sw package with {{packageName}} in README template (#16812)
* Replace references to sw package with {{packageName}}

* Update samples
2023-10-15 10:37:27 +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
William Cheng
34265e52b1
add rule to skip xUnit1031 (#16804) 2023-10-12 15:56:27 +08:00
devhl-labs
2cfce7cd2d
version bump (#16657) 2023-10-11 16:16:06 +08:00
Robert Schweizer
2b6b3b0883
[python] Do not pydantic-validate function args twice (#16776)
* refactor: Use newlines in _with_http_info call

This prevents too-long lines and matches the style that
black would enforce.

* fix: Do not pydantic-validate function args twice

Closes #15757
2023-10-11 13:57:52 +08:00
Robert Schweizer
7af459396c
docs: Improve docstring in to_dict() method (#16777)
It was often confusing to me why this method is even there.

Also using more line breaks and matching how black would format this.
2023-10-11 13:51:37 +08:00
Robert Schweizer
f03cbea971
feat: Add line breaks in Python API methods (#16770) 2023-10-10 18:32:52 +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
William Cheng
4a17c22905
fix object serializer, update tests in php nextgen (#16764) 2023-10-10 11:31:38 +08:00
Tiago
3e9dba01ee
Fix ruby httpx test (#16765)
* fix setup of body params (may be nil)

* fix httpx adapter issues

treating DNS resolution errors as ConnectionFailed; removing multipart header set by the openapi-generated code, as it does not contain boundary, and interferes with the generation from httpx, which appropriately deals with mime-types already
2023-10-10 11:31:08 +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