mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-19 20:57:08 +00:00
* Remove Imports of `Locale` from all `model.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Remove Imports of `Locale` from all `modelEnum.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Remove Imports of `Locale` from all `oneof_model.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Remove Imports of `Locale` from all `api.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Remove Imports of `Locale` from all `anyof_model.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Remove Imports of `Locale` from all `pojo.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Remove Imports of `Locale` from all `ApiClient.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Remove Imports of `Locale` from all `ApiKeyAuth.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Remove Imports of `Locale` from all `JSON.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Remove Imports of `Locale` from all `HttpSignatureAuth.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Remove Imports of `Locale` from all `Play24CallFactory.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Remove Imports of `Locale` from all `Play25CallFactory.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Remove Imports of `Locale` from all `Play26CallFactory.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Remove Imports of `Locale` from all `apiException.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Remove Imports of `Locale` from all `clientConfiguration.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Remove Imports of `Locale` from all `RequestFactory.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Remove Imports of `Locale` from all `httpLoggingFilter.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Remove Imports of `Locale` from all `securityApiUtils.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Remove Imports of `Locale` from all `validatorUtils.mustache`-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Use `Locale`-class Via Fully Qualified Name Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Update Generated 'sample'-files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Revert Changes * Inline `Locale` Imports Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Update Generated 'source' Files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Update `kotlin-spring/model.mustache` Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Update Generated 'sample' Files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Update Generated 'sample' Files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Update Generated 'java-feign-hc5' Sample Files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Update Generated Sample Files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> * Update Generated Kotlin Sample Files Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com> --------- Signed-off-by: Chrimle <28791817+Chrimle@users.noreply.github.com>
echo-api-feign-json
Requirements
Building the API client library requires Maven to be installed.
Installation & Usage
To install the API client library to your local Maven repository, simply execute:
mvn install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn deploy
Refer to the official documentation for more information.
After the client library is installed/deployed, you can use it in your Maven project by adding the following to your pom.xml:
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>echo-api-feign-json</artifactId>
<version>0.1.0</version>
<scope>compile</scope>
</dependency>
And to use the api you can follow the examples below:
//Set bearer token manually
ApiClient apiClient = new ApiClient("petstore_auth_client");
apiClient.setBasePath("https://localhost:8243/petstore/1/");
apiClient.setAccessToken("TOKEN", 10000);
//Use api key
ApiClient apiClient = new ApiClient("api_key", "API KEY");
apiClient.setBasePath("https://localhost:8243/petstore/1/");
//Use http basic authentication
ApiClient apiClient = new ApiClient("basicAuth");
apiClient.setBasePath("https://localhost:8243/petstore/1/");
apiClient.setCredentials("username", "password");
//Oauth password
ApiClient apiClient = new ApiClient("oauth_password");
apiClient.setBasePath("https://localhost:8243/petstore/1/");
apiClient.setOauthPassword("username", "password", "client_id", "client_secret");
//Oauth client credentials flow
ApiClient apiClient = new ApiClient("oauth_client_credentials");
apiClient.setBasePath("https://localhost:8243/petstore/1/");
apiClient.setClientCredentials("client_id", "client_secret");
PetApi petApi = apiClient.buildClient(PetApi.class);
Pet petById = petApi.getPetById(12345L);
System.out.println(petById);
}
Recommendation
It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.