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
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
ふぁ
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
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
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
Jonathan Ballet
cec5b8965a
python: type generated client using Self ( #16693 )
...
* python: type generated client using Self
This doesn't offer a clear win but this helps for:
* Using modern types and making the typing intent clearer
* Decreasing the need for `from __future__ import annotations`, since a
class can now refer to itself without using its name
* Using more `cls` to automatically refer to the class, instead of
respecifying the class name every time
Self is available from Python 3.11 and is provided in typing_extensions
(since 4.0.0) as a fallback for older versions
See: https://peps.python.org/pep-0673/
See: https://github.com/python/typing_extensions/blob/main/CHANGELOG.md#added-in-version-400
* generate code
2023-10-01 23:31:39 +08:00
William Cheng
3fcf5584c6
Add tests for python client with disallowAdditionalPropertiesIfNotPresent set to true ( #16690 )
...
* add tests for python client with different option
* update samples
* update tests
2023-10-01 17:34:52 +08:00