mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-03 08:46:55 +00:00
fix (JAVA SPRING RESTCLIENT) 19137: Fix missing imports when using withXml for Spring RestClient and fix its README (#19146)
This commit is contained in:
@@ -89,7 +89,7 @@ import org.openapitools.client.api.AuthApi;
|
||||
public class AuthApiExample {
|
||||
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
ApiClient defaultClient = new ApiClient();
|
||||
defaultClient.setBasePath("http://localhost:3000");
|
||||
|
||||
// Configure HTTP basic authorization: http_auth
|
||||
@@ -101,10 +101,10 @@ public class AuthApiExample {
|
||||
try {
|
||||
String result = apiInstance.testAuthHttpBasic();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
} catch (HttpStatusCodeException e) {
|
||||
System.err.println("Exception when calling AuthApi#testAuthHttpBasic");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Status code: " + e.getStatusCode().value());
|
||||
System.err.println("Reason: " + e.getResponseBodyAsString());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user