Fix query parameters encoding in Java apache-httpclient (#14195)

* fix query parameters encoding in java apache-httpclient

* rearrange tests

* add new files
This commit is contained in:
William Cheng
2022-12-08 00:30:07 +08:00
committed by GitHub
parent 1b344597bf
commit b8b25e8ae0
65 changed files with 5642 additions and 12 deletions

View File

@@ -74,21 +74,22 @@ Please follow the [installation](#installation) instruction and execute the foll
import org.openapitools.client.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.QueryApi;
import org.openapitools.client.api.PathApi;
public class QueryApiExample {
public class PathApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure clients using the `defaultClient` object, such as
// overriding the host and port, timeout, etc.
QueryApi apiInstance = new QueryApi(defaultClient);
TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject = new HashMap(); // TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter |
PathApi apiInstance = new PathApi(defaultClient);
String pathString = "pathString_example"; // String |
Integer pathInteger = 56; // Integer |
try {
String result = apiInstance.testQueryStyleFormExplodeTrueArrayString(queryObject);
String result = apiInstance.testsPathStringPathStringIntegerPathInteger(pathString, pathInteger);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling QueryApi#testQueryStyleFormExplodeTrueArrayString");
System.err.println("Exception when calling PathApi#testsPathStringPathStringIntegerPathInteger");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -105,6 +106,10 @@ All URIs are relative to *http://localhost:3000*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*PathApi* | [**testsPathStringPathStringIntegerPathInteger**](docs/PathApi.md#testsPathStringPathStringIntegerPathInteger) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s)
*PathApi* | [**testsPathStringPathStringIntegerPathIntegerWithHttpInfo**](docs/PathApi.md#testsPathStringPathStringIntegerPathIntegerWithHttpInfo) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s)
*QueryApi* | [**testQueryIntegerBooleanString**](docs/QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s)
*QueryApi* | [**testQueryIntegerBooleanStringWithHttpInfo**](docs/QueryApi.md#testQueryIntegerBooleanStringWithHttpInfo) | **GET** /query/integer/boolean/string | Test query parameter(s)
*QueryApi* | [**testQueryStyleFormExplodeTrueArrayString**](docs/QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s)
*QueryApi* | [**testQueryStyleFormExplodeTrueArrayStringWithHttpInfo**](docs/QueryApi.md#testQueryStyleFormExplodeTrueArrayStringWithHttpInfo) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s)
*QueryApi* | [**testQueryStyleFormExplodeTrueObject**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s)