|
| 1 | +# org.openapitools.server - Kotlin Server library for OpenAPI Petstore |
| 2 | + |
| 3 | +This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. |
| 4 | + |
| 5 | +Generated by OpenAPI Generator 7.22.0-SNAPSHOT. |
| 6 | + |
| 7 | +## Requires |
| 8 | + |
| 9 | +* Kotlin 2.0.20 |
| 10 | +* Gradle 8.10.2 |
| 11 | + |
| 12 | +## Build |
| 13 | + |
| 14 | +First, create the gradle wrapper script: |
| 15 | + |
| 16 | +``` |
| 17 | +gradle wrapper |
| 18 | +``` |
| 19 | + |
| 20 | +Then, run: |
| 21 | + |
| 22 | +``` |
| 23 | +./gradlew check assemble |
| 24 | +``` |
| 25 | + |
| 26 | +This runs all tests and packages the library. |
| 27 | + |
| 28 | +## Running |
| 29 | + |
| 30 | +The server builds as a fat jar with a main entrypoint. To start the service, run `java -jar ./build/libs/kotlin-server.jar`. |
| 31 | + |
| 32 | +You may also run in docker: |
| 33 | + |
| 34 | +``` |
| 35 | +docker build -t kotlin-server . |
| 36 | +docker run -p 8080:8080 kotlin-server |
| 37 | +``` |
| 38 | + |
| 39 | +## Features/Implementation Notes |
| 40 | + |
| 41 | +* Supports JSON inputs/outputs, File inputs, and Form inputs (see ktor documentation for more info). |
| 42 | +* ~Supports collection formats for query parameters: csv, tsv, ssv, pipes.~ |
| 43 | +* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions. |
| 44 | + |
| 45 | +<a id="documentation-for-api-endpoints"></a> |
| 46 | +## Documentation for API Endpoints |
| 47 | + |
| 48 | +All URIs are relative to *http://petstore.swagger.io/v2* |
| 49 | + |
| 50 | +Class | Method | HTTP request | Description |
| 51 | +------------ | ------------- | ------------- | ------------- |
| 52 | +*PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store |
| 53 | +*PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet |
| 54 | +*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status |
| 55 | +*PetApi* | [**findPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags |
| 56 | +*PetApi* | [**getImage**](docs/PetApi.md#getimage) | **GET** /pet/{petId}/getImage | Get an image |
| 57 | +*PetApi* | [**getPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID |
| 58 | +*PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet |
| 59 | +*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data |
| 60 | +*PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image |
| 61 | +*PetApi* | [**uploadMultipleFile**](docs/PetApi.md#uploadmultiplefile) | **POST** /pet/{petId}/uploadMultipleImage | uploads multiple images |
| 62 | +*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID |
| 63 | +*StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status |
| 64 | +*StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID |
| 65 | +*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet |
| 66 | +*UserApi* | [**createUser**](docs/UserApi.md#createuser) | **POST** /user | Create user |
| 67 | +*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array |
| 68 | +*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array |
| 69 | +*UserApi* | [**deleteUser**](docs/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user |
| 70 | +*UserApi* | [**getUserByName**](docs/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name |
| 71 | +*UserApi* | [**loginUser**](docs/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system |
| 72 | +*UserApi* | [**logoutUser**](docs/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session |
| 73 | +*UserApi* | [**logoutUserOptions**](docs/UserApi.md#logoutuseroptions) | **OPTIONS** /user/logout | logoutUserOptions |
| 74 | +*UserApi* | [**updateUser**](docs/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user |
| 75 | + |
| 76 | + |
| 77 | +<a id="documentation-for-models"></a> |
| 78 | +## Documentation for Models |
| 79 | + |
| 80 | + - [org.openapitools.server.models.Category](docs/Category.md) |
| 81 | + - [org.openapitools.server.models.ModelApiResponse](docs/ModelApiResponse.md) |
| 82 | + - [org.openapitools.server.models.Order](docs/Order.md) |
| 83 | + - [org.openapitools.server.models.Pet](docs/Pet.md) |
| 84 | + - [org.openapitools.server.models.Tag](docs/Tag.md) |
| 85 | + - [org.openapitools.server.models.User](docs/User.md) |
| 86 | + |
| 87 | + |
| 88 | +<a id="documentation-for-authorization"></a> |
| 89 | +## Documentation for Authorization |
| 90 | + |
| 91 | + |
| 92 | +Authentication schemes defined for the API: |
| 93 | +<a id="petstore_auth"></a> |
| 94 | +### petstore_auth |
| 95 | + |
| 96 | +- **Type**: OAuth |
| 97 | +- **Flow**: implicit |
| 98 | +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog |
| 99 | +- **Scopes**: |
| 100 | + - write:pets: modify pets in your account |
| 101 | + - read:pets: read your pets |
| 102 | + |
| 103 | +<a id="api_key"></a> |
| 104 | +### api_key |
| 105 | + |
| 106 | +- **Type**: API key |
| 107 | +- **API key parameter name**: api_key |
| 108 | +- **Location**: HTTP header |
| 109 | + |
0 commit comments