Philzen 2b9949a66b
Bump Jackson to latest v2.17.1 and sync in templates (#18799)
* Drop separate version property

Not required as all Jackson packages usually tether on a version bump.

* Update Jackson to v2.17.1

* Sync Jackson version used by Spring Boot with project version

* Sync jackson update to v2.17.1 with generator templates

* Regenerate samples with updated versions

* Adjust test to current exception msg behavior

* Add dependency mgmt to ensure matching version for transitive dependencies

* Update library descriptions with correct Jackson version number

* Update library descriptions with correct GSON and JSONB versions

* Update retrofit library description with correct version number

* Update retrofit description to include Jackson as an option

This should have been done as part of in #16853.

* Update remaining libary version descriptions with correct versions

* Generate updated doc
2024-06-02 15:17:38 +08:00
..
2024-05-20 17:27:17 +08:00
2021-09-09 12:49:03 +08:00
2021-08-17 18:37:51 +08:00

petstore-feign-no-nullable

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>petstore-feign-no-nullable</artifactId>
    <version>1.0.0</version>
    <scope>compile</scope>
</dependency>

And to use the api you can follow the examples bellow:


    //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.

Author