Skip to content

fix: Async example in generated README.md #337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Endpoint tags are now sanitized during parsing to fix an issue where `My Tag` and `MyTag` are seen as two different tags but are then later unified, causing errors when creating directories. Thanks @p1-ra! (#328)
- Parser will softly ignore value error during schema responses' status code convertion from string to integer (not a number). Errors will be reported to the end user and parsing will continue to proceed (#327).
- The generated `from_dict` and `to_dict` methods of models will now properly handle `nullable` and `not required` properties that are themselves generated models (#315). Thanks @forest-benchling!
- Fixed a typo in the async example in generated README.md files (#337). Thanks @synchronizing!
- Fix deserialization of `None` and `Unset` properties for all types by unifying the checks (#334). Thanks @forest-benchling!
- If duplicate model names are detected during generation, you'll now get an error message instead of broken code (#336). Thanks @forest-benchling!

Expand Down
2 changes: 1 addition & 1 deletion end_to_end_tests/golden-record-custom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Or do the same thing with an async version:

```python
from custom_e2e.models import MyDataModel
from custom_e2e.async_api.my_tag import get_my_data_model
from custom_e2e.api.my_tag import get_my_data_model
from custom_e2e.types import Response

my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
Expand Down
2 changes: 1 addition & 1 deletion end_to_end_tests/golden-record/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Or do the same thing with an async version:

```python
from my_test_api_client.models import MyDataModel
from my_test_api_client.async_api.my_tag import get_my_data_model
from my_test_api_client.api.my_tag import get_my_data_model
from my_test_api_client.types import Response

my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
Expand Down
2 changes: 1 addition & 1 deletion openapi_python_client/templates/README.md.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Or do the same thing with an async version:

```python
from {{ package_name }}.models import MyDataModel
from {{ package_name }}.async_api.my_tag import get_my_data_model
from {{ package_name }}.api.my_tag import get_my_data_model
from {{ package_name }}.types import Response

my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
Expand Down