[Java][Resttemplate] Normalize the RestTemplate ApiClient (#14845)

* Normalize resttemplate

* Update samples
This commit is contained in:
Jorge Rodríguez Martín 2023-03-08 16:57:05 +01:00 committed by GitHub
parent c81ff5801d
commit 9705617f93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 0 additions and 48 deletions

View File

@ -81,7 +81,6 @@ import {{invokerPackage}}.auth.OAuth;
{{/hasOAuthMethods}}
{{>generatedAnnotation}}
@Component("{{invokerPackage}}.ApiClient")
public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
public enum CollectionFormat {
CSV(","), TSV("\t"), SSV(" "), PIPES("|"), MULTI(null);
@ -115,7 +114,6 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
init();
}
@Autowired
public ApiClient(RestTemplate restTemplate) {
this.restTemplate = restTemplate;
init();

View File

@ -27,7 +27,6 @@ import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
{{>generatedAnnotation}}
@Component("{{package}}.{{classname}}")
{{#operations}}
public class {{classname}} {
private ApiClient apiClient;
@ -36,7 +35,6 @@ public class {{classname}} {
this(new ApiClient());
}
@Autowired
public {{classname}}(ApiClient apiClient) {
this.apiClient = apiClient;
}

View File

@ -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();

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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();

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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();

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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();

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}