mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-08 13:36:11 +00:00
Add test cases to cover different collection formats (#3640)
* add test cases to cover different collection format * add space params to retrofit 1.x * add space params to retrofit 2.x * rename url to localVarUrl * fix exception in haskell servant
This commit is contained in:
@@ -17,6 +17,7 @@ Method | HTTP request | Description
|
||||
[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-paramters |
|
||||
|
||||
|
||||
<a name="createXmlItem"></a>
|
||||
@@ -588,3 +589,53 @@ No authorization required
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testQueryParameterCollectionFormat"></a>
|
||||
# **testQueryParameterCollectionFormat**
|
||||
> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context)
|
||||
|
||||
|
||||
|
||||
To test the collection format in query parameters
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import org.openapitools.client.ApiClient;
|
||||
//import io.restassured.builder.RequestSpecBuilder;
|
||||
//import io.restassured.filter.log.ErrorLoggingFilter;
|
||||
|
||||
FakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier(
|
||||
() -> new RequestSpecBuilder()
|
||||
.setBaseUri("http://petstore.swagger.io:80/v2"))).fake();
|
||||
|
||||
api.testQueryParameterCollectionFormat()
|
||||
.pipeQuery(pipe)
|
||||
.ioutilQuery(ioutil)
|
||||
.httpQuery(http)
|
||||
.urlQuery(url)
|
||||
.contextQuery(context).execute(r -> r.prettyPeek());
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pipe** | [**List<String>**](String.md)| | [default to new ArrayList<String>()]
|
||||
**ioutil** | [**List<String>**](String.md)| | [default to new ArrayList<String>()]
|
||||
**http** | [**List<String>**](String.md)| | [default to new ArrayList<String>()]
|
||||
**url** | [**List<String>**](String.md)| | [default to new ArrayList<String>()]
|
||||
**context** | [**List<String>**](String.md)| | [default to new ArrayList<String>()]
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
Reference in New Issue
Block a user