forked from openapi-generators/openapi-python-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 0 boilerplate sync and async client objects
With the current approach, for every API call, the user has to import a a module from a tag package and call the `asyncio` or `sync` method with the "client=client" argument. This patch adds a wrapper around tag packages and two wrapper `Client` objects to spare the need for that boilerplate code. Check this issue for more information: openapi-generators#224 `base_url` can be omitted during client initialization if `SPEC_TITLE_BASE_URL` is set. Object-oriented clients have also been renamed to include the spec title.
- Loading branch information
Showing
28 changed files
with
1,617 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
""" A client library for accessing My Test API """ | ||
from .client import AuthenticatedClient, Client | ||
|
||
from .wrapper import MyTestAPIClient, SyncMyTestAPIClient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from . import ( | ||
defaults_tests_defaults_post, | ||
get_basic_list_of_booleans, | ||
get_basic_list_of_floats, | ||
get_basic_list_of_integers, | ||
get_basic_list_of_strings, | ||
get_user_list, | ||
int_enum_tests_int_enum_post, | ||
json_body_tests_json_body_post, | ||
no_response_tests_no_response_get, | ||
octet_stream_tests_octet_stream_get, | ||
optional_value_tests_optional_query_param, | ||
test_inline_objects, | ||
token_with_cookie_auth_token_with_cookie_get, | ||
unsupported_content_tests_unsupported_content_get, | ||
upload_file_tests_upload_post, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.