Skip to content

Commit

Permalink
[getiem_all_of_bug]
Browse files Browse the repository at this point in the history
Updated test cases, docs and samples.
  • Loading branch information
the-akhil-nair committed May 26, 2022
1 parent 99dab08 commit a333e98
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1365,6 +1365,23 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/GmFruitNoProperties'
/fake/TxRxAllOfModel:
post:
tags:
- fake
operationId: txRxAllOfModel
responses:
200:
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/StreamOptions'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/StreamOptions'
servers:
- url: 'http://{server}.swagger.io:{port}/v2'
description: petstore server
Expand Down
6 changes: 3 additions & 3 deletions samples/client/petstore/python/test/test_child.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ def testChild(self):
self.assertEqual(
child._var_name_to_model_instances,
{
'radio_waves': [child, child_allof_instance, parent_instance],
'tele_vision': [child, child_allof_instance, parent_instance],
'inter_net': [child, child_allof_instance, parent_instance]
'radio_waves': [child, parent_instance],
'tele_vision': [child, parent_instance],
'inter_net': [child, child_allof_instance]
}
)
# model._additional_properties_model_instances stores a list of
Expand Down
6 changes: 3 additions & 3 deletions samples/client/petstore/python/test/test_dog.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ def testDog(self):
self.assertEqual(
dog._var_name_to_model_instances,
{
'breed': [dog, animal_instance, dog_allof_instance],
'class_name': [dog, animal_instance, dog_allof_instance],
'color': [dog, animal_instance, dog_allof_instance]
'breed': [dog, dog_allof_instance],
'class_name': [dog, animal_instance],
'color': [dog, animal_instance]
}
)
# model._additional_properties_model_instances stores a list of
Expand Down
1 change: 1 addition & 0 deletions samples/openapi3/client/petstore/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ Class | Method | HTTP request | Description
*FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
*FakeApi* | [**test_json_form_data**](docs/FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data
*FakeApi* | [**test_query_parameter_collection_format**](docs/FakeApi.md#test_query_parameter_collection_format) | **PUT** /fake/test-query-parameters |
*FakeApi* | [**tx_rx_all_of_model**](docs/FakeApi.md#tx_rx_all_of_model) | **POST** /fake/TxRxAllOfModel |
*FakeApi* | [**tx_rx_any_of_model**](docs/FakeApi.md#tx_rx_any_of_model) | **POST** /fake/TxRxAnyOfModel |
*FakeApi* | [**upload_download_file**](docs/FakeApi.md#upload_download_file) | **POST** /fake/uploadDownloadFile | uploads a file and downloads a file using application/octet-stream
*FakeApi* | [**upload_file**](docs/FakeApi.md#upload_file) | **POST** /fake/uploadFile | uploads a file using multipart/form-data
Expand Down
66 changes: 66 additions & 0 deletions samples/openapi3/client/petstore/python/docs/FakeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Method | HTTP request | Description
[**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
[**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data
[**test_query_parameter_collection_format**](FakeApi.md#test_query_parameter_collection_format) | **PUT** /fake/test-query-parameters |
[**tx_rx_all_of_model**](FakeApi.md#tx_rx_all_of_model) | **POST** /fake/TxRxAllOfModel |
[**tx_rx_any_of_model**](FakeApi.md#tx_rx_any_of_model) | **POST** /fake/TxRxAnyOfModel |
[**upload_download_file**](FakeApi.md#upload_download_file) | **POST** /fake/uploadDownloadFile | uploads a file and downloads a file using application/octet-stream
[**upload_file**](FakeApi.md#upload_file) | **POST** /fake/uploadFile | uploads a file using multipart/form-data
Expand Down Expand Up @@ -1794,6 +1795,71 @@ No authorization required

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **tx_rx_all_of_model**
> StreamOptions tx_rx_all_of_model()


### Example


```python
import time
import petstore_api
from petstore_api.api import fake_api
from petstore_api.model.stream_options import StreamOptions
from pprint import pprint
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = petstore_api.Configuration(
host = "http://petstore.swagger.io:80/v2"
)


# Enter a context with an instance of the API client
with petstore_api.ApiClient() as api_client:
# Create an instance of the API class
api_instance = fake_api.FakeApi(api_client)
stream_options = StreamOptions(None) # StreamOptions | (optional)

# example passing only required values which don't have defaults set
# and optional values
try:
api_response = api_instance.tx_rx_all_of_model(stream_options=stream_options)
pprint(api_response)
except petstore_api.ApiException as e:
print("Exception when calling FakeApi->tx_rx_all_of_model: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**stream_options** | [**StreamOptions**](StreamOptions.md)| | [optional]

### Return type

[**StreamOptions**](StreamOptions.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json


### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | success | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **tx_rx_any_of_model**
> GmFruitNoProperties tx_rx_any_of_model()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
from petstore_api.model.enum_test import EnumTest
from petstore_api.model.file_schema_test_class import FileSchemaTestClass
from petstore_api.model.gm_fruit_no_properties import GmFruitNoProperties
from petstore_api.model.stream_options import StreamOptions
from petstore_api.model.health_check_result import HealthCheckResult
from petstore_api.model.inline_additional_properties_ref_payload import InlineAdditionalPropertiesRefPayload
from petstore_api.model.mammal import Mammal
from petstore_api.model.number_with_validations import NumberWithValidations
from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps
from petstore_api.model.post_inline_additional_properties_payload_request import PostInlineAdditionalPropertiesPayloadRequest
from petstore_api.model.stream_options import StreamOptions
from petstore_api.model.string_enum import StringEnum
from petstore_api.model.user import User

Expand Down Expand Up @@ -1486,18 +1486,18 @@ def __init__(self, api_client=None):
},
api_client=api_client
)
self.tx_rx_any_of_model_endpoint = _Endpoint(
self.tx_rx_all_of_model_endpoint = _Endpoint(
settings={
'response_type': (GmFruitNoProperties,),
'response_type': (StreamOptions,),
'auth': [],
'endpoint_path': '/fake/TxRxAnyOfModel',
'operation_id': 'tx_rx_any_of_model',
'endpoint_path': '/fake/TxRxAllOfModel',
'operation_id': 'tx_rx_all_of_model',
'http_method': 'POST',
'servers': None,
},
params_map={
'all': [
'gm_fruit_no_properties',
'stream_options',
],
'required': [],
'nullable': [
Expand All @@ -1513,13 +1513,13 @@ def __init__(self, api_client=None):
'allowed_values': {
},
'openapi_types': {
'gm_fruit_no_properties':
(GmFruitNoProperties,),
'stream_options':
(StreamOptions,),
},
'attribute_map': {
},
'location_map': {
'gm_fruit_no_properties': 'body',
'stream_options': 'body',
},
'collection_format_map': {
}
Expand All @@ -1534,18 +1534,18 @@ def __init__(self, api_client=None):
},
api_client=api_client
)
self.tx_rx_all_of_model_endpoint = _Endpoint(
self.tx_rx_any_of_model_endpoint = _Endpoint(
settings={
'response_type': (StreamOptions,),
'response_type': (GmFruitNoProperties,),
'auth': [],
'endpoint_path': '/fake/TxRxAllOfModel',
'operation_id': 'tx_rx_all_of_model',
'endpoint_path': '/fake/TxRxAnyOfModel',
'operation_id': 'tx_rx_any_of_model',
'http_method': 'POST',
'servers': None,
},
params_map={
'all': [
'stream_options',
'gm_fruit_no_properties',
],
'required': [],
'nullable': [
Expand All @@ -1561,13 +1561,13 @@ def __init__(self, api_client=None):
'allowed_values': {
},
'openapi_types': {
'stream_options':
(StreamOptions,),
'gm_fruit_no_properties':
(GmFruitNoProperties,),
},
'attribute_map': {
},
'location_map': {
'stream_options': 'body',
'gm_fruit_no_properties': 'body',
},
'collection_format_map': {
}
Expand Down Expand Up @@ -3730,21 +3730,21 @@ def test_query_parameter_collection_format(
context
return self.test_query_parameter_collection_format_endpoint.call_with_http_info(**kwargs)

def tx_rx_any_of_model(
def tx_rx_all_of_model(
self,
**kwargs
):
"""tx_rx_any_of_model # noqa: E501
"""tx_rx_all_of_model # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.tx_rx_any_of_model(async_req=True)
>>> thread = api.tx_rx_all_of_model(async_req=True)
>>> result = thread.get()
Keyword Args:
gm_fruit_no_properties (GmFruitNoProperties): [optional]
stream_options (StreamOptions): [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
Expand Down Expand Up @@ -3777,7 +3777,7 @@ def tx_rx_any_of_model(
async_req (bool): execute request asynchronously
Returns:
GmFruitNoProperties
StreamOptions
If the method is called asynchronously, returns the request
thread.
"""
Expand Down Expand Up @@ -3806,19 +3806,23 @@ def tx_rx_any_of_model(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
return self.tx_rx_any_of_model_endpoint.call_with_http_info(**kwargs)
return self.tx_rx_all_of_model_endpoint.call_with_http_info(**kwargs)

def tx_rx_all_of_model(
def tx_rx_any_of_model(
self,
**kwargs
):
"""tx_rx_any_of_model # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.tx_rx_any_of_model(async_req=True)
>>> result = thread.get()
Keyword Args:
stream_options (StreamOptions): [optional]
gm_fruit_no_properties (GmFruitNoProperties): [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
Expand Down Expand Up @@ -3849,6 +3853,7 @@ def tx_rx_all_of_model(
in the spec for a single request.
Default is None
async_req (bool): execute request asynchronously
Returns:
GmFruitNoProperties
If the method is called asynchronously, returns the request
Expand Down Expand Up @@ -3879,7 +3884,7 @@ def tx_rx_all_of_model(
'_content_type')
kwargs['_host_index'] = kwargs.get('_host_index')
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
return self.tx_rx_all_of_model_endpoint.call_with_http_info(**kwargs)
return self.tx_rx_any_of_model_endpoint.call_with_http_info(**kwargs)

def upload_download_file(
self,
Expand Down

0 comments on commit a333e98

Please sign in to comment.