mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-10-14 00:13:50 +00:00
Add tests for numeric form data (kotlin - jvm-ktor) (#21952)
* add tests for numeric form data (kotlin) * remove null check as its done already
This commit is contained in:
parent
58fde20e2c
commit
177b94b1b4
@ -1,7 +1,7 @@
|
||||
generatorName: kotlin
|
||||
outputDir: samples/client/petstore/kotlin-jvm-ktor-gson
|
||||
library: jvm-ktor
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/kotlin/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/kotlin-client
|
||||
additionalProperties:
|
||||
artifactId: kotlin-petstore-jvm-ktor-gson
|
||||
|
@ -69,10 +69,10 @@ import com.fasterxml.jackson.databind.ObjectMapper
|
||||
{{^isArray}}
|
||||
{{^isString}}
|
||||
{{^isNumber}}
|
||||
{{{paramName}}}?.apply { append("{{{baseName}}}", {{{paramName}}}?.toString()) }
|
||||
{{{paramName}}}?.apply { append("{{{baseName}}}", {{{paramName}}}.toString()) }
|
||||
{{/isNumber}}
|
||||
{{#isNumber}}
|
||||
{{{paramName}}}?.apply { append("{{{baseName}}}", {{{paramName}}}?.toString()) }
|
||||
{{{paramName}}}?.apply { append("{{{baseName}}}", {{{paramName}}}.toString()) }
|
||||
{{/isNumber}}
|
||||
{{/isString}}
|
||||
{{#isString}}
|
||||
@ -98,10 +98,10 @@ import com.fasterxml.jackson.databind.ObjectMapper
|
||||
{{^isArray}}
|
||||
{{^isString}}
|
||||
{{^isNumber}}
|
||||
{{{paramName}}}?.apply { it.append("{{{baseName}}}", {{{paramName}}}?.toString()) }
|
||||
{{{paramName}}}?.apply { it.append("{{{baseName}}}", {{{paramName}}}.toString()) }
|
||||
{{/isNumber}}
|
||||
{{#isNumber}}
|
||||
{{{paramName}}}?.apply { it.append("{{{baseName}}}", {{{paramName}}}?.toString()) }
|
||||
{{{paramName}}}?.apply { it.append("{{{baseName}}}", {{{paramName}}}.toString()) }
|
||||
{{/isNumber}}
|
||||
{{/isString}}
|
||||
{{#isString}}
|
||||
|
@ -584,6 +584,42 @@ paths:
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
put:
|
||||
tags:
|
||||
- fake
|
||||
summary: Updates a pet in the store with form data (number)
|
||||
description: ''
|
||||
operationId: updatePetWithFormNumber
|
||||
parameters:
|
||||
- name: petId
|
||||
in: path
|
||||
description: ID of pet that needs to be updated
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
responses:
|
||||
'405':
|
||||
description: Invalid input
|
||||
security:
|
||||
- petstore_auth:
|
||||
- 'write:pets'
|
||||
- 'read:pets'
|
||||
requestBody:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
description: Updated name of the pet
|
||||
type: string
|
||||
status:
|
||||
description: integer type
|
||||
type: integer
|
||||
status2:
|
||||
description: number type
|
||||
type: number
|
||||
externalDocs:
|
||||
description: Find out more about Swagger
|
||||
url: 'http://swagger.io'
|
||||
|
@ -1,7 +1,11 @@
|
||||
README.md
|
||||
build.gradle
|
||||
docs/Annotation.md
|
||||
docs/AnyOfUserOrPet.md
|
||||
docs/AnyOfUserOrPetOrArrayString.md
|
||||
docs/ApiResponse.md
|
||||
docs/Category.md
|
||||
docs/FakeApi.md
|
||||
docs/Order.md
|
||||
docs/Pet.md
|
||||
docs/PetApi.md
|
||||
@ -9,11 +13,14 @@ docs/StoreApi.md
|
||||
docs/Tag.md
|
||||
docs/User.md
|
||||
docs/UserApi.md
|
||||
docs/UserOrPet.md
|
||||
docs/UserOrPetOrArrayString.md
|
||||
gradle/wrapper/gradle-wrapper.jar
|
||||
gradle/wrapper/gradle-wrapper.properties
|
||||
gradlew
|
||||
gradlew.bat
|
||||
settings.gradle
|
||||
src/main/kotlin/org/openapitools/client/apis/FakeApi.kt
|
||||
src/main/kotlin/org/openapitools/client/apis/PetApi.kt
|
||||
src/main/kotlin/org/openapitools/client/apis/StoreApi.kt
|
||||
src/main/kotlin/org/openapitools/client/apis/UserApi.kt
|
||||
@ -27,9 +34,14 @@ src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt
|
||||
src/main/kotlin/org/openapitools/client/infrastructure/HttpResponse.kt
|
||||
src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt
|
||||
src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt
|
||||
src/main/kotlin/org/openapitools/client/models/Annotation.kt
|
||||
src/main/kotlin/org/openapitools/client/models/AnyOfUserOrPet.kt
|
||||
src/main/kotlin/org/openapitools/client/models/AnyOfUserOrPetOrArrayString.kt
|
||||
src/main/kotlin/org/openapitools/client/models/Category.kt
|
||||
src/main/kotlin/org/openapitools/client/models/ModelApiResponse.kt
|
||||
src/main/kotlin/org/openapitools/client/models/Order.kt
|
||||
src/main/kotlin/org/openapitools/client/models/Pet.kt
|
||||
src/main/kotlin/org/openapitools/client/models/Tag.kt
|
||||
src/main/kotlin/org/openapitools/client/models/User.kt
|
||||
src/main/kotlin/org/openapitools/client/models/UserOrPet.kt
|
||||
src/main/kotlin/org/openapitools/client/models/UserOrPetOrArrayString.kt
|
||||
|
@ -45,6 +45,8 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
| Class | Method | HTTP request | Description |
|
||||
| ------------ | ------------- | ------------- | ------------- |
|
||||
| *FakeApi* | [**annotations**](docs/FakeApi.md#annotations) | **POST** /fake/annotations | annotate |
|
||||
| *FakeApi* | [**updatePetWithFormNumber**](docs/FakeApi.md#updatepetwithformnumber) | **PUT** /fake/annotations | Updates a pet in the store with form data (number) |
|
||||
| *PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store |
|
||||
| *PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet |
|
||||
| *PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status |
|
||||
@ -70,12 +72,17 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
<a id="documentation-for-models"></a>
|
||||
## Documentation for Models
|
||||
|
||||
- [org.openapitools.client.models.Annotation](docs/Annotation.md)
|
||||
- [org.openapitools.client.models.AnyOfUserOrPet](docs/AnyOfUserOrPet.md)
|
||||
- [org.openapitools.client.models.AnyOfUserOrPetOrArrayString](docs/AnyOfUserOrPetOrArrayString.md)
|
||||
- [org.openapitools.client.models.Category](docs/Category.md)
|
||||
- [org.openapitools.client.models.ModelApiResponse](docs/ModelApiResponse.md)
|
||||
- [org.openapitools.client.models.Order](docs/Order.md)
|
||||
- [org.openapitools.client.models.Pet](docs/Pet.md)
|
||||
- [org.openapitools.client.models.Tag](docs/Tag.md)
|
||||
- [org.openapitools.client.models.User](docs/User.md)
|
||||
- [org.openapitools.client.models.UserOrPet](docs/UserOrPet.md)
|
||||
- [org.openapitools.client.models.UserOrPetOrArrayString](docs/UserOrPetOrArrayString.md)
|
||||
|
||||
|
||||
<a id="documentation-for-authorization"></a>
|
||||
|
@ -0,0 +1,10 @@
|
||||
|
||||
# Annotation
|
||||
|
||||
## Properties
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------ | ------------- | ------------- | ------------- |
|
||||
| **id** | [**java.util.UUID**](java.util.UUID.md) | | [optional] |
|
||||
|
||||
|
||||
|
@ -0,0 +1,29 @@
|
||||
|
||||
# AnyOfUserOrPet
|
||||
|
||||
## Properties
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------ | ------------- | ------------- | ------------- |
|
||||
| **username** | **kotlin.String** | | |
|
||||
| **name** | **kotlin.String** | | |
|
||||
| **photoUrls** | **kotlin.collections.List<kotlin.String>** | | |
|
||||
| **id** | **kotlin.Long** | | [optional] |
|
||||
| **firstName** | **kotlin.String** | | [optional] |
|
||||
| **lastName** | **kotlin.String** | | [optional] |
|
||||
| **email** | **kotlin.String** | | [optional] |
|
||||
| **password** | **kotlin.String** | | [optional] |
|
||||
| **phone** | **kotlin.String** | | [optional] |
|
||||
| **userStatus** | **kotlin.Int** | User Status | [optional] |
|
||||
| **category** | [**Category**](Category.md) | | [optional] |
|
||||
| **tags** | [**kotlin.collections.List<Tag>**](Tag.md) | | [optional] |
|
||||
| **status** | [**inline**](#Status) | pet status in the store | [optional] |
|
||||
|
||||
|
||||
<a id="Status"></a>
|
||||
## Enum: status
|
||||
| Name | Value |
|
||||
| ---- | ----- |
|
||||
| status | available, pending, sold |
|
||||
|
||||
|
||||
|
@ -0,0 +1,29 @@
|
||||
|
||||
# AnyOfUserOrPetOrArrayString
|
||||
|
||||
## Properties
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------ | ------------- | ------------- | ------------- |
|
||||
| **username** | **kotlin.String** | | |
|
||||
| **name** | **kotlin.String** | | |
|
||||
| **photoUrls** | **kotlin.collections.List<kotlin.String>** | | |
|
||||
| **id** | **kotlin.Long** | | [optional] |
|
||||
| **firstName** | **kotlin.String** | | [optional] |
|
||||
| **lastName** | **kotlin.String** | | [optional] |
|
||||
| **email** | **kotlin.String** | | [optional] |
|
||||
| **password** | **kotlin.String** | | [optional] |
|
||||
| **phone** | **kotlin.String** | | [optional] |
|
||||
| **userStatus** | **kotlin.Int** | User Status | [optional] |
|
||||
| **category** | [**Category**](Category.md) | | [optional] |
|
||||
| **tags** | [**kotlin.collections.List<Tag>**](Tag.md) | | [optional] |
|
||||
| **status** | [**inline**](#Status) | pet status in the store | [optional] |
|
||||
|
||||
|
||||
<a id="Status"></a>
|
||||
## Enum: status
|
||||
| Name | Value |
|
||||
| ---- | ----- |
|
||||
| status | available, pending, sold |
|
||||
|
||||
|
||||
|
106
samples/client/petstore/kotlin-jvm-ktor-gson/docs/FakeApi.md
Normal file
106
samples/client/petstore/kotlin-jvm-ktor-gson/docs/FakeApi.md
Normal file
@ -0,0 +1,106 @@
|
||||
# FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------------- | ------------- | ------------- |
|
||||
| [**annotations**](FakeApi.md#annotations) | **POST** /fake/annotations | annotate |
|
||||
| [**updatePetWithFormNumber**](FakeApi.md#updatePetWithFormNumber) | **PUT** /fake/annotations | Updates a pet in the store with form data (number) |
|
||||
|
||||
|
||||
<a id="annotations"></a>
|
||||
# **annotations**
|
||||
> annotations(`annotation`)
|
||||
|
||||
annotate
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = FakeApi()
|
||||
val `annotation` : Annotation = // Annotation |
|
||||
try {
|
||||
apiInstance.annotations(`annotation`)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling FakeApi#annotations")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling FakeApi#annotations")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **`annotation`** | [**Annotation**](Annotation.md)| | |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a id="updatePetWithFormNumber"></a>
|
||||
# **updatePetWithFormNumber**
|
||||
> updatePetWithFormNumber(petId, name, status, status2)
|
||||
|
||||
Updates a pet in the store with form data (number)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = FakeApi()
|
||||
val petId : kotlin.Long = 789 // kotlin.Long | ID of pet that needs to be updated
|
||||
val name : kotlin.String = name_example // kotlin.String | Updated name of the pet
|
||||
val status : kotlin.Int = 56 // kotlin.Int | integer type
|
||||
val status2 : java.math.BigDecimal = 8.14 // java.math.BigDecimal | number type
|
||||
try {
|
||||
apiInstance.updatePetWithFormNumber(petId, name, status, status2)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling FakeApi#updatePetWithFormNumber")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling FakeApi#updatePetWithFormNumber")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
| **petId** | **kotlin.Long**| ID of pet that needs to be updated | |
|
||||
| **name** | **kotlin.String**| Updated name of the pet | [optional] |
|
||||
| **status** | **kotlin.Int**| integer type | [optional] |
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **status2** | **java.math.BigDecimal**| number type | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
||||
Configure petstore_auth:
|
||||
ApiClient.accessToken = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
@ -16,10 +16,12 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
<a id="addPet"></a>
|
||||
# **addPet**
|
||||
> addPet(body)
|
||||
> Pet addPet(pet)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@ -27,9 +29,10 @@ Add a new pet to the store
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val body : Pet = // Pet | Pet object that needs to be added to the store
|
||||
val pet : Pet = // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
apiInstance.addPet(body)
|
||||
val result : Pet = apiInstance.addPet(pet)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling PetApi#addPet")
|
||||
e.printStackTrace()
|
||||
@ -42,11 +45,11 @@ try {
|
||||
### Parameters
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
|
||||
| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@ -57,7 +60,7 @@ Configure petstore_auth:
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a id="deletePet"></a>
|
||||
# **deletePet**
|
||||
@ -65,6 +68,8 @@ Configure petstore_auth:
|
||||
|
||||
Deletes a pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@ -253,10 +258,12 @@ Configure api_key:
|
||||
|
||||
<a id="updatePet"></a>
|
||||
# **updatePet**
|
||||
> updatePet(body)
|
||||
> Pet updatePet(pet)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@ -264,9 +271,10 @@ Update an existing pet
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val body : Pet = // Pet | Pet object that needs to be added to the store
|
||||
val pet : Pet = // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
apiInstance.updatePet(body)
|
||||
val result : Pet = apiInstance.updatePet(pet)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling PetApi#updatePet")
|
||||
e.printStackTrace()
|
||||
@ -279,11 +287,11 @@ try {
|
||||
### Parameters
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
|
||||
| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@ -294,7 +302,7 @@ Configure petstore_auth:
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a id="updatePetWithForm"></a>
|
||||
# **updatePetWithForm**
|
||||
@ -302,6 +310,8 @@ Configure petstore_auth:
|
||||
|
||||
Updates a pet in the store with form data
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@ -351,6 +361,8 @@ Configure petstore_auth:
|
||||
|
||||
uploads an image
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
|
@ -149,10 +149,12 @@ No authorization required
|
||||
|
||||
<a id="placeOrder"></a>
|
||||
# **placeOrder**
|
||||
> Order placeOrder(body)
|
||||
> Order placeOrder(order)
|
||||
|
||||
Place an order for a pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@ -160,9 +162,9 @@ Place an order for a pet
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = StoreApi()
|
||||
val body : Order = // Order | order placed for purchasing the pet
|
||||
val order : Order = // Order | order placed for purchasing the pet
|
||||
try {
|
||||
val result : Order = apiInstance.placeOrder(body)
|
||||
val result : Order = apiInstance.placeOrder(order)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling StoreApi#placeOrder")
|
||||
@ -176,7 +178,7 @@ try {
|
||||
### Parameters
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **body** | [**Order**](Order.md)| order placed for purchasing the pet | |
|
||||
| **order** | [**Order**](Order.md)| order placed for purchasing the pet | |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -188,6 +190,6 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
@ -4,8 +4,8 @@
|
||||
## Properties
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------ | ------------- | ------------- | ------------- |
|
||||
| **username** | **kotlin.String** | | |
|
||||
| **id** | **kotlin.Long** | | [optional] |
|
||||
| **username** | **kotlin.String** | | [optional] |
|
||||
| **firstName** | **kotlin.String** | | [optional] |
|
||||
| **lastName** | **kotlin.String** | | [optional] |
|
||||
| **email** | **kotlin.String** | | [optional] |
|
||||
|
@ -16,7 +16,7 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
<a id="createUser"></a>
|
||||
# **createUser**
|
||||
> createUser(body)
|
||||
> createUser(user)
|
||||
|
||||
Create user
|
||||
|
||||
@ -29,9 +29,9 @@ This can only be done by the logged in user.
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val body : User = // User | Created user object
|
||||
val user : User = // User | Created user object
|
||||
try {
|
||||
apiInstance.createUser(body)
|
||||
apiInstance.createUser(user)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling UserApi#createUser")
|
||||
e.printStackTrace()
|
||||
@ -44,7 +44,7 @@ try {
|
||||
### Parameters
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **body** | [**User**](User.md)| Created user object | |
|
||||
| **user** | [**User**](User.md)| Created user object | |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -52,19 +52,24 @@ null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
Configure api_key:
|
||||
ApiClient.apiKey["api_key"] = ""
|
||||
ApiClient.apiKeyPrefix["api_key"] = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a id="createUsersWithArrayInput"></a>
|
||||
# **createUsersWithArrayInput**
|
||||
> createUsersWithArrayInput(body)
|
||||
> createUsersWithArrayInput(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@ -72,9 +77,9 @@ Creates list of users with given input array
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val body : kotlin.collections.List<User> = // kotlin.collections.List<User> | List of user object
|
||||
val user : kotlin.collections.List<User> = // kotlin.collections.List<User> | List of user object
|
||||
try {
|
||||
apiInstance.createUsersWithArrayInput(body)
|
||||
apiInstance.createUsersWithArrayInput(user)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling UserApi#createUsersWithArrayInput")
|
||||
e.printStackTrace()
|
||||
@ -87,7 +92,7 @@ try {
|
||||
### Parameters
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **body** | [**kotlin.collections.List<User>**](User.md)| List of user object | |
|
||||
| **user** | [**kotlin.collections.List<User>**](User.md)| List of user object | |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -95,19 +100,24 @@ null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
Configure api_key:
|
||||
ApiClient.apiKey["api_key"] = ""
|
||||
ApiClient.apiKeyPrefix["api_key"] = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a id="createUsersWithListInput"></a>
|
||||
# **createUsersWithListInput**
|
||||
> createUsersWithListInput(body)
|
||||
> createUsersWithListInput(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@ -115,9 +125,9 @@ Creates list of users with given input array
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val body : kotlin.collections.List<User> = // kotlin.collections.List<User> | List of user object
|
||||
val user : kotlin.collections.List<User> = // kotlin.collections.List<User> | List of user object
|
||||
try {
|
||||
apiInstance.createUsersWithListInput(body)
|
||||
apiInstance.createUsersWithListInput(user)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling UserApi#createUsersWithListInput")
|
||||
e.printStackTrace()
|
||||
@ -130,7 +140,7 @@ try {
|
||||
### Parameters
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **body** | [**kotlin.collections.List<User>**](User.md)| List of user object | |
|
||||
| **user** | [**kotlin.collections.List<User>**](User.md)| List of user object | |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -138,11 +148,14 @@ null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
Configure api_key:
|
||||
ApiClient.apiKey["api_key"] = ""
|
||||
ApiClient.apiKeyPrefix["api_key"] = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a id="deleteUser"></a>
|
||||
@ -183,7 +196,10 @@ null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
Configure api_key:
|
||||
ApiClient.apiKey["api_key"] = ""
|
||||
ApiClient.apiKeyPrefix["api_key"] = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
@ -196,6 +212,8 @@ No authorization required
|
||||
|
||||
Get user by user name
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@ -240,6 +258,8 @@ No authorization required
|
||||
|
||||
Logs user into the system
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@ -286,6 +306,8 @@ No authorization required
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
@ -313,7 +335,10 @@ null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
Configure api_key:
|
||||
ApiClient.apiKey["api_key"] = ""
|
||||
ApiClient.apiKeyPrefix["api_key"] = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
@ -322,7 +347,7 @@ No authorization required
|
||||
|
||||
<a id="updateUser"></a>
|
||||
# **updateUser**
|
||||
> updateUser(username, body)
|
||||
> updateUser(username, user)
|
||||
|
||||
Updated user
|
||||
|
||||
@ -336,9 +361,9 @@ This can only be done by the logged in user.
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val username : kotlin.String = username_example // kotlin.String | name that need to be deleted
|
||||
val body : User = // User | Updated user object
|
||||
val user : User = // User | Updated user object
|
||||
try {
|
||||
apiInstance.updateUser(username, body)
|
||||
apiInstance.updateUser(username, user)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling UserApi#updateUser")
|
||||
e.printStackTrace()
|
||||
@ -352,7 +377,7 @@ try {
|
||||
| **username** | **kotlin.String**| name that need to be deleted | |
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **body** | [**User**](User.md)| Updated user object | |
|
||||
| **user** | [**User**](User.md)| Updated user object | |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -360,10 +385,13 @@ null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
Configure api_key:
|
||||
ApiClient.apiKey["api_key"] = ""
|
||||
ApiClient.apiKeyPrefix["api_key"] = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
@ -0,0 +1,29 @@
|
||||
|
||||
# UserOrPet
|
||||
|
||||
## Properties
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------ | ------------- | ------------- | ------------- |
|
||||
| **username** | **kotlin.String** | | |
|
||||
| **name** | **kotlin.String** | | |
|
||||
| **photoUrls** | **kotlin.collections.List<kotlin.String>** | | |
|
||||
| **id** | **kotlin.Long** | | [optional] |
|
||||
| **firstName** | **kotlin.String** | | [optional] |
|
||||
| **lastName** | **kotlin.String** | | [optional] |
|
||||
| **email** | **kotlin.String** | | [optional] |
|
||||
| **password** | **kotlin.String** | | [optional] |
|
||||
| **phone** | **kotlin.String** | | [optional] |
|
||||
| **userStatus** | **kotlin.Int** | User Status | [optional] |
|
||||
| **category** | [**Category**](Category.md) | | [optional] |
|
||||
| **tags** | [**kotlin.collections.List<Tag>**](Tag.md) | | [optional] |
|
||||
| **status** | [**inline**](#Status) | pet status in the store | [optional] |
|
||||
|
||||
|
||||
<a id="Status"></a>
|
||||
## Enum: status
|
||||
| Name | Value |
|
||||
| ---- | ----- |
|
||||
| status | available, pending, sold |
|
||||
|
||||
|
||||
|
@ -0,0 +1,29 @@
|
||||
|
||||
# UserOrPetOrArrayString
|
||||
|
||||
## Properties
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------ | ------------- | ------------- | ------------- |
|
||||
| **username** | **kotlin.String** | | |
|
||||
| **name** | **kotlin.String** | | |
|
||||
| **photoUrls** | **kotlin.collections.List<kotlin.String>** | | |
|
||||
| **id** | **kotlin.Long** | | [optional] |
|
||||
| **firstName** | **kotlin.String** | | [optional] |
|
||||
| **lastName** | **kotlin.String** | | [optional] |
|
||||
| **email** | **kotlin.String** | | [optional] |
|
||||
| **password** | **kotlin.String** | | [optional] |
|
||||
| **phone** | **kotlin.String** | | [optional] |
|
||||
| **userStatus** | **kotlin.Int** | User Status | [optional] |
|
||||
| **category** | [**Category**](Category.md) | | [optional] |
|
||||
| **tags** | [**kotlin.collections.List<Tag>**](Tag.md) | | [optional] |
|
||||
| **status** | [**inline**](#Status) | pet status in the store | [optional] |
|
||||
|
||||
|
||||
<a id="Status"></a>
|
||||
## Enum: status
|
||||
| Name | Value |
|
||||
| ---- | ----- |
|
||||
| status | available, pending, sold |
|
||||
|
||||
|
||||
|
@ -0,0 +1,113 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.apis
|
||||
|
||||
import org.openapitools.client.models.Annotation
|
||||
|
||||
import org.openapitools.client.infrastructure.*
|
||||
import io.ktor.client.HttpClientConfig
|
||||
import io.ktor.client.request.forms.formData
|
||||
import io.ktor.client.engine.HttpClientEngine
|
||||
import io.ktor.http.ParametersBuilder
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.GsonBuilder
|
||||
import java.text.DateFormat
|
||||
|
||||
open class FakeApi(
|
||||
baseUrl: String = ApiClient.BASE_URL,
|
||||
httpClientEngine: HttpClientEngine? = null,
|
||||
httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null,
|
||||
jsonBlock: GsonBuilder.() -> Unit = ApiClient.JSON_DEFAULT,
|
||||
) : ApiClient(
|
||||
baseUrl,
|
||||
httpClientEngine,
|
||||
httpClientConfig,
|
||||
jsonBlock,
|
||||
) {
|
||||
|
||||
/**
|
||||
* POST /fake/annotations
|
||||
* annotate
|
||||
*
|
||||
* @param `annotation`
|
||||
* @return void
|
||||
*/
|
||||
open suspend fun annotations(`annotation`: Annotation): HttpResponse<Unit> {
|
||||
|
||||
val localVariableAuthNames = listOf<String>()
|
||||
|
||||
val localVariableBody = `annotation`
|
||||
|
||||
val localVariableQuery = mutableMapOf<String, List<String>>()
|
||||
|
||||
val localVariableHeaders = mutableMapOf<String, String>()
|
||||
|
||||
val localVariableConfig = RequestConfig<kotlin.Any?>(
|
||||
RequestMethod.POST,
|
||||
"/fake/annotations",
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
)
|
||||
|
||||
return jsonRequest(
|
||||
localVariableConfig,
|
||||
localVariableBody,
|
||||
localVariableAuthNames
|
||||
).wrap()
|
||||
}
|
||||
|
||||
/**
|
||||
* PUT /fake/annotations
|
||||
* Updates a pet in the store with form data (number)
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated
|
||||
* @param name Updated name of the pet (optional)
|
||||
* @param status integer type (optional)
|
||||
* @param status2 number type (optional)
|
||||
* @return void
|
||||
*/
|
||||
open suspend fun updatePetWithFormNumber(petId: kotlin.Long, name: kotlin.String?, status: kotlin.Int?, status2: java.math.BigDecimal?): HttpResponse<Unit> {
|
||||
|
||||
val localVariableAuthNames = listOf<String>("petstore_auth")
|
||||
|
||||
val localVariableBody =
|
||||
ParametersBuilder().also {
|
||||
name?.apply { it.append("name", name) }
|
||||
status?.apply { it.append("status", status.toString()) }
|
||||
status2?.apply { it.append("status2", status2.toString()) }
|
||||
}.build()
|
||||
|
||||
val localVariableQuery = mutableMapOf<String, List<String>>()
|
||||
|
||||
val localVariableHeaders = mutableMapOf<String, String>()
|
||||
|
||||
val localVariableConfig = RequestConfig<kotlin.Any?>(
|
||||
RequestMethod.PUT,
|
||||
"/fake/annotations".replace("{" + "petId" + "}", "$petId"),
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = true,
|
||||
)
|
||||
|
||||
return urlEncodedFormRequest(
|
||||
localVariableConfig,
|
||||
localVariableBody,
|
||||
localVariableAuthNames
|
||||
).wrap()
|
||||
}
|
||||
|
||||
}
|
@ -43,14 +43,15 @@ import java.text.DateFormat
|
||||
* POST /pet
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store
|
||||
* @return void
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
* @return Pet
|
||||
*/
|
||||
open suspend fun addPet(body: Pet): HttpResponse<Unit> {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
open suspend fun addPet(pet: Pet): HttpResponse<Pet> {
|
||||
|
||||
val localVariableAuthNames = listOf<String>("petstore_auth")
|
||||
|
||||
val localVariableBody = body
|
||||
val localVariableBody = pet
|
||||
|
||||
val localVariableQuery = mutableMapOf<String, List<String>>()
|
||||
|
||||
@ -214,14 +215,15 @@ import java.text.DateFormat
|
||||
* PUT /pet
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store
|
||||
* @return void
|
||||
* @param pet Pet object that needs to be added to the store
|
||||
* @return Pet
|
||||
*/
|
||||
open suspend fun updatePet(body: Pet): HttpResponse<Unit> {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
open suspend fun updatePet(pet: Pet): HttpResponse<Pet> {
|
||||
|
||||
val localVariableAuthNames = listOf<String>("petstore_auth")
|
||||
|
||||
val localVariableBody = body
|
||||
val localVariableBody = pet
|
||||
|
||||
val localVariableQuery = mutableMapOf<String, List<String>>()
|
||||
|
||||
|
@ -142,15 +142,15 @@ import java.text.DateFormat
|
||||
* POST /store/order
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param body order placed for purchasing the pet
|
||||
* @param order order placed for purchasing the pet
|
||||
* @return Order
|
||||
*/
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
open suspend fun placeOrder(body: Order): HttpResponse<Order> {
|
||||
open suspend fun placeOrder(order: Order): HttpResponse<Order> {
|
||||
|
||||
val localVariableAuthNames = listOf<String>()
|
||||
|
||||
val localVariableBody = body
|
||||
val localVariableBody = order
|
||||
|
||||
val localVariableQuery = mutableMapOf<String, List<String>>()
|
||||
|
||||
|
@ -42,14 +42,14 @@ import java.text.DateFormat
|
||||
* POST /user
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param body Created user object
|
||||
* @param user Created user object
|
||||
* @return void
|
||||
*/
|
||||
open suspend fun createUser(body: User): HttpResponse<Unit> {
|
||||
open suspend fun createUser(user: User): HttpResponse<Unit> {
|
||||
|
||||
val localVariableAuthNames = listOf<String>()
|
||||
val localVariableAuthNames = listOf<String>("api_key")
|
||||
|
||||
val localVariableBody = body
|
||||
val localVariableBody = user
|
||||
|
||||
val localVariableQuery = mutableMapOf<String, List<String>>()
|
||||
|
||||
@ -60,7 +60,7 @@ import java.text.DateFormat
|
||||
"/user",
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
requiresAuthentication = true,
|
||||
)
|
||||
|
||||
return jsonRequest(
|
||||
@ -74,14 +74,14 @@ import java.text.DateFormat
|
||||
* POST /user/createWithArray
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object
|
||||
* @param user List of user object
|
||||
* @return void
|
||||
*/
|
||||
open suspend fun createUsersWithArrayInput(body: kotlin.collections.List<User>): HttpResponse<Unit> {
|
||||
open suspend fun createUsersWithArrayInput(user: kotlin.collections.List<User>): HttpResponse<Unit> {
|
||||
|
||||
val localVariableAuthNames = listOf<String>()
|
||||
val localVariableAuthNames = listOf<String>("api_key")
|
||||
|
||||
val localVariableBody = body
|
||||
val localVariableBody = user
|
||||
|
||||
val localVariableQuery = mutableMapOf<String, List<String>>()
|
||||
|
||||
@ -92,7 +92,7 @@ import java.text.DateFormat
|
||||
"/user/createWithArray",
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
requiresAuthentication = true,
|
||||
)
|
||||
|
||||
return jsonRequest(
|
||||
@ -106,14 +106,14 @@ import java.text.DateFormat
|
||||
* POST /user/createWithList
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object
|
||||
* @param user List of user object
|
||||
* @return void
|
||||
*/
|
||||
open suspend fun createUsersWithListInput(body: kotlin.collections.List<User>): HttpResponse<Unit> {
|
||||
open suspend fun createUsersWithListInput(user: kotlin.collections.List<User>): HttpResponse<Unit> {
|
||||
|
||||
val localVariableAuthNames = listOf<String>()
|
||||
val localVariableAuthNames = listOf<String>("api_key")
|
||||
|
||||
val localVariableBody = body
|
||||
val localVariableBody = user
|
||||
|
||||
val localVariableQuery = mutableMapOf<String, List<String>>()
|
||||
|
||||
@ -124,7 +124,7 @@ import java.text.DateFormat
|
||||
"/user/createWithList",
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
requiresAuthentication = true,
|
||||
)
|
||||
|
||||
return jsonRequest(
|
||||
@ -143,7 +143,7 @@ import java.text.DateFormat
|
||||
*/
|
||||
open suspend fun deleteUser(username: kotlin.String): HttpResponse<Unit> {
|
||||
|
||||
val localVariableAuthNames = listOf<String>()
|
||||
val localVariableAuthNames = listOf<String>("api_key")
|
||||
|
||||
val localVariableBody =
|
||||
io.ktor.client.utils.EmptyContent
|
||||
@ -157,7 +157,7 @@ import java.text.DateFormat
|
||||
"/user/{username}".replace("{" + "username" + "}", "$username"),
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
requiresAuthentication = true,
|
||||
)
|
||||
|
||||
return request(
|
||||
@ -246,7 +246,7 @@ import java.text.DateFormat
|
||||
*/
|
||||
open suspend fun logoutUser(): HttpResponse<Unit> {
|
||||
|
||||
val localVariableAuthNames = listOf<String>()
|
||||
val localVariableAuthNames = listOf<String>("api_key")
|
||||
|
||||
val localVariableBody =
|
||||
io.ktor.client.utils.EmptyContent
|
||||
@ -260,7 +260,7 @@ import java.text.DateFormat
|
||||
"/user/logout",
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
requiresAuthentication = true,
|
||||
)
|
||||
|
||||
return request(
|
||||
@ -275,14 +275,14 @@ import java.text.DateFormat
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username name that need to be deleted
|
||||
* @param body Updated user object
|
||||
* @param user Updated user object
|
||||
* @return void
|
||||
*/
|
||||
open suspend fun updateUser(username: kotlin.String, body: User): HttpResponse<Unit> {
|
||||
open suspend fun updateUser(username: kotlin.String, user: User): HttpResponse<Unit> {
|
||||
|
||||
val localVariableAuthNames = listOf<String>()
|
||||
val localVariableAuthNames = listOf<String>("api_key")
|
||||
|
||||
val localVariableBody = body
|
||||
val localVariableBody = user
|
||||
|
||||
val localVariableQuery = mutableMapOf<String, List<String>>()
|
||||
|
||||
@ -293,7 +293,7 @@ import java.text.DateFormat
|
||||
"/user/{username}".replace("{" + "username" + "}", "$username"),
|
||||
query = localVariableQuery,
|
||||
headers = localVariableHeaders,
|
||||
requiresAuthentication = false,
|
||||
requiresAuthentication = true,
|
||||
)
|
||||
|
||||
return jsonRequest(
|
||||
|
@ -0,0 +1,37 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
|
||||
|
||||
data class Annotation (
|
||||
|
||||
@SerializedName("id")
|
||||
val id: java.util.UUID? = null
|
||||
|
||||
) {
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,103 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
import org.openapitools.client.models.Category
|
||||
import org.openapitools.client.models.Pet
|
||||
import org.openapitools.client.models.Tag
|
||||
import org.openapitools.client.models.User
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param username
|
||||
* @param name
|
||||
* @param photoUrls
|
||||
* @param id
|
||||
* @param firstName
|
||||
* @param lastName
|
||||
* @param email
|
||||
* @param password
|
||||
* @param phone
|
||||
* @param userStatus User Status
|
||||
* @param category
|
||||
* @param tags
|
||||
* @param status pet status in the store
|
||||
*/
|
||||
|
||||
|
||||
data class AnyOfUserOrPet (
|
||||
|
||||
@SerializedName("username")
|
||||
val username: kotlin.String,
|
||||
|
||||
@SerializedName("name")
|
||||
val name: kotlin.String,
|
||||
|
||||
@SerializedName("photoUrls")
|
||||
val photoUrls: kotlin.collections.List<kotlin.String>,
|
||||
|
||||
@SerializedName("id")
|
||||
val id: kotlin.Long? = null,
|
||||
|
||||
@SerializedName("firstName")
|
||||
val firstName: kotlin.String? = null,
|
||||
|
||||
@SerializedName("lastName")
|
||||
val lastName: kotlin.String? = null,
|
||||
|
||||
@SerializedName("email")
|
||||
val email: kotlin.String? = null,
|
||||
|
||||
@SerializedName("password")
|
||||
val password: kotlin.String? = null,
|
||||
|
||||
@SerializedName("phone")
|
||||
val phone: kotlin.String? = null,
|
||||
|
||||
/* User Status */
|
||||
@SerializedName("userStatus")
|
||||
val userStatus: kotlin.Int? = null,
|
||||
|
||||
@SerializedName("category")
|
||||
val category: Category? = null,
|
||||
|
||||
@SerializedName("tags")
|
||||
val tags: kotlin.collections.List<Tag>? = null,
|
||||
|
||||
/* pet status in the store */
|
||||
@SerializedName("status")
|
||||
@Deprecated(message = "This property is deprecated.")
|
||||
val status: AnyOfUserOrPet.Status? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
*
|
||||
* Values: available,pending,sold,unknown_default_open_api
|
||||
*/
|
||||
enum class Status(val value: kotlin.String) {
|
||||
@SerializedName(value = "available") available("available"),
|
||||
@SerializedName(value = "pending") pending("pending"),
|
||||
@SerializedName(value = "sold") sold("sold"),
|
||||
@SerializedName(value = "unknown_default_open_api") unknown_default_open_api("unknown_default_open_api");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,103 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
import org.openapitools.client.models.Category
|
||||
import org.openapitools.client.models.Pet
|
||||
import org.openapitools.client.models.Tag
|
||||
import org.openapitools.client.models.User
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param username
|
||||
* @param name
|
||||
* @param photoUrls
|
||||
* @param id
|
||||
* @param firstName
|
||||
* @param lastName
|
||||
* @param email
|
||||
* @param password
|
||||
* @param phone
|
||||
* @param userStatus User Status
|
||||
* @param category
|
||||
* @param tags
|
||||
* @param status pet status in the store
|
||||
*/
|
||||
|
||||
|
||||
data class AnyOfUserOrPetOrArrayString (
|
||||
|
||||
@SerializedName("username")
|
||||
val username: kotlin.String,
|
||||
|
||||
@SerializedName("name")
|
||||
val name: kotlin.String,
|
||||
|
||||
@SerializedName("photoUrls")
|
||||
val photoUrls: kotlin.collections.List<kotlin.String>,
|
||||
|
||||
@SerializedName("id")
|
||||
val id: kotlin.Long? = null,
|
||||
|
||||
@SerializedName("firstName")
|
||||
val firstName: kotlin.String? = null,
|
||||
|
||||
@SerializedName("lastName")
|
||||
val lastName: kotlin.String? = null,
|
||||
|
||||
@SerializedName("email")
|
||||
val email: kotlin.String? = null,
|
||||
|
||||
@SerializedName("password")
|
||||
val password: kotlin.String? = null,
|
||||
|
||||
@SerializedName("phone")
|
||||
val phone: kotlin.String? = null,
|
||||
|
||||
/* User Status */
|
||||
@SerializedName("userStatus")
|
||||
val userStatus: kotlin.Int? = null,
|
||||
|
||||
@SerializedName("category")
|
||||
val category: Category? = null,
|
||||
|
||||
@SerializedName("tags")
|
||||
val tags: kotlin.collections.List<Tag>? = null,
|
||||
|
||||
/* pet status in the store */
|
||||
@SerializedName("status")
|
||||
@Deprecated(message = "This property is deprecated.")
|
||||
val status: AnyOfUserOrPetOrArrayString.Status? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
*
|
||||
* Values: available,pending,sold,unknown_default_open_api
|
||||
*/
|
||||
enum class Status(val value: kotlin.String) {
|
||||
@SerializedName(value = "available") available("available"),
|
||||
@SerializedName(value = "pending") pending("pending"),
|
||||
@SerializedName(value = "sold") sold("sold"),
|
||||
@SerializedName(value = "unknown_default_open_api") unknown_default_open_api("unknown_default_open_api");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ data class Pet (
|
||||
|
||||
/* pet status in the store */
|
||||
@SerializedName("status")
|
||||
@Deprecated(message = "This property is deprecated.")
|
||||
val status: Pet.Status? = null
|
||||
|
||||
) {
|
||||
|
@ -21,8 +21,8 @@ import com.google.gson.annotations.SerializedName
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
*
|
||||
* @param id
|
||||
* @param username
|
||||
* @param id
|
||||
* @param firstName
|
||||
* @param lastName
|
||||
* @param email
|
||||
@ -34,12 +34,12 @@ import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class User (
|
||||
|
||||
@SerializedName("username")
|
||||
val username: kotlin.String,
|
||||
|
||||
@SerializedName("id")
|
||||
val id: kotlin.Long? = null,
|
||||
|
||||
@SerializedName("username")
|
||||
val username: kotlin.String? = null,
|
||||
|
||||
@SerializedName("firstName")
|
||||
val firstName: kotlin.String? = null,
|
||||
|
||||
|
@ -0,0 +1,103 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
import org.openapitools.client.models.Category
|
||||
import org.openapitools.client.models.Pet
|
||||
import org.openapitools.client.models.Tag
|
||||
import org.openapitools.client.models.User
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param username
|
||||
* @param name
|
||||
* @param photoUrls
|
||||
* @param id
|
||||
* @param firstName
|
||||
* @param lastName
|
||||
* @param email
|
||||
* @param password
|
||||
* @param phone
|
||||
* @param userStatus User Status
|
||||
* @param category
|
||||
* @param tags
|
||||
* @param status pet status in the store
|
||||
*/
|
||||
|
||||
|
||||
data class UserOrPet (
|
||||
|
||||
@SerializedName("username")
|
||||
val username: kotlin.String,
|
||||
|
||||
@SerializedName("name")
|
||||
val name: kotlin.String,
|
||||
|
||||
@SerializedName("photoUrls")
|
||||
val photoUrls: kotlin.collections.List<kotlin.String>,
|
||||
|
||||
@SerializedName("id")
|
||||
val id: kotlin.Long? = null,
|
||||
|
||||
@SerializedName("firstName")
|
||||
val firstName: kotlin.String? = null,
|
||||
|
||||
@SerializedName("lastName")
|
||||
val lastName: kotlin.String? = null,
|
||||
|
||||
@SerializedName("email")
|
||||
val email: kotlin.String? = null,
|
||||
|
||||
@SerializedName("password")
|
||||
val password: kotlin.String? = null,
|
||||
|
||||
@SerializedName("phone")
|
||||
val phone: kotlin.String? = null,
|
||||
|
||||
/* User Status */
|
||||
@SerializedName("userStatus")
|
||||
val userStatus: kotlin.Int? = null,
|
||||
|
||||
@SerializedName("category")
|
||||
val category: Category? = null,
|
||||
|
||||
@SerializedName("tags")
|
||||
val tags: kotlin.collections.List<Tag>? = null,
|
||||
|
||||
/* pet status in the store */
|
||||
@SerializedName("status")
|
||||
@Deprecated(message = "This property is deprecated.")
|
||||
val status: UserOrPet.Status? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
*
|
||||
* Values: available,pending,sold,unknown_default_open_api
|
||||
*/
|
||||
enum class Status(val value: kotlin.String) {
|
||||
@SerializedName(value = "available") available("available"),
|
||||
@SerializedName(value = "pending") pending("pending"),
|
||||
@SerializedName(value = "sold") sold("sold"),
|
||||
@SerializedName(value = "unknown_default_open_api") unknown_default_open_api("unknown_default_open_api");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,103 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
import org.openapitools.client.models.Category
|
||||
import org.openapitools.client.models.Pet
|
||||
import org.openapitools.client.models.Tag
|
||||
import org.openapitools.client.models.User
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param username
|
||||
* @param name
|
||||
* @param photoUrls
|
||||
* @param id
|
||||
* @param firstName
|
||||
* @param lastName
|
||||
* @param email
|
||||
* @param password
|
||||
* @param phone
|
||||
* @param userStatus User Status
|
||||
* @param category
|
||||
* @param tags
|
||||
* @param status pet status in the store
|
||||
*/
|
||||
|
||||
|
||||
data class UserOrPetOrArrayString (
|
||||
|
||||
@SerializedName("username")
|
||||
val username: kotlin.String,
|
||||
|
||||
@SerializedName("name")
|
||||
val name: kotlin.String,
|
||||
|
||||
@SerializedName("photoUrls")
|
||||
val photoUrls: kotlin.collections.List<kotlin.String>,
|
||||
|
||||
@SerializedName("id")
|
||||
val id: kotlin.Long? = null,
|
||||
|
||||
@SerializedName("firstName")
|
||||
val firstName: kotlin.String? = null,
|
||||
|
||||
@SerializedName("lastName")
|
||||
val lastName: kotlin.String? = null,
|
||||
|
||||
@SerializedName("email")
|
||||
val email: kotlin.String? = null,
|
||||
|
||||
@SerializedName("password")
|
||||
val password: kotlin.String? = null,
|
||||
|
||||
@SerializedName("phone")
|
||||
val phone: kotlin.String? = null,
|
||||
|
||||
/* User Status */
|
||||
@SerializedName("userStatus")
|
||||
val userStatus: kotlin.Int? = null,
|
||||
|
||||
@SerializedName("category")
|
||||
val category: Category? = null,
|
||||
|
||||
@SerializedName("tags")
|
||||
val tags: kotlin.collections.List<Tag>? = null,
|
||||
|
||||
/* pet status in the store */
|
||||
@SerializedName("status")
|
||||
@Deprecated(message = "This property is deprecated.")
|
||||
val status: UserOrPetOrArrayString.Status? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
*
|
||||
* Values: available,pending,sold,unknown_default_open_api
|
||||
*/
|
||||
enum class Status(val value: kotlin.String) {
|
||||
@SerializedName(value = "available") available("available"),
|
||||
@SerializedName(value = "pending") pending("pending"),
|
||||
@SerializedName(value = "sold") sold("sold"),
|
||||
@SerializedName(value = "unknown_default_open_api") unknown_default_open_api("unknown_default_open_api");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,47 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.apis
|
||||
|
||||
import io.kotlintest.shouldBe
|
||||
import io.kotlintest.specs.ShouldSpec
|
||||
|
||||
import org.openapitools.client.apis.FakeApi
|
||||
import org.openapitools.client.models.Annotation
|
||||
|
||||
class FakeApiTest : ShouldSpec() {
|
||||
init {
|
||||
// uncomment below to create an instance of FakeApi
|
||||
//val apiInstance = FakeApi()
|
||||
|
||||
// to test annotations
|
||||
should("test annotations") {
|
||||
// uncomment below to test annotations
|
||||
//val `annotation` : Annotation = // Annotation |
|
||||
//apiInstance.annotations(`annotation`)
|
||||
}
|
||||
|
||||
// to test updatePetWithFormNumber
|
||||
should("test updatePetWithFormNumber") {
|
||||
// uncomment below to test updatePetWithFormNumber
|
||||
//val petId : kotlin.Long = 789 // kotlin.Long | ID of pet that needs to be updated
|
||||
//val name : kotlin.String = name_example // kotlin.String | Updated name of the pet
|
||||
//val status : kotlin.Int = 56 // kotlin.Int | integer type
|
||||
//val status2 : java.math.BigDecimal = 8.14 // java.math.BigDecimal | number type
|
||||
//apiInstance.updatePetWithFormNumber(petId, name, status, status2)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
import io.kotlintest.shouldBe
|
||||
import io.kotlintest.specs.ShouldSpec
|
||||
|
||||
import org.openapitools.client.models.Annotation
|
||||
|
||||
class AnnotationTest : ShouldSpec() {
|
||||
init {
|
||||
// uncomment below to create an instance of Annotation
|
||||
//val modelInstance = Annotation()
|
||||
|
||||
// to test the property `id`
|
||||
should("test id") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.id shouldBe ("TODO")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
import io.kotlintest.shouldBe
|
||||
import io.kotlintest.specs.ShouldSpec
|
||||
|
||||
import org.openapitools.client.models.AnyOfUserOrPetOrArrayString
|
||||
import org.openapitools.client.models.Category
|
||||
import org.openapitools.client.models.Pet
|
||||
import org.openapitools.client.models.Tag
|
||||
import org.openapitools.client.models.User
|
||||
|
||||
class AnyOfUserOrPetOrArrayStringTest : ShouldSpec() {
|
||||
init {
|
||||
// uncomment below to create an instance of AnyOfUserOrPetOrArrayString
|
||||
//val modelInstance = AnyOfUserOrPetOrArrayString()
|
||||
|
||||
// to test the property `username`
|
||||
should("test username") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.username shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `name`
|
||||
should("test name") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.name shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `photoUrls`
|
||||
should("test photoUrls") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.photoUrls shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `id`
|
||||
should("test id") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.id shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `firstName`
|
||||
should("test firstName") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.firstName shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `lastName`
|
||||
should("test lastName") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.lastName shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `email`
|
||||
should("test email") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.email shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `password`
|
||||
should("test password") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.password shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `phone`
|
||||
should("test phone") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.phone shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `userStatus` - User Status
|
||||
should("test userStatus") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.userStatus shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `category`
|
||||
should("test category") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.category shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `tags`
|
||||
should("test tags") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.tags shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `status` - pet status in the store
|
||||
should("test status") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.status shouldBe ("TODO")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
import io.kotlintest.shouldBe
|
||||
import io.kotlintest.specs.ShouldSpec
|
||||
|
||||
import org.openapitools.client.models.AnyOfUserOrPet
|
||||
import org.openapitools.client.models.Category
|
||||
import org.openapitools.client.models.Pet
|
||||
import org.openapitools.client.models.Tag
|
||||
import org.openapitools.client.models.User
|
||||
|
||||
class AnyOfUserOrPetTest : ShouldSpec() {
|
||||
init {
|
||||
// uncomment below to create an instance of AnyOfUserOrPet
|
||||
//val modelInstance = AnyOfUserOrPet()
|
||||
|
||||
// to test the property `username`
|
||||
should("test username") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.username shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `name`
|
||||
should("test name") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.name shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `photoUrls`
|
||||
should("test photoUrls") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.photoUrls shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `id`
|
||||
should("test id") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.id shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `firstName`
|
||||
should("test firstName") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.firstName shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `lastName`
|
||||
should("test lastName") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.lastName shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `email`
|
||||
should("test email") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.email shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `password`
|
||||
should("test password") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.password shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `phone`
|
||||
should("test phone") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.phone shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `userStatus` - User Status
|
||||
should("test userStatus") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.userStatus shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `category`
|
||||
should("test category") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.category shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `tags`
|
||||
should("test tags") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.tags shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `status` - pet status in the store
|
||||
should("test status") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.status shouldBe ("TODO")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
import io.kotlintest.shouldBe
|
||||
import io.kotlintest.specs.ShouldSpec
|
||||
|
||||
import org.openapitools.client.models.UserOrPetOrArrayString
|
||||
import org.openapitools.client.models.Category
|
||||
import org.openapitools.client.models.Pet
|
||||
import org.openapitools.client.models.Tag
|
||||
import org.openapitools.client.models.User
|
||||
|
||||
class UserOrPetOrArrayStringTest : ShouldSpec() {
|
||||
init {
|
||||
// uncomment below to create an instance of UserOrPetOrArrayString
|
||||
//val modelInstance = UserOrPetOrArrayString()
|
||||
|
||||
// to test the property `username`
|
||||
should("test username") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.username shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `name`
|
||||
should("test name") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.name shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `photoUrls`
|
||||
should("test photoUrls") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.photoUrls shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `id`
|
||||
should("test id") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.id shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `firstName`
|
||||
should("test firstName") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.firstName shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `lastName`
|
||||
should("test lastName") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.lastName shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `email`
|
||||
should("test email") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.email shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `password`
|
||||
should("test password") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.password shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `phone`
|
||||
should("test phone") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.phone shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `userStatus` - User Status
|
||||
should("test userStatus") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.userStatus shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `category`
|
||||
should("test category") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.category shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `tags`
|
||||
should("test tags") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.tags shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `status` - pet status in the store
|
||||
should("test status") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.status shouldBe ("TODO")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
/**
|
||||
*
|
||||
* Please note:
|
||||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
*/
|
||||
|
||||
@file:Suppress(
|
||||
"ArrayInDataClass",
|
||||
"EnumEntryName",
|
||||
"RemoveRedundantQualifierName",
|
||||
"UnusedImport"
|
||||
)
|
||||
|
||||
package org.openapitools.client.models
|
||||
|
||||
import io.kotlintest.shouldBe
|
||||
import io.kotlintest.specs.ShouldSpec
|
||||
|
||||
import org.openapitools.client.models.UserOrPet
|
||||
import org.openapitools.client.models.Category
|
||||
import org.openapitools.client.models.Pet
|
||||
import org.openapitools.client.models.Tag
|
||||
import org.openapitools.client.models.User
|
||||
|
||||
class UserOrPetTest : ShouldSpec() {
|
||||
init {
|
||||
// uncomment below to create an instance of UserOrPet
|
||||
//val modelInstance = UserOrPet()
|
||||
|
||||
// to test the property `username`
|
||||
should("test username") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.username shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `name`
|
||||
should("test name") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.name shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `photoUrls`
|
||||
should("test photoUrls") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.photoUrls shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `id`
|
||||
should("test id") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.id shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `firstName`
|
||||
should("test firstName") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.firstName shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `lastName`
|
||||
should("test lastName") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.lastName shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `email`
|
||||
should("test email") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.email shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `password`
|
||||
should("test password") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.password shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `phone`
|
||||
should("test phone") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.phone shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `userStatus` - User Status
|
||||
should("test userStatus") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.userStatus shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `category`
|
||||
should("test category") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.category shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `tags`
|
||||
should("test tags") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.tags shouldBe ("TODO")
|
||||
}
|
||||
|
||||
// to test the property `status` - pet status in the store
|
||||
should("test status") {
|
||||
// uncomment below to test the property
|
||||
//modelInstance.status shouldBe ("TODO")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -46,6 +46,7 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
| Class | Method | HTTP request | Description |
|
||||
| ------------ | ------------- | ------------- | ------------- |
|
||||
| *FakeApi* | [**annotations**](docs/FakeApi.md#annotations) | **POST** fake/annotations | annotate |
|
||||
| *FakeApi* | [**updatePetWithFormNumber**](docs/FakeApi.md#updatepetwithformnumber) | **PUT** fake/annotations | Updates a pet in the store with form data (number) |
|
||||
| *PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** pet | Add a new pet to the store |
|
||||
| *PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** pet/{petId} | Deletes a pet |
|
||||
| *PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** pet/findByStatus | Finds Pets by status |
|
||||
|
@ -5,6 +5,7 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
| Method | HTTP request | Description |
|
||||
| ------------- | ------------- | ------------- |
|
||||
| [**annotations**](FakeApi.md#annotations) | **POST** fake/annotations | annotate |
|
||||
| [**updatePetWithFormNumber**](FakeApi.md#updatePetWithFormNumber) | **PUT** fake/annotations | Updates a pet in the store with form data (number) |
|
||||
|
||||
|
||||
|
||||
@ -44,3 +45,48 @@ No authorization required
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
Updates a pet in the store with form data (number)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.*
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiClient = ApiClient()
|
||||
val webService = apiClient.createWebservice(FakeApi::class.java)
|
||||
val petId : kotlin.Long = 789 // kotlin.Long | ID of pet that needs to be updated
|
||||
val name : kotlin.String = name_example // kotlin.String | Updated name of the pet
|
||||
val status : kotlin.Int = 56 // kotlin.Int | integer type
|
||||
val status2 : java.math.BigDecimal = 8.14 // java.math.BigDecimal | number type
|
||||
|
||||
launch(Dispatchers.IO) {
|
||||
webService.updatePetWithFormNumber(petId, name, status, status2)
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
| **petId** | **kotlin.Long**| ID of pet that needs to be updated | |
|
||||
| **name** | **kotlin.String**| Updated name of the pet | [optional] |
|
||||
| **status** | **kotlin.Int**| integer type | [optional] |
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **status2** | **java.math.BigDecimal**| number type | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
@ -22,4 +22,21 @@ interface FakeApi {
|
||||
@POST("fake/annotations")
|
||||
suspend fun annotations(@Body apiAnnotation: ApiAnnotation): Response<Unit>
|
||||
|
||||
/**
|
||||
* PUT fake/annotations
|
||||
* Updates a pet in the store with form data (number)
|
||||
*
|
||||
* Responses:
|
||||
* - 405: Invalid input
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated
|
||||
* @param name Updated name of the pet (optional)
|
||||
* @param status integer type (optional)
|
||||
* @param status2 number type (optional)
|
||||
* @return [Unit]
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@PUT("fake/annotations")
|
||||
suspend fun updatePetWithFormNumber(@Path("petId") petId: kotlin.Long, @Field("name") name: kotlin.String? = null, @Field("status") status: kotlin.Int? = null, @Field("status2") status2: java.math.BigDecimal? = null): Response<Unit>
|
||||
|
||||
}
|
||||
|
@ -48,4 +48,21 @@ class FakeApiController() {
|
||||
fun annotations(@Parameter(description = "", required = true) @Valid @RequestBody `annotation`: Annotation): ResponseEntity<Unit> {
|
||||
return ResponseEntity(HttpStatus.NOT_IMPLEMENTED)
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "Updates a pet in the store with form data (number)",
|
||||
operationId = "updatePetWithFormNumber",
|
||||
description = """""",
|
||||
responses = [
|
||||
ApiResponse(responseCode = "405", description = "Invalid input") ],
|
||||
security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ]
|
||||
)
|
||||
@RequestMapping(
|
||||
method = [RequestMethod.PUT],
|
||||
value = ["/fake/annotations"],
|
||||
consumes = ["application/x-www-form-urlencoded"]
|
||||
)
|
||||
fun updatePetWithFormNumber(@Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) name: kotlin.String? ,@Parameter(description = "integer type") @Valid @RequestParam(value = "status", required = false) status: kotlin.Int? ,@Parameter(description = "number type") @Valid @RequestParam(value = "status2", required = false) status2: java.math.BigDecimal? ): ResponseEntity<Unit> {
|
||||
return ResponseEntity(HttpStatus.NOT_IMPLEMENTED)
|
||||
}
|
||||
}
|
||||
|
@ -597,6 +597,34 @@ paths:
|
||||
summary: annotate
|
||||
tags:
|
||||
- fake
|
||||
put:
|
||||
description: ""
|
||||
operationId: updatePetWithFormNumber
|
||||
parameters:
|
||||
- description: ID of pet that needs to be updated
|
||||
explode: false
|
||||
in: path
|
||||
name: petId
|
||||
required: true
|
||||
schema:
|
||||
format: int64
|
||||
type: integer
|
||||
style: simple
|
||||
requestBody:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
$ref: "#/components/schemas/updatePetWithFormNumber_request"
|
||||
responses:
|
||||
"405":
|
||||
description: Invalid input
|
||||
security:
|
||||
- petstore_auth:
|
||||
- write:pets
|
||||
- read:pets
|
||||
summary: Updates a pet in the store with form data (number)
|
||||
tags:
|
||||
- fake
|
||||
components:
|
||||
requestBodies:
|
||||
UserArray:
|
||||
@ -843,6 +871,18 @@ components:
|
||||
format: binary
|
||||
type: string
|
||||
type: object
|
||||
updatePetWithFormNumber_request:
|
||||
properties:
|
||||
name:
|
||||
description: Updated name of the pet
|
||||
type: string
|
||||
status:
|
||||
description: integer type
|
||||
type: integer
|
||||
status2:
|
||||
description: number type
|
||||
type: number
|
||||
type: object
|
||||
securitySchemes:
|
||||
petstore_auth:
|
||||
flows:
|
||||
|
Loading…
x
Reference in New Issue
Block a user