|
| 1 | +# petstore-native-jakarta |
| 2 | + |
| 3 | +OpenAPI Petstore |
| 4 | + |
| 5 | +- API version: 1.0.0 |
| 6 | + |
| 7 | +This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. |
| 8 | + |
| 9 | + |
| 10 | +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* |
| 11 | + |
| 12 | +## Requirements |
| 13 | + |
| 14 | +Building the API client library requires: |
| 15 | + |
| 16 | +1. Java 11+ |
| 17 | +2. Maven/Gradle |
| 18 | + |
| 19 | +## Installation |
| 20 | + |
| 21 | +To install the API client library to your local Maven repository, simply execute: |
| 22 | + |
| 23 | +```shell |
| 24 | +mvn clean install |
| 25 | +``` |
| 26 | + |
| 27 | +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: |
| 28 | + |
| 29 | +```shell |
| 30 | +mvn clean deploy |
| 31 | +``` |
| 32 | + |
| 33 | +Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. |
| 34 | + |
| 35 | +### Maven users |
| 36 | + |
| 37 | +Add this dependency to your project's POM: |
| 38 | + |
| 39 | +```xml |
| 40 | +<dependency> |
| 41 | + <groupId>org.openapitools</groupId> |
| 42 | + <artifactId>petstore-native-jakarta</artifactId> |
| 43 | + <version>1.0.0</version> |
| 44 | + <scope>compile</scope> |
| 45 | +</dependency> |
| 46 | +``` |
| 47 | + |
| 48 | +### Gradle users |
| 49 | + |
| 50 | +Add this dependency to your project's build file: |
| 51 | + |
| 52 | +```groovy |
| 53 | +compile "org.openapitools:petstore-native-jakarta:1.0.0" |
| 54 | +``` |
| 55 | + |
| 56 | +### Others |
| 57 | + |
| 58 | +At first generate the JAR by executing: |
| 59 | + |
| 60 | +```shell |
| 61 | +mvn clean package |
| 62 | +``` |
| 63 | + |
| 64 | +Then manually install the following JARs: |
| 65 | + |
| 66 | +- `target/petstore-native-jakarta-1.0.0.jar` |
| 67 | +- `target/lib/*.jar` |
| 68 | + |
| 69 | +## Getting Started |
| 70 | + |
| 71 | +Please follow the [installation](#installation) instruction and execute the following Java code: |
| 72 | + |
| 73 | +```java |
| 74 | + |
| 75 | +import org.openapitools.client.*; |
| 76 | +import org.openapitools.client.model.*; |
| 77 | +import org.openapitools.client.api.PetApi; |
| 78 | + |
| 79 | +public class PetApiExample { |
| 80 | + |
| 81 | + public static void main(String[] args) { |
| 82 | + ApiClient defaultClient = Configuration.getDefaultApiClient(); |
| 83 | + // Configure clients using the `defaultClient` object, such as |
| 84 | + // overriding the host and port, timeout, etc. |
| 85 | + PetApi apiInstance = new PetApi(defaultClient); |
| 86 | + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store |
| 87 | + try { |
| 88 | + Pet result = apiInstance.addPet(pet); |
| 89 | + System.out.println(result); |
| 90 | + } catch (ApiException e) { |
| 91 | + System.err.println("Exception when calling PetApi#addPet"); |
| 92 | + System.err.println("Status code: " + e.getCode()); |
| 93 | + System.err.println("Reason: " + e.getResponseBody()); |
| 94 | + System.err.println("Response headers: " + e.getResponseHeaders()); |
| 95 | + e.printStackTrace(); |
| 96 | + } |
| 97 | + } |
| 98 | +} |
| 99 | + |
| 100 | +``` |
| 101 | + |
| 102 | +## Documentation for API Endpoints |
| 103 | + |
| 104 | +All URIs are relative to *http://petstore.swagger.io/v2* |
| 105 | + |
| 106 | +Class | Method | HTTP request | Description |
| 107 | +------------ | ------------- | ------------- | ------------- |
| 108 | +*PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store |
| 109 | +*PetApi* | [**addPetWithHttpInfo**](docs/PetApi.md#addPetWithHttpInfo) | **POST** /pet | Add a new pet to the store |
| 110 | +*PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet |
| 111 | +*PetApi* | [**deletePetWithHttpInfo**](docs/PetApi.md#deletePetWithHttpInfo) | **DELETE** /pet/{petId} | Deletes a pet |
| 112 | +*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status |
| 113 | +*PetApi* | [**findPetsByStatusWithHttpInfo**](docs/PetApi.md#findPetsByStatusWithHttpInfo) | **GET** /pet/findByStatus | Finds Pets by status |
| 114 | +*PetApi* | [**findPetsByTags**](docs/PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags |
| 115 | +*PetApi* | [**findPetsByTagsWithHttpInfo**](docs/PetApi.md#findPetsByTagsWithHttpInfo) | **GET** /pet/findByTags | Finds Pets by tags |
| 116 | +*PetApi* | [**getPetById**](docs/PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID |
| 117 | +*PetApi* | [**getPetByIdWithHttpInfo**](docs/PetApi.md#getPetByIdWithHttpInfo) | **GET** /pet/{petId} | Find pet by ID |
| 118 | +*PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet |
| 119 | +*PetApi* | [**updatePetWithHttpInfo**](docs/PetApi.md#updatePetWithHttpInfo) | **PUT** /pet | Update an existing pet |
| 120 | +*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data |
| 121 | +*PetApi* | [**updatePetWithFormWithHttpInfo**](docs/PetApi.md#updatePetWithFormWithHttpInfo) | **POST** /pet/{petId} | Updates a pet in the store with form data |
| 122 | +*PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image |
| 123 | +*PetApi* | [**uploadFileWithHttpInfo**](docs/PetApi.md#uploadFileWithHttpInfo) | **POST** /pet/{petId}/uploadImage | uploads an image |
| 124 | +*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID |
| 125 | +*StoreApi* | [**deleteOrderWithHttpInfo**](docs/StoreApi.md#deleteOrderWithHttpInfo) | **DELETE** /store/order/{orderId} | Delete purchase order by ID |
| 126 | +*StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status |
| 127 | +*StoreApi* | [**getInventoryWithHttpInfo**](docs/StoreApi.md#getInventoryWithHttpInfo) | **GET** /store/inventory | Returns pet inventories by status |
| 128 | +*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID |
| 129 | +*StoreApi* | [**getOrderByIdWithHttpInfo**](docs/StoreApi.md#getOrderByIdWithHttpInfo) | **GET** /store/order/{orderId} | Find purchase order by ID |
| 130 | +*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet |
| 131 | +*StoreApi* | [**placeOrderWithHttpInfo**](docs/StoreApi.md#placeOrderWithHttpInfo) | **POST** /store/order | Place an order for a pet |
| 132 | +*UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user |
| 133 | +*UserApi* | [**createUserWithHttpInfo**](docs/UserApi.md#createUserWithHttpInfo) | **POST** /user | Create user |
| 134 | +*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array |
| 135 | +*UserApi* | [**createUsersWithArrayInputWithHttpInfo**](docs/UserApi.md#createUsersWithArrayInputWithHttpInfo) | **POST** /user/createWithArray | Creates list of users with given input array |
| 136 | +*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array |
| 137 | +*UserApi* | [**createUsersWithListInputWithHttpInfo**](docs/UserApi.md#createUsersWithListInputWithHttpInfo) | **POST** /user/createWithList | Creates list of users with given input array |
| 138 | +*UserApi* | [**deleteUser**](docs/UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user |
| 139 | +*UserApi* | [**deleteUserWithHttpInfo**](docs/UserApi.md#deleteUserWithHttpInfo) | **DELETE** /user/{username} | Delete user |
| 140 | +*UserApi* | [**getUserByName**](docs/UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name |
| 141 | +*UserApi* | [**getUserByNameWithHttpInfo**](docs/UserApi.md#getUserByNameWithHttpInfo) | **GET** /user/{username} | Get user by user name |
| 142 | +*UserApi* | [**loginUser**](docs/UserApi.md#loginUser) | **GET** /user/login | Logs user into the system |
| 143 | +*UserApi* | [**loginUserWithHttpInfo**](docs/UserApi.md#loginUserWithHttpInfo) | **GET** /user/login | Logs user into the system |
| 144 | +*UserApi* | [**logoutUser**](docs/UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session |
| 145 | +*UserApi* | [**logoutUserWithHttpInfo**](docs/UserApi.md#logoutUserWithHttpInfo) | **GET** /user/logout | Logs out current logged in user session |
| 146 | +*UserApi* | [**updateUser**](docs/UserApi.md#updateUser) | **PUT** /user/{username} | Updated user |
| 147 | +*UserApi* | [**updateUserWithHttpInfo**](docs/UserApi.md#updateUserWithHttpInfo) | **PUT** /user/{username} | Updated user |
| 148 | + |
| 149 | + |
| 150 | +## Documentation for Models |
| 151 | + |
| 152 | + - [Category](docs/Category.md) |
| 153 | + - [ModelApiResponse](docs/ModelApiResponse.md) |
| 154 | + - [Order](docs/Order.md) |
| 155 | + - [Pet](docs/Pet.md) |
| 156 | + - [Tag](docs/Tag.md) |
| 157 | + - [User](docs/User.md) |
| 158 | + |
| 159 | + |
| 160 | +## Documentation for Authorization |
| 161 | + |
| 162 | +Authentication schemes defined for the API: |
| 163 | +### api_key |
| 164 | + |
| 165 | + |
| 166 | +- **Type**: API key |
| 167 | +- **API key parameter name**: api_key |
| 168 | +- **Location**: HTTP header |
| 169 | + |
| 170 | +### petstore_auth |
| 171 | + |
| 172 | + |
| 173 | +- **Type**: OAuth |
| 174 | +- **Flow**: implicit |
| 175 | +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog |
| 176 | +- **Scopes**: |
| 177 | + - write:pets: modify pets in your account |
| 178 | + - read:pets: read your pets |
| 179 | + |
| 180 | + |
| 181 | +## Recommendation |
| 182 | + |
| 183 | +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. |
| 184 | +However, the instances of the api clients created from the `ApiClient` are thread-safe and can be re-used. |
| 185 | + |
| 186 | +## Author |
| 187 | + |
| 188 | + |
| 189 | + |
0 commit comments