forked from loafle/openapi-generator-original
Add tests for query parameters (array of integer/string) (#17686)
* add tests for query parameters in python client * update other samples * update samples
This commit is contained in:
@@ -9,6 +9,8 @@ Method | HTTP request | Description
|
||||
[**test_query_integer_boolean_string**](QueryApi.md#test_query_integer_boolean_string) | **GET** /query/integer/boolean/string | Test query parameter(s)
|
||||
[**test_query_style_deep_object_explode_true_object**](QueryApi.md#test_query_style_deep_object_explode_true_object) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s)
|
||||
[**test_query_style_deep_object_explode_true_object_all_of**](QueryApi.md#test_query_style_deep_object_explode_true_object_all_of) | **GET** /query/style_deepObject/explode_true/object/allOf | Test query parameter(s)
|
||||
[**test_query_style_form_explode_false_array_integer**](QueryApi.md#test_query_style_form_explode_false_array_integer) | **GET** /query/style_form/explode_false/array_integer | Test query parameter(s)
|
||||
[**test_query_style_form_explode_false_array_string**](QueryApi.md#test_query_style_form_explode_false_array_string) | **GET** /query/style_form/explode_false/array_string | Test query parameter(s)
|
||||
[**test_query_style_form_explode_true_array_string**](QueryApi.md#test_query_style_form_explode_true_array_string) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s)
|
||||
[**test_query_style_form_explode_true_object**](QueryApi.md#test_query_style_form_explode_true_object) | **GET** /query/style_form/explode_true/object | Test query parameter(s)
|
||||
[**test_query_style_form_explode_true_object_all_of**](QueryApi.md#test_query_style_form_explode_true_object_all_of) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s)
|
||||
@@ -356,6 +358,138 @@ 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)
|
||||
|
||||
# **test_query_style_form_explode_false_array_integer**
|
||||
> str test_query_style_form_explode_false_array_integer(query_object=query_object)
|
||||
|
||||
Test query parameter(s)
|
||||
|
||||
Test query parameter(s)
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import openapi_client
|
||||
from openapi_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://localhost:3000
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = openapi_client.Configuration(
|
||||
host = "http://localhost:3000"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with openapi_client.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = openapi_client.QueryApi(api_client)
|
||||
query_object = [56] # List[int] | (optional)
|
||||
|
||||
try:
|
||||
# Test query parameter(s)
|
||||
api_response = api_instance.test_query_style_form_explode_false_array_integer(query_object=query_object)
|
||||
print("The response of QueryApi->test_query_style_form_explode_false_array_integer:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling QueryApi->test_query_style_form_explode_false_array_integer: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**query_object** | [**List[int]**](int.md)| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**str**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: text/plain
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
# **test_query_style_form_explode_false_array_string**
|
||||
> str test_query_style_form_explode_false_array_string(query_object=query_object)
|
||||
|
||||
Test query parameter(s)
|
||||
|
||||
Test query parameter(s)
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import time
|
||||
import os
|
||||
import openapi_client
|
||||
from openapi_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://localhost:3000
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = openapi_client.Configuration(
|
||||
host = "http://localhost:3000"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with openapi_client.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = openapi_client.QueryApi(api_client)
|
||||
query_object = ['query_object_example'] # List[str] | (optional)
|
||||
|
||||
try:
|
||||
# Test query parameter(s)
|
||||
api_response = api_instance.test_query_style_form_explode_false_array_string(query_object=query_object)
|
||||
print("The response of QueryApi->test_query_style_form_explode_false_array_string:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling QueryApi->test_query_style_form_explode_false_array_string: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**query_object** | [**List[str]**](str.md)| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**str**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: text/plain
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Successful operation | - |
|
||||
|
||||
[[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)
|
||||
|
||||
# **test_query_style_form_explode_true_array_string**
|
||||
> str test_query_style_form_explode_true_array_string(query_object=query_object)
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**values** | **List[int]** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from openapi_client.models.test_query_style_form_explode_true_array_integer_query_object_parameter import TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter from a JSON string
|
||||
test_query_style_form_explode_true_array_integer_query_object_parameter_instance = TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
test_query_style_form_explode_true_array_integer_query_object_parameter_dict = test_query_style_form_explode_true_array_integer_query_object_parameter_instance.to_dict()
|
||||
# create an instance of TestQueryStyleFormExplodeTrueArrayIntegerQueryObjectParameter from a dict
|
||||
test_query_style_form_explode_true_array_integer_query_object_parameter_form_dict = test_query_style_form_explode_true_array_integer_query_object_parameter.from_dict(test_query_style_form_explode_true_array_integer_query_object_parameter_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user