mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 01:12:43 +00:00
[Java][Resttemplate] Normalize the RestTemplate ApiClient (#14845)
* Normalize resttemplate * Update samples
This commit is contained in:
committed by
GitHub
parent
c81ff5801d
commit
9705617f93
@@ -58,7 +58,6 @@ import org.openapitools.client.auth.ApiKeyAuth;
|
||||
import org.openapitools.client.auth.OAuth;
|
||||
|
||||
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.ApiClient")
|
||||
public class ApiClient extends JavaTimeFormatter {
|
||||
public enum CollectionFormat {
|
||||
CSV(","), TSV("\t"), SSV(" "), PIPES("|"), MULTI(null);
|
||||
@@ -92,7 +91,6 @@ public class ApiClient extends JavaTimeFormatter {
|
||||
init();
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public ApiClient(RestTemplate restTemplate) {
|
||||
this.restTemplate = restTemplate;
|
||||
init();
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.api.PetApi")
|
||||
public class PetApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -36,7 +35,6 @@ public class PetApi {
|
||||
this(new ApiClient());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public PetApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.api.StoreApi")
|
||||
public class StoreApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -34,7 +33,6 @@ public class StoreApi {
|
||||
this(new ApiClient());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public StoreApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.api.UserApi")
|
||||
public class UserApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -35,7 +34,6 @@ public class UserApi {
|
||||
this(new ApiClient());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public UserApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,6 @@ import org.openapitools.client.auth.ApiKeyAuth;
|
||||
import org.openapitools.client.auth.OAuth;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.ApiClient")
|
||||
public class ApiClient extends JavaTimeFormatter {
|
||||
public enum CollectionFormat {
|
||||
CSV(","), TSV("\t"), SSV(" "), PIPES("|"), MULTI(null);
|
||||
@@ -92,7 +91,6 @@ public class ApiClient extends JavaTimeFormatter {
|
||||
init();
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public ApiClient(RestTemplate restTemplate) {
|
||||
this.restTemplate = restTemplate;
|
||||
init();
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.api.PetApi")
|
||||
public class PetApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -36,7 +35,6 @@ public class PetApi {
|
||||
this(new ApiClient());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public PetApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.api.StoreApi")
|
||||
public class StoreApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -34,7 +33,6 @@ public class StoreApi {
|
||||
this(new ApiClient());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public StoreApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.api.UserApi")
|
||||
public class UserApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -35,7 +34,6 @@ public class UserApi {
|
||||
this(new ApiClient());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public UserApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,6 @@ import org.openapitools.client.auth.ApiKeyAuth;
|
||||
import org.openapitools.client.auth.OAuth;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.ApiClient")
|
||||
public class ApiClient extends JavaTimeFormatter {
|
||||
public enum CollectionFormat {
|
||||
CSV(","), TSV("\t"), SSV(" "), PIPES("|"), MULTI(null);
|
||||
@@ -98,7 +97,6 @@ public class ApiClient extends JavaTimeFormatter {
|
||||
init();
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public ApiClient(RestTemplate restTemplate) {
|
||||
this.restTemplate = restTemplate;
|
||||
init();
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.api.AnotherFakeApi")
|
||||
public class AnotherFakeApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -34,7 +33,6 @@ public class AnotherFakeApi {
|
||||
this(new ApiClient());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public AnotherFakeApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.api.FakeApi")
|
||||
public class FakeApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -42,7 +41,6 @@ public class FakeApi {
|
||||
this(new ApiClient());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public FakeApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.api.FakeClassnameTags123Api")
|
||||
public class FakeClassnameTags123Api {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -34,7 +33,6 @@ public class FakeClassnameTags123Api {
|
||||
this(new ApiClient());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public FakeClassnameTags123Api(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.api.PetApi")
|
||||
public class PetApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -37,7 +36,6 @@ public class PetApi {
|
||||
this(new ApiClient());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public PetApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.api.StoreApi")
|
||||
public class StoreApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -34,7 +33,6 @@ public class StoreApi {
|
||||
this(new ApiClient());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public StoreApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.api.UserApi")
|
||||
public class UserApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -35,7 +34,6 @@ public class UserApi {
|
||||
this(new ApiClient());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public UserApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,6 @@ import org.openapitools.client.auth.ApiKeyAuth;
|
||||
import org.openapitools.client.auth.OAuth;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.ApiClient")
|
||||
public class ApiClient extends JavaTimeFormatter {
|
||||
public enum CollectionFormat {
|
||||
CSV(","), TSV("\t"), SSV(" "), PIPES("|"), MULTI(null);
|
||||
@@ -93,7 +92,6 @@ public class ApiClient extends JavaTimeFormatter {
|
||||
init();
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public ApiClient(RestTemplate restTemplate) {
|
||||
this.restTemplate = restTemplate;
|
||||
init();
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.api.AnotherFakeApi")
|
||||
public class AnotherFakeApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -34,7 +33,6 @@ public class AnotherFakeApi {
|
||||
this(new ApiClient());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public AnotherFakeApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.api.FakeApi")
|
||||
public class FakeApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -42,7 +41,6 @@ public class FakeApi {
|
||||
this(new ApiClient());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public FakeApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.api.FakeClassnameTags123Api")
|
||||
public class FakeClassnameTags123Api {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -34,7 +33,6 @@ public class FakeClassnameTags123Api {
|
||||
this(new ApiClient());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public FakeClassnameTags123Api(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.api.PetApi")
|
||||
public class PetApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -37,7 +36,6 @@ public class PetApi {
|
||||
this(new ApiClient());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public PetApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.api.StoreApi")
|
||||
public class StoreApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -34,7 +33,6 @@ public class StoreApi {
|
||||
this(new ApiClient());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public StoreApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
@Component("org.openapitools.client.api.UserApi")
|
||||
public class UserApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -35,7 +34,6 @@ public class UserApi {
|
||||
this(new ApiClient());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public UserApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user