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:
William Cheng
2024-01-24 10:20:18 +08:00
committed by GitHub
parent dccb147055
commit d0187ab359
69 changed files with 7538 additions and 3 deletions

View File

@@ -9,6 +9,8 @@ All URIs are relative to *http://localhost:3000*
| [**testQueryIntegerBooleanString**](QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) |
| [**testQueryStyleDeepObjectExplodeTrueObject**](QueryApi.md#testQueryStyleDeepObjectExplodeTrueObject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s) |
| [**testQueryStyleDeepObjectExplodeTrueObjectAllOf**](QueryApi.md#testQueryStyleDeepObjectExplodeTrueObjectAllOf) | **GET** /query/style_deepObject/explode_true/object/allOf | Test query parameter(s) |
| [**testQueryStyleFormExplodeFalseArrayInteger**](QueryApi.md#testQueryStyleFormExplodeFalseArrayInteger) | **GET** /query/style_form/explode_false/array_integer | Test query parameter(s) |
| [**testQueryStyleFormExplodeFalseArrayString**](QueryApi.md#testQueryStyleFormExplodeFalseArrayString) | **GET** /query/style_form/explode_false/array_string | Test query parameter(s) |
| [**testQueryStyleFormExplodeTrueArrayString**](QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) |
| [**testQueryStyleFormExplodeTrueObject**](QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s) |
| [**testQueryStyleFormExplodeTrueObjectAllOf**](QueryApi.md#testQueryStyleFormExplodeTrueObjectAllOf) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s) |
@@ -334,6 +336,130 @@ No authorization required
|-------------|-------------|------------------|
| **200** | Successful operation | - |
<a id="testQueryStyleFormExplodeFalseArrayInteger"></a>
# **testQueryStyleFormExplodeFalseArrayInteger**
> String testQueryStyleFormExplodeFalseArrayInteger(queryObject)
Test query parameter(s)
Test query parameter(s)
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.QueryApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost:3000");
QueryApi apiInstance = new QueryApi(defaultClient);
List<Integer> queryObject = Arrays.asList(); // List<Integer> |
try {
String result = apiInstance.testQueryStyleFormExplodeFalseArrayInteger(queryObject);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling QueryApi#testQueryStyleFormExplodeFalseArrayInteger");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **queryObject** | [**List&lt;Integer&gt;**](Integer.md)| | [optional] |
### Return type
**String**
### 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 | - |
<a id="testQueryStyleFormExplodeFalseArrayString"></a>
# **testQueryStyleFormExplodeFalseArrayString**
> String testQueryStyleFormExplodeFalseArrayString(queryObject)
Test query parameter(s)
Test query parameter(s)
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.QueryApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost:3000");
QueryApi apiInstance = new QueryApi(defaultClient);
List<String> queryObject = Arrays.asList(); // List<String> |
try {
String result = apiInstance.testQueryStyleFormExplodeFalseArrayString(queryObject);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling QueryApi#testQueryStyleFormExplodeFalseArrayString");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **queryObject** | [**List&lt;String&gt;**](String.md)| | [optional] |
### Return type
**String**
### 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 | - |
<a id="testQueryStyleFormExplodeTrueArrayString"></a>
# **testQueryStyleFormExplodeTrueArrayString**
> String testQueryStyleFormExplodeTrueArrayString(queryObject)