|
| 1 | +# petstore-native-useGzipFeature |
| 2 | + |
| 3 | +OpenAPI Petstore |
| 4 | + |
| 5 | +- API version: 1.0.0 |
| 6 | + |
| 7 | +- Generator version: 7.18.0-SNAPSHOT |
| 8 | + |
| 9 | +This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. |
| 10 | + |
| 11 | + |
| 12 | +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* |
| 13 | + |
| 14 | +## Requirements |
| 15 | + |
| 16 | +Building the API client library requires: |
| 17 | + |
| 18 | +1. Java 11+ |
| 19 | +2. Maven/Gradle |
| 20 | + |
| 21 | +## Installation |
| 22 | + |
| 23 | +To install the API client library to your local Maven repository, simply execute: |
| 24 | + |
| 25 | +```shell |
| 26 | +mvn clean install |
| 27 | +``` |
| 28 | + |
| 29 | +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: |
| 30 | + |
| 31 | +```shell |
| 32 | +mvn clean deploy |
| 33 | +``` |
| 34 | + |
| 35 | +Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. |
| 36 | + |
| 37 | +### Maven users |
| 38 | + |
| 39 | +Add this dependency to your project's POM: |
| 40 | + |
| 41 | +```xml |
| 42 | +<dependency> |
| 43 | + <groupId>org.openapitools</groupId> |
| 44 | + <artifactId>petstore-native-useGzipFeature</artifactId> |
| 45 | + <version>1.0.0</version> |
| 46 | + <scope>compile</scope> |
| 47 | +</dependency> |
| 48 | +``` |
| 49 | + |
| 50 | +### Gradle users |
| 51 | + |
| 52 | +Add this dependency to your project's build file: |
| 53 | + |
| 54 | +```groovy |
| 55 | +compile "org.openapitools:petstore-native-useGzipFeature:1.0.0" |
| 56 | +``` |
| 57 | + |
| 58 | +### Others |
| 59 | + |
| 60 | +At first generate the JAR by executing: |
| 61 | + |
| 62 | +```shell |
| 63 | +mvn clean package |
| 64 | +``` |
| 65 | + |
| 66 | +Then manually install the following JARs: |
| 67 | + |
| 68 | +- `target/petstore-native-useGzipFeature-1.0.0.jar` |
| 69 | +- `target/lib/*.jar` |
| 70 | + |
| 71 | +## Getting Started |
| 72 | + |
| 73 | +Please follow the [installation](#installation) instruction and execute the following Java code: |
| 74 | + |
| 75 | +```java |
| 76 | + |
| 77 | +import org.openapitools.client.*; |
| 78 | +import org.openapitools.client.model.*; |
| 79 | +import org.openapitools.client.api.PetApi; |
| 80 | + |
| 81 | +public class PetApiExample { |
| 82 | + |
| 83 | + public static void main(String[] args) { |
| 84 | + ApiClient defaultClient = Configuration.getDefaultApiClient(); |
| 85 | + // Configure clients using the `defaultClient` object, such as |
| 86 | + // overriding the host and port, timeout, etc. |
| 87 | + PetApi apiInstance = new PetApi(defaultClient); |
| 88 | + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store |
| 89 | + try { |
| 90 | + Pet result = apiInstance.addPet(pet); |
| 91 | + System.out.println(result); |
| 92 | + } catch (ApiException e) { |
| 93 | + System.err.println("Exception when calling PetApi#addPet"); |
| 94 | + System.err.println("Status code: " + e.getCode()); |
| 95 | + System.err.println("Reason: " + e.getResponseBody()); |
| 96 | + System.err.println("Response headers: " + e.getResponseHeaders()); |
| 97 | + e.printStackTrace(); |
| 98 | + } |
| 99 | + } |
| 100 | +} |
| 101 | + |
| 102 | +``` |
| 103 | + |
| 104 | +## Documentation for API Endpoints |
| 105 | + |
| 106 | +All URIs are relative to *http://petstore.swagger.io/v2* |
| 107 | + |
| 108 | +Class | Method | HTTP request | Description |
| 109 | +------------ | ------------- | ------------- | ------------- |
| 110 | +*PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store |
| 111 | +*PetApi* | [**addPetWithHttpInfo**](docs/PetApi.md#addPetWithHttpInfo) | **POST** /pet | Add a new pet to the store |
| 112 | + |
| 113 | + |
| 114 | +## Documentation for Models |
| 115 | + |
| 116 | + - [Category](docs/Category.md) |
| 117 | + - [Pet](docs/Pet.md) |
| 118 | + - [Tag](docs/Tag.md) |
| 119 | + |
| 120 | + |
| 121 | +<a id="documentation-for-authorization"></a> |
| 122 | +## Documentation for Authorization |
| 123 | + |
| 124 | + |
| 125 | +Authentication schemes defined for the API: |
| 126 | +<a id="petstore_auth"></a> |
| 127 | +### petstore_auth |
| 128 | + |
| 129 | + |
| 130 | +- **Type**: OAuth |
| 131 | +- **Flow**: implicit |
| 132 | +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog |
| 133 | +- **Scopes**: |
| 134 | + - write:pets: modify pets in your account |
| 135 | + - read:pets: read your pets |
| 136 | + |
| 137 | + |
| 138 | +## Recommendation |
| 139 | + |
| 140 | +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. |
| 141 | +However, the instances of the api clients created from the `ApiClient` are thread-safe and can be re-used. |
| 142 | + |
| 143 | +## Author |
| 144 | + |
| 145 | + |
| 146 | + |
0 commit comments