Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated{{#asyncio}}
Expand Down Expand Up @@ -47,7 +48,7 @@ class {{classname}}(object):
{{/asyncio}}
@validate_arguments
def {{operationId}}(self, {{#allParams}}{{paramName}} : {{{vendorExtensions.x-py-typing}}}{{^required}} = None{{/required}}, {{/allParams}}{{#asyncio}}async_req: Optional[bool]=None, {{/asyncio}}**kwargs) -> {{#asyncio}}Union[{{{returnType}}}{{^returnType}}None{{/returnType}}, Awaitable[{{{returnType}}}{{^returnType}}None{{/returnType}}]]{{/asyncio}}{{^asyncio}}{{{returnType}}}{{^returnType}}None{{/returnType}}{{/asyncio}}: # noqa: E501
"""{{{summary}}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501
"""{{#isDeprecated}}(Deprecated) {{/isDeprecated}}{{{summary}}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501

{{#notes}}
{{{.}}} # noqa: E501
Expand Down Expand Up @@ -84,7 +85,7 @@ class {{classname}}(object):

@validate_arguments
def {{operationId}}_with_http_info(self, {{#allParams}}{{paramName}} : {{{vendorExtensions.x-py-typing}}}{{^required}} = None{{/required}}, {{/allParams}}**kwargs) -> ApiResponse: # noqa: E501
"""{{{summary}}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501
"""{{#isDeprecated}}(Deprecated) {{/isDeprecated}}{{{summary}}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501

{{#notes}}
{{{.}}} # noqa: E501
Expand Down Expand Up @@ -124,6 +125,10 @@ class {{classname}}(object):
:rtype: {{#returnType}}tuple({{.}}, status_code(int), headers(HTTPHeaderDict)){{/returnType}}{{^returnType}}None{{/returnType}}
"""

{{#isDeprecated}}
warnings.warn("{{{httpMethod}}} {{{path}}} is deprecated.", DeprecationWarning)

{{/isDeprecated}}
{{#servers.0}}
_hosts = [
{{#servers}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
```python
from __future__ import print_function
{{#apiInfo}}{{#apis}}{{#-last}}{{#hasHttpSignatureMethods}}import datetime{{/hasHttpSignatureMethods}}{{/-last}}{{/apis}}{{/apiInfo}}
import time
import {{{packageName}}}
Expand Down
1 change: 0 additions & 1 deletion samples/client/echo_api/python-nextgen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ Execute `pytest` to run the tests.
Please follow the [installation procedure](#installation--usage) and then run the following:

```python
from __future__ import print_function

import time
import openapi_client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ Execute `pytest` to run the tests.
Please follow the [installation procedure](#installation--usage) and then run the following:

```python
from __future__ import print_function
import datetime
import time
import petstore_api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down Expand Up @@ -508,7 +509,7 @@ def find_pets_by_tags(self, tags : Annotated[conlist(StrictStr, unique_items=Tru

@validate_arguments
def find_pets_by_tags(self, tags : Annotated[conlist(StrictStr, unique_items=True), Field(..., description="Tags to filter by")], async_req: Optional[bool]=None, **kwargs) -> Union[List[Pet], Awaitable[List[Pet]]]: # noqa: E501
"""Finds Pets by tags # noqa: E501
"""(Deprecated) Finds Pets by tags # noqa: E501

Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
Expand Down Expand Up @@ -539,7 +540,7 @@ def find_pets_by_tags(self, tags : Annotated[conlist(StrictStr, unique_items=Tru

@validate_arguments
def find_pets_by_tags_with_http_info(self, tags : Annotated[conlist(StrictStr, unique_items=True), Field(..., description="Tags to filter by")], **kwargs) -> ApiResponse: # noqa: E501
"""Finds Pets by tags # noqa: E501
"""(Deprecated) Finds Pets by tags # noqa: E501

Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
Expand Down Expand Up @@ -575,6 +576,8 @@ def find_pets_by_tags_with_http_info(self, tags : Annotated[conlist(StrictStr, u
:rtype: tuple(List[Pet], status_code(int), headers(HTTPHeaderDict))
"""

warnings.warn("GET /pet/findByTags is deprecated.", DeprecationWarning)

_params = locals()

_all_params = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down
1 change: 0 additions & 1 deletion samples/openapi3/client/petstore/python-nextgen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ Execute `pytest` to run the tests.
Please follow the [installation procedure](#installation--usage) and then run the following:

```python
from __future__ import print_function
import datetime
import time
import petstore_api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down Expand Up @@ -469,7 +470,7 @@ def find_pets_by_status_with_http_info(self, status : Annotated[conlist(StrictSt

@validate_arguments
def find_pets_by_tags(self, tags : Annotated[conlist(StrictStr, unique_items=True), Field(..., description="Tags to filter by")], **kwargs) -> List[Pet]: # noqa: E501
"""Finds Pets by tags # noqa: E501
"""(Deprecated) Finds Pets by tags # noqa: E501

Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
Expand Down Expand Up @@ -498,7 +499,7 @@ def find_pets_by_tags(self, tags : Annotated[conlist(StrictStr, unique_items=Tru

@validate_arguments
def find_pets_by_tags_with_http_info(self, tags : Annotated[conlist(StrictStr, unique_items=True), Field(..., description="Tags to filter by")], **kwargs) -> ApiResponse: # noqa: E501
"""Finds Pets by tags # noqa: E501
"""(Deprecated) Finds Pets by tags # noqa: E501

Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
Expand Down Expand Up @@ -534,6 +535,8 @@ def find_pets_by_tags_with_http_info(self, tags : Annotated[conlist(StrictStr, u
:rtype: tuple(List[Pet], status_code(int), headers(HTTPHeaderDict))
"""

warnings.warn("GET /pet/findByTags is deprecated.", DeprecationWarning)

_params = locals()

_all_params = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import re # noqa: F401
import io
import warnings

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated
Expand Down