forked from loafle/openapi-generator-original
[Kotlin][Client] Added supporting Retrofit2(RxJava/RxJava2/Coroutines) (#5750)
* Added support Retrofit2(RxJava/RxJava2/Coroutines) to Kotlin client code generator
* Added generated samples for Retrofit2(RxJava/RxJava2/Coroutines) on Kotlin
* Fixed generating retrofit2 without Rx/Coroutines
* Fixed MultipartBody template, remove redundant space after MultipartBody.Part annotation
* Fix documentation diff.
* Fix generating build.gradle file for samples.
Add dependencies for rxJava/rxJava2 and rx retrofit's adapter.
* Update generated sample with rx dependencies
* Update generated sample with coroutines
* Update generated sample with RxJava 2 dependencies
* Update and refactoring scripts for sample generation
* Update generated sample code
* revert changes by mistake
* revert changes by mistake #2
* Fix return type for first RxJava
* Add RxJavaCallAdapterFactory to ApiClient scheme for RxJava 1/2
* Fix script loggin
* Update generated code for RxJava 1/2
* Fix kotlin.md documentation by script export_docs_generators.sh
* Update Kotlin samples project in pom.xml
* Revert "Update Kotlin samples project in pom.xml"
This reverts commit 9de4d0ba
* Fixed "" wrapping number types for annotation value
Fixed generating polymorphic interfaces for Gson, interface fields can't be marked with @SerializedName annotation, it's enough to mark it in child model.
Fixed instantiationTypes(array, list, map) for Kotlin generator
* Update Kotlin samples project after last fixes
* Update Kotlin samples project for kotlin-jvm-*
* Update Kotlin readme.md documentations
* Update Kotlin client sample changes
* Fixed encoding braces for generics model
* Update Kotlin client sample changes
* Update Kotlin client sample after merge with master
* Fixed adding empty braces for inherit from Map/Array
* Update sample model after last fix with empty braces
* Revert adding @SerializedName to Kotlin interface fields through @get:SerializedName as for Jackson
* Update Kotlin client samples with adding @get:SerializedName
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
|
||||
# Model200Response
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **kotlin.Int** | | [optional]
|
||||
**propertyClass** | **kotlin.String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
# AdditionalPropertiesClass
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**mapProperty** | **kotlin.collections.Map<kotlin.String, kotlin.String>** | | [optional]
|
||||
**mapOfMapProperty** | **kotlin.collections.Map<kotlin.String, kotlin.collections.Map<kotlin.String, kotlin.String>>** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
# Animal
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **kotlin.String** | |
|
||||
**color** | **kotlin.String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
# AnotherFakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
|
||||
|
||||
<a name="call123testSpecialTags"></a>
|
||||
# **call123testSpecialTags**
|
||||
> Client call123testSpecialTags(client)
|
||||
|
||||
To test special tags
|
||||
|
||||
To test special tags and operation ID starting with number
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = AnotherFakeApi()
|
||||
val client : Client = // Client | client model
|
||||
try {
|
||||
val result : Client = apiInstance.call123testSpecialTags(client)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling AnotherFakeApi#call123testSpecialTags")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling AnotherFakeApi#call123testSpecialTags")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Client**](Client.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
# ApiResponse
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **kotlin.Int** | | [optional]
|
||||
**type** | **kotlin.String** | | [optional]
|
||||
**message** | **kotlin.String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
# ArrayOfArrayOfNumberOnly
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**arrayArrayNumber** | **kotlin.Array<kotlin.Array<java.math.BigDecimal>>** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
# ArrayOfNumberOnly
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**arrayNumber** | [**kotlin.Array<java.math.BigDecimal>**](java.math.BigDecimal.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
# ArrayTest
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**arrayOfString** | **kotlin.Array<kotlin.String>** | | [optional]
|
||||
**arrayArrayOfInteger** | **kotlin.Array<kotlin.Array<kotlin.Long>>** | | [optional]
|
||||
**arrayArrayOfModel** | **kotlin.Array<kotlin.Array<ReadOnlyFirst>>** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
# Capitalization
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**smallCamel** | **kotlin.String** | | [optional]
|
||||
**capitalCamel** | **kotlin.String** | | [optional]
|
||||
**smallSnake** | **kotlin.String** | | [optional]
|
||||
**capitalSnake** | **kotlin.String** | | [optional]
|
||||
**scAETHFlowPoints** | **kotlin.String** | | [optional]
|
||||
**ATT_NAME** | **kotlin.String** | Name of the pet | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
# Cat
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**declawed** | **kotlin.Boolean** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
# CatAllOf
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**declawed** | **kotlin.Boolean** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
# Category
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **kotlin.String** | |
|
||||
**id** | **kotlin.Long** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
# ClassModel
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**propertyClass** | **kotlin.String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
# Client
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**client** | **kotlin.String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
# DefaultApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**fooGet**](DefaultApi.md#fooGet) | **GET** /foo |
|
||||
|
||||
|
||||
<a name="fooGet"></a>
|
||||
# **fooGet**
|
||||
> InlineResponseDefault fooGet()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = DefaultApi()
|
||||
try {
|
||||
val result : InlineResponseDefault = apiInstance.fooGet()
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling DefaultApi#fooGet")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling DefaultApi#fooGet")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponseDefault**](InlineResponseDefault.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
# Dog
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**breed** | **kotlin.String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
# DogAllOf
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**breed** | **kotlin.String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
# EnumArrays
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**justSymbol** | [**inline**](#JustSymbolEnum) | | [optional]
|
||||
**arrayEnum** | [**inline**](#kotlin.Array<ArrayEnumEnum>) | | [optional]
|
||||
|
||||
|
||||
<a name="JustSymbolEnum"></a>
|
||||
## Enum: just_symbol
|
||||
Name | Value
|
||||
---- | -----
|
||||
justSymbol | >=, $
|
||||
|
||||
|
||||
<a name="kotlin.Array<ArrayEnumEnum>"></a>
|
||||
## Enum: array_enum
|
||||
Name | Value
|
||||
---- | -----
|
||||
arrayEnum | fish, crab
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
# EnumClass
|
||||
|
||||
## Enum
|
||||
|
||||
|
||||
* `abc` (value: `"_abc"`)
|
||||
|
||||
* `minusEfg` (value: `"-efg"`)
|
||||
|
||||
* `leftParenthesisXyzRightParenthesis` (value: `"(xyz)"`)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
|
||||
# EnumTest
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**enumStringRequired** | [**inline**](#EnumStringRequiredEnum) | |
|
||||
**enumString** | [**inline**](#EnumStringEnum) | | [optional]
|
||||
**enumInteger** | [**inline**](#EnumIntegerEnum) | | [optional]
|
||||
**enumNumber** | [**inline**](#EnumNumberEnum) | | [optional]
|
||||
**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
|
||||
**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional]
|
||||
**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional]
|
||||
**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional]
|
||||
|
||||
|
||||
<a name="EnumStringRequiredEnum"></a>
|
||||
## Enum: enum_string_required
|
||||
Name | Value
|
||||
---- | -----
|
||||
enumStringRequired | UPPER, lower,
|
||||
|
||||
|
||||
<a name="EnumStringEnum"></a>
|
||||
## Enum: enum_string
|
||||
Name | Value
|
||||
---- | -----
|
||||
enumString | UPPER, lower,
|
||||
|
||||
|
||||
<a name="EnumIntegerEnum"></a>
|
||||
## Enum: enum_integer
|
||||
Name | Value
|
||||
---- | -----
|
||||
enumInteger | 1, -1
|
||||
|
||||
|
||||
<a name="EnumNumberEnum"></a>
|
||||
## Enum: enum_number
|
||||
Name | Value
|
||||
---- | -----
|
||||
enumNumber | 1.1, -1.2
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,776 @@
|
||||
# FakeApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint
|
||||
[**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication
|
||||
[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
|
||||
[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
||||
[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-paramters |
|
||||
|
||||
|
||||
<a name="fakeHealthGet"></a>
|
||||
# **fakeHealthGet**
|
||||
> HealthCheckResult fakeHealthGet()
|
||||
|
||||
Health check endpoint
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = FakeApi()
|
||||
try {
|
||||
val result : HealthCheckResult = apiInstance.fakeHealthGet()
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling FakeApi#fakeHealthGet")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling FakeApi#fakeHealthGet")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**HealthCheckResult**](HealthCheckResult.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="fakeHttpSignatureTest"></a>
|
||||
# **fakeHttpSignatureTest**
|
||||
> fakeHttpSignatureTest(pet, query1, header1)
|
||||
|
||||
test http signature authentication
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = FakeApi()
|
||||
val pet : Pet = // Pet | Pet object that needs to be added to the store
|
||||
val query1 : kotlin.String = query1_example // kotlin.String | query parameter
|
||||
val header1 : kotlin.String = header1_example // kotlin.String | header parameter
|
||||
try {
|
||||
apiInstance.fakeHttpSignatureTest(pet, query1, header1)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling FakeApi#fakeHttpSignatureTest")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling FakeApi#fakeHttpSignatureTest")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
**query1** | **kotlin.String**| query parameter | [optional]
|
||||
**header1** | **kotlin.String**| header parameter | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="fakeOuterBooleanSerialize"></a>
|
||||
# **fakeOuterBooleanSerialize**
|
||||
> kotlin.Boolean fakeOuterBooleanSerialize(body)
|
||||
|
||||
|
||||
|
||||
Test serialization of outer boolean types
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = FakeApi()
|
||||
val body : kotlin.Boolean = true // kotlin.Boolean | Input boolean as post body
|
||||
try {
|
||||
val result : kotlin.Boolean = apiInstance.fakeOuterBooleanSerialize(body)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling FakeApi#fakeOuterBooleanSerialize")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling FakeApi#fakeOuterBooleanSerialize")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **kotlin.Boolean**| Input boolean as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**kotlin.Boolean**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="fakeOuterCompositeSerialize"></a>
|
||||
# **fakeOuterCompositeSerialize**
|
||||
> OuterComposite fakeOuterCompositeSerialize(outerComposite)
|
||||
|
||||
|
||||
|
||||
Test serialization of object with outer number type
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = FakeApi()
|
||||
val outerComposite : OuterComposite = // OuterComposite | Input composite as post body
|
||||
try {
|
||||
val result : OuterComposite = apiInstance.fakeOuterCompositeSerialize(outerComposite)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling FakeApi#fakeOuterCompositeSerialize")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling FakeApi#fakeOuterCompositeSerialize")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**OuterComposite**](OuterComposite.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="fakeOuterNumberSerialize"></a>
|
||||
# **fakeOuterNumberSerialize**
|
||||
> java.math.BigDecimal fakeOuterNumberSerialize(body)
|
||||
|
||||
|
||||
|
||||
Test serialization of outer number types
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = FakeApi()
|
||||
val body : java.math.BigDecimal = 8.14 // java.math.BigDecimal | Input number as post body
|
||||
try {
|
||||
val result : java.math.BigDecimal = apiInstance.fakeOuterNumberSerialize(body)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling FakeApi#fakeOuterNumberSerialize")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling FakeApi#fakeOuterNumberSerialize")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **java.math.BigDecimal**| Input number as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**java.math.BigDecimal**](java.math.BigDecimal.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="fakeOuterStringSerialize"></a>
|
||||
# **fakeOuterStringSerialize**
|
||||
> kotlin.String fakeOuterStringSerialize(body)
|
||||
|
||||
|
||||
|
||||
Test serialization of outer string types
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = FakeApi()
|
||||
val body : kotlin.String = body_example // kotlin.String | Input string as post body
|
||||
try {
|
||||
val result : kotlin.String = apiInstance.fakeOuterStringSerialize(body)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling FakeApi#fakeOuterStringSerialize")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling FakeApi#fakeOuterStringSerialize")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **kotlin.String**| Input string as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**kotlin.String**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="testBodyWithFileSchema"></a>
|
||||
# **testBodyWithFileSchema**
|
||||
> testBodyWithFileSchema(fileSchemaTestClass)
|
||||
|
||||
|
||||
|
||||
For this test, the body for this request much reference a schema named `File`.
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = FakeApi()
|
||||
val fileSchemaTestClass : FileSchemaTestClass = // FileSchemaTestClass |
|
||||
try {
|
||||
apiInstance.testBodyWithFileSchema(fileSchemaTestClass)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling FakeApi#testBodyWithFileSchema")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling FakeApi#testBodyWithFileSchema")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testBodyWithQueryParams"></a>
|
||||
# **testBodyWithQueryParams**
|
||||
> testBodyWithQueryParams(query, user)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = FakeApi()
|
||||
val query : kotlin.String = query_example // kotlin.String |
|
||||
val user : User = // User |
|
||||
try {
|
||||
apiInstance.testBodyWithQueryParams(query, user)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling FakeApi#testBodyWithQueryParams")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling FakeApi#testBodyWithQueryParams")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**query** | **kotlin.String**| |
|
||||
**user** | [**User**](User.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testClientModel"></a>
|
||||
# **testClientModel**
|
||||
> Client testClientModel(client)
|
||||
|
||||
To test \"client\" model
|
||||
|
||||
To test \"client\" model
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = FakeApi()
|
||||
val client : Client = // Client | client model
|
||||
try {
|
||||
val result : Client = apiInstance.testClientModel(client)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling FakeApi#testClientModel")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling FakeApi#testClientModel")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Client**](Client.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="testEndpointParameters"></a>
|
||||
# **testEndpointParameters**
|
||||
> testEndpointParameters(number, double, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, paramCallback)
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = FakeApi()
|
||||
val number : java.math.BigDecimal = 8.14 // java.math.BigDecimal | None
|
||||
val double : kotlin.Double = 1.2 // kotlin.Double | None
|
||||
val patternWithoutDelimiter : kotlin.String = patternWithoutDelimiter_example // kotlin.String | None
|
||||
val byte : kotlin.ByteArray = BYTE_ARRAY_DATA_HERE // kotlin.ByteArray | None
|
||||
val integer : kotlin.Int = 56 // kotlin.Int | None
|
||||
val int32 : kotlin.Int = 56 // kotlin.Int | None
|
||||
val int64 : kotlin.Long = 789 // kotlin.Long | None
|
||||
val float : kotlin.Float = 3.4 // kotlin.Float | None
|
||||
val string : kotlin.String = string_example // kotlin.String | None
|
||||
val binary : java.io.File = BINARY_DATA_HERE // java.io.File | None
|
||||
val date : java.time.LocalDate = 2013-10-20 // java.time.LocalDate | None
|
||||
val dateTime : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | None
|
||||
val password : kotlin.String = password_example // kotlin.String | None
|
||||
val paramCallback : kotlin.String = paramCallback_example // kotlin.String | None
|
||||
try {
|
||||
apiInstance.testEndpointParameters(number, double, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, paramCallback)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling FakeApi#testEndpointParameters")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling FakeApi#testEndpointParameters")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**number** | **java.math.BigDecimal**| None |
|
||||
**double** | **kotlin.Double**| None |
|
||||
**patternWithoutDelimiter** | **kotlin.String**| None |
|
||||
**byte** | **kotlin.ByteArray**| None |
|
||||
**integer** | **kotlin.Int**| None | [optional]
|
||||
**int32** | **kotlin.Int**| None | [optional]
|
||||
**int64** | **kotlin.Long**| None | [optional]
|
||||
**float** | **kotlin.Float**| None | [optional]
|
||||
**string** | **kotlin.String**| None | [optional]
|
||||
**binary** | **java.io.File**| None | [optional]
|
||||
**date** | **java.time.LocalDate**| None | [optional]
|
||||
**dateTime** | **java.time.OffsetDateTime**| None | [optional]
|
||||
**password** | **kotlin.String**| None | [optional]
|
||||
**paramCallback** | **kotlin.String**| None | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
||||
Configure http_basic_test:
|
||||
ApiClient.username = ""
|
||||
ApiClient.password = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testEnumParameters"></a>
|
||||
# **testEnumParameters**
|
||||
> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString)
|
||||
|
||||
To test enum parameters
|
||||
|
||||
To test enum parameters
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = FakeApi()
|
||||
val enumHeaderStringArray : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Header parameter enum test (string array)
|
||||
val enumHeaderString : kotlin.String = enumHeaderString_example // kotlin.String | Header parameter enum test (string)
|
||||
val enumQueryStringArray : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Query parameter enum test (string array)
|
||||
val enumQueryString : kotlin.String = enumQueryString_example // kotlin.String | Query parameter enum test (string)
|
||||
val enumQueryInteger : kotlin.Int = 56 // kotlin.Int | Query parameter enum test (double)
|
||||
val enumQueryDouble : kotlin.Double = 1.2 // kotlin.Double | Query parameter enum test (double)
|
||||
val enumFormStringArray : kotlin.Array<kotlin.String> = enumFormStringArray_example // kotlin.Array<kotlin.String> | Form parameter enum test (string array)
|
||||
val enumFormString : kotlin.String = enumFormString_example // kotlin.String | Form parameter enum test (string)
|
||||
try {
|
||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling FakeApi#testEnumParameters")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling FakeApi#testEnumParameters")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**enumHeaderStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Header parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumHeaderString** | **kotlin.String**| Header parameter enum test (string) | [optional] [default to '-efg'] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Query parameter enum test (string array) | [optional] [enum: >, $]
|
||||
**enumQueryString** | **kotlin.String**| Query parameter enum test (string) | [optional] [default to '-efg'] [enum: _abc, -efg, (xyz)]
|
||||
**enumQueryInteger** | **kotlin.Int**| Query parameter enum test (double) | [optional] [enum: 1, -2]
|
||||
**enumQueryDouble** | **kotlin.Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2]
|
||||
**enumFormStringArray** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Form parameter enum test (string array) | [optional] [default to '$'] [enum: >, $]
|
||||
**enumFormString** | **kotlin.String**| Form parameter enum test (string) | [optional] [default to '-efg'] [enum: _abc, -efg, (xyz)]
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testGroupParameters"></a>
|
||||
# **testGroupParameters**
|
||||
> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group)
|
||||
|
||||
Fake endpoint to test group parameters (optional)
|
||||
|
||||
Fake endpoint to test group parameters (optional)
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = FakeApi()
|
||||
val requiredStringGroup : kotlin.Int = 56 // kotlin.Int | Required String in group parameters
|
||||
val requiredBooleanGroup : kotlin.Boolean = true // kotlin.Boolean | Required Boolean in group parameters
|
||||
val requiredInt64Group : kotlin.Long = 789 // kotlin.Long | Required Integer in group parameters
|
||||
val stringGroup : kotlin.Int = 56 // kotlin.Int | String in group parameters
|
||||
val booleanGroup : kotlin.Boolean = true // kotlin.Boolean | Boolean in group parameters
|
||||
val int64Group : kotlin.Long = 789 // kotlin.Long | Integer in group parameters
|
||||
try {
|
||||
apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling FakeApi#testGroupParameters")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling FakeApi#testGroupParameters")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**requiredStringGroup** | **kotlin.Int**| Required String in group parameters |
|
||||
**requiredBooleanGroup** | **kotlin.Boolean**| Required Boolean in group parameters |
|
||||
**requiredInt64Group** | **kotlin.Long**| Required Integer in group parameters |
|
||||
**stringGroup** | **kotlin.Int**| String in group parameters | [optional]
|
||||
**booleanGroup** | **kotlin.Boolean**| Boolean in group parameters | [optional]
|
||||
**int64Group** | **kotlin.Long**| Integer in group parameters | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
||||
Configure bearer_test:
|
||||
ApiClient.accessToken = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testInlineAdditionalProperties"></a>
|
||||
# **testInlineAdditionalProperties**
|
||||
> testInlineAdditionalProperties(requestBody)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = FakeApi()
|
||||
val requestBody : kotlin.collections.Map<kotlin.String, kotlin.String> = // kotlin.collections.Map<kotlin.String, kotlin.String> | request body
|
||||
try {
|
||||
apiInstance.testInlineAdditionalProperties(requestBody)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling FakeApi#testInlineAdditionalProperties")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling FakeApi#testInlineAdditionalProperties")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**requestBody** | [**kotlin.collections.Map<kotlin.String, kotlin.String>**](kotlin.String.md)| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testJsonFormData"></a>
|
||||
# **testJsonFormData**
|
||||
> testJsonFormData(param, param2)
|
||||
|
||||
test json serialization of form data
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = FakeApi()
|
||||
val param : kotlin.String = param_example // kotlin.String | field1
|
||||
val param2 : kotlin.String = param2_example // kotlin.String | field2
|
||||
try {
|
||||
apiInstance.testJsonFormData(param, param2)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling FakeApi#testJsonFormData")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling FakeApi#testJsonFormData")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **kotlin.String**| field1 |
|
||||
**param2** | **kotlin.String**| field2 |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testQueryParameterCollectionFormat"></a>
|
||||
# **testQueryParameterCollectionFormat**
|
||||
> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context)
|
||||
|
||||
|
||||
|
||||
To test the collection format in query parameters
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = FakeApi()
|
||||
val pipe : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val ioutil : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val http : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val url : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
val context : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> |
|
||||
try {
|
||||
apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling FakeApi#testQueryParameterCollectionFormat")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling FakeApi#testQueryParameterCollectionFormat")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pipe** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**ioutil** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**http** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**url** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
**context** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
# FakeClassnameTags123Api
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
|
||||
|
||||
<a name="testClassname"></a>
|
||||
# **testClassname**
|
||||
> Client testClassname(client)
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = FakeClassnameTags123Api()
|
||||
val client : Client = // Client | client model
|
||||
try {
|
||||
val result : Client = apiInstance.testClassname(client)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling FakeClassnameTags123Api#testClassname")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling FakeClassnameTags123Api#testClassname")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Client**](Client.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
||||
Configure api_key_query:
|
||||
ApiClient.apiKey["api_key_query"] = ""
|
||||
ApiClient.apiKeyPrefix["api_key_query"] = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
# FileSchemaTestClass
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**file** | [**java.io.File**](java.io.File.md) | | [optional]
|
||||
**files** | [**kotlin.Array<java.io.File>**](java.io.File.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
# Foo
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **kotlin.String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
# FormatTest
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**number** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | |
|
||||
**byte** | **kotlin.ByteArray** | |
|
||||
**date** | [**java.time.LocalDate**](java.time.LocalDate.md) | |
|
||||
**password** | **kotlin.String** | |
|
||||
**integer** | **kotlin.Int** | | [optional]
|
||||
**int32** | **kotlin.Int** | | [optional]
|
||||
**int64** | **kotlin.Long** | | [optional]
|
||||
**float** | **kotlin.Float** | | [optional]
|
||||
**double** | **kotlin.Double** | | [optional]
|
||||
**string** | **kotlin.String** | | [optional]
|
||||
**binary** | [**java.io.File**](java.io.File.md) | | [optional]
|
||||
**dateTime** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional]
|
||||
**uuid** | [**java.util.UUID**](java.util.UUID.md) | | [optional]
|
||||
**patternWithDigits** | **kotlin.String** | A string that is a 10 digit number. Can have leading zeros. | [optional]
|
||||
**patternWithDigitsAndDelimiter** | **kotlin.String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
# HasOnlyReadOnly
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **kotlin.String** | | [optional] [readonly]
|
||||
**foo** | **kotlin.String** | | [optional] [readonly]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
# HealthCheckResult
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**nullableMessage** | **kotlin.String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
# InlineObject
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **kotlin.String** | Updated name of the pet | [optional]
|
||||
**status** | **kotlin.String** | Updated status of the pet | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
# InlineObject1
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**additionalMetadata** | **kotlin.String** | Additional data to pass to server | [optional]
|
||||
**file** | [**java.io.File**](java.io.File.md) | file to upload | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
# InlineObject2
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**enumFormStringArray** | [**inline**](#kotlin.Array<EnumFormStringArrayEnum>) | Form parameter enum test (string array) | [optional]
|
||||
**enumFormString** | [**inline**](#EnumFormStringEnum) | Form parameter enum test (string) | [optional]
|
||||
|
||||
|
||||
<a name="kotlin.Array<EnumFormStringArrayEnum>"></a>
|
||||
## Enum: enum_form_string_array
|
||||
Name | Value
|
||||
---- | -----
|
||||
enumFormStringArray | >, $
|
||||
|
||||
|
||||
<a name="EnumFormStringEnum"></a>
|
||||
## Enum: enum_form_string
|
||||
Name | Value
|
||||
---- | -----
|
||||
enumFormString | _abc, -efg, (xyz)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
# InlineObject3
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**number** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | None |
|
||||
**double** | **kotlin.Double** | None |
|
||||
**patternWithoutDelimiter** | **kotlin.String** | None |
|
||||
**byte** | **kotlin.ByteArray** | None |
|
||||
**integer** | **kotlin.Int** | None | [optional]
|
||||
**int32** | **kotlin.Int** | None | [optional]
|
||||
**int64** | **kotlin.Long** | None | [optional]
|
||||
**float** | **kotlin.Float** | None | [optional]
|
||||
**string** | **kotlin.String** | None | [optional]
|
||||
**binary** | [**java.io.File**](java.io.File.md) | None | [optional]
|
||||
**date** | [**java.time.LocalDate**](java.time.LocalDate.md) | None | [optional]
|
||||
**dateTime** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | None | [optional]
|
||||
**password** | **kotlin.String** | None | [optional]
|
||||
**callback** | **kotlin.String** | None | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
# InlineObject4
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**param** | **kotlin.String** | field1 |
|
||||
**param2** | **kotlin.String** | field2 |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
# InlineObject5
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**requiredFile** | [**java.io.File**](java.io.File.md) | file to upload |
|
||||
**additionalMetadata** | **kotlin.String** | Additional data to pass to server | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
# InlineResponseDefault
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**string** | [**Foo**](Foo.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
# List
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**`123minusList`** | **kotlin.String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
# MapTest
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**mapMapOfString** | **kotlin.collections.Map<kotlin.String, kotlin.collections.Map<kotlin.String, kotlin.String>>** | | [optional]
|
||||
**mapOfEnumString** | [**inline**](#kotlin.collections.Map<kotlin.String, InnerEnum>) | | [optional]
|
||||
**directMap** | **kotlin.collections.Map<kotlin.String, kotlin.Boolean>** | | [optional]
|
||||
**indirectMap** | **kotlin.collections.Map<kotlin.String, kotlin.Boolean>** | | [optional]
|
||||
|
||||
|
||||
<a name="kotlin.collections.Map<kotlin.String, InnerEnum>"></a>
|
||||
## Enum: map_of_enum_string
|
||||
Name | Value
|
||||
---- | -----
|
||||
mapOfEnumString | UPPER, lower
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
# MixedPropertiesAndAdditionalPropertiesClass
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**uuid** | [**java.util.UUID**](java.util.UUID.md) | | [optional]
|
||||
**dateTime** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional]
|
||||
**map** | [**kotlin.collections.Map<kotlin.String, Animal>**](Animal.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
# Name
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **kotlin.Int** | |
|
||||
**snakeCase** | **kotlin.Int** | | [optional] [readonly]
|
||||
**property** | **kotlin.String** | | [optional]
|
||||
**`123number`** | **kotlin.Int** | | [optional] [readonly]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
# NullableClass
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**integerProp** | **kotlin.Int** | | [optional]
|
||||
**numberProp** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | | [optional]
|
||||
**booleanProp** | **kotlin.Boolean** | | [optional]
|
||||
**stringProp** | **kotlin.String** | | [optional]
|
||||
**dateProp** | [**java.time.LocalDate**](java.time.LocalDate.md) | | [optional]
|
||||
**datetimeProp** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional]
|
||||
**arrayNullableProp** | [**kotlin.Array<kotlin.Any>**](kotlin.Any.md) | | [optional]
|
||||
**arrayAndItemsNullableProp** | [**kotlin.Array<kotlin.Any>**](kotlin.Any.md) | | [optional]
|
||||
**arrayItemsNullable** | [**kotlin.Array<kotlin.Any>**](kotlin.Any.md) | | [optional]
|
||||
**objectNullableProp** | [**kotlin.collections.Map<kotlin.String, kotlin.Any>**](kotlin.Any.md) | | [optional]
|
||||
**objectAndItemsNullableProp** | [**kotlin.collections.Map<kotlin.String, kotlin.Any>**](kotlin.Any.md) | | [optional]
|
||||
**objectItemsNullable** | [**kotlin.collections.Map<kotlin.String, kotlin.Any>**](kotlin.Any.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
# NumberOnly
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**justNumber** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
# Order
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **kotlin.Long** | | [optional]
|
||||
**petId** | **kotlin.Long** | | [optional]
|
||||
**quantity** | **kotlin.Int** | | [optional]
|
||||
**shipDate** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | | [optional]
|
||||
**status** | [**inline**](#StatusEnum) | Order Status | [optional]
|
||||
**complete** | **kotlin.Boolean** | | [optional]
|
||||
|
||||
|
||||
<a name="StatusEnum"></a>
|
||||
## Enum: status
|
||||
Name | Value
|
||||
---- | -----
|
||||
status | placed, approved, delivered
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
# OuterComposite
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**myNumber** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | | [optional]
|
||||
**myString** | **kotlin.String** | | [optional]
|
||||
**myBoolean** | **kotlin.Boolean** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
# OuterEnum
|
||||
|
||||
## Enum
|
||||
|
||||
|
||||
* `placed` (value: `"placed"`)
|
||||
|
||||
* `approved` (value: `"approved"`)
|
||||
|
||||
* `delivered` (value: `"delivered"`)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
# OuterEnumDefaultValue
|
||||
|
||||
## Enum
|
||||
|
||||
|
||||
* `placed` (value: `"placed"`)
|
||||
|
||||
* `approved` (value: `"approved"`)
|
||||
|
||||
* `delivered` (value: `"delivered"`)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
# OuterEnumInteger
|
||||
|
||||
## Enum
|
||||
|
||||
|
||||
* `_0` (value: `0`)
|
||||
|
||||
* `_1` (value: `1`)
|
||||
|
||||
* `_2` (value: `2`)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
# OuterEnumIntegerDefaultValue
|
||||
|
||||
## Enum
|
||||
|
||||
|
||||
* `_0` (value: `0`)
|
||||
|
||||
* `_1` (value: `1`)
|
||||
|
||||
* `_2` (value: `2`)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
# Pet
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **kotlin.String** | |
|
||||
**photoUrls** | **kotlin.Array<kotlin.String>** | |
|
||||
**id** | **kotlin.Long** | | [optional]
|
||||
**category** | [**Category**](Category.md) | | [optional]
|
||||
**tags** | [**kotlin.Array<Tag>**](Tag.md) | | [optional]
|
||||
**status** | [**inline**](#StatusEnum) | pet status in the store | [optional]
|
||||
|
||||
|
||||
<a name="StatusEnum"></a>
|
||||
## Enum: status
|
||||
Name | Value
|
||||
---- | -----
|
||||
status | available, pending, sold
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,457 @@
|
||||
# PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||
[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
|
||||
|
||||
<a name="addPet"></a>
|
||||
# **addPet**
|
||||
> addPet(pet)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val pet : Pet = // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
apiInstance.addPet(pet)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling PetApi#addPet")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling PetApi#addPet")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
||||
Configure petstore_auth:
|
||||
ApiClient.accessToken = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="deletePet"></a>
|
||||
# **deletePet**
|
||||
> deletePet(petId, apiKey)
|
||||
|
||||
Deletes a pet
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val petId : kotlin.Long = 789 // kotlin.Long | Pet id to delete
|
||||
val apiKey : kotlin.String = apiKey_example // kotlin.String |
|
||||
try {
|
||||
apiInstance.deletePet(petId, apiKey)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling PetApi#deletePet")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling PetApi#deletePet")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **kotlin.Long**| Pet id to delete |
|
||||
**apiKey** | **kotlin.String**| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
||||
Configure petstore_auth:
|
||||
ApiClient.accessToken = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="findPetsByStatus"></a>
|
||||
# **findPetsByStatus**
|
||||
> kotlin.Array<Pet> findPetsByStatus(status)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
Multiple status values can be provided with comma separated strings
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val status : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Status values that need to be considered for filter
|
||||
try {
|
||||
val result : kotlin.Array<Pet> = apiInstance.findPetsByStatus(status)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling PetApi#findPetsByStatus")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling PetApi#findPetsByStatus")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
|
||||
|
||||
### Return type
|
||||
|
||||
[**kotlin.Array<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
||||
Configure petstore_auth:
|
||||
ApiClient.accessToken = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="findPetsByTags"></a>
|
||||
# **findPetsByTags**
|
||||
> kotlin.Array<Pet> findPetsByTags(tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val tags : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Tags to filter by
|
||||
try {
|
||||
val result : kotlin.Array<Pet> = apiInstance.findPetsByTags(tags)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling PetApi#findPetsByTags")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling PetApi#findPetsByTags")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**kotlin.Array<kotlin.String>**](kotlin.String.md)| Tags to filter by |
|
||||
|
||||
### Return type
|
||||
|
||||
[**kotlin.Array<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
||||
Configure petstore_auth:
|
||||
ApiClient.accessToken = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="getPetById"></a>
|
||||
# **getPetById**
|
||||
> Pet getPetById(petId)
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a single pet
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val petId : kotlin.Long = 789 // kotlin.Long | ID of pet to return
|
||||
try {
|
||||
val result : Pet = apiInstance.getPetById(petId)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling PetApi#getPetById")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling PetApi#getPetById")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **kotlin.Long**| ID of pet to return |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
||||
Configure api_key:
|
||||
ApiClient.apiKey["api_key"] = ""
|
||||
ApiClient.apiKeyPrefix["api_key"] = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="updatePet"></a>
|
||||
# **updatePet**
|
||||
> updatePet(pet)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val pet : Pet = // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
apiInstance.updatePet(pet)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling PetApi#updatePet")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling PetApi#updatePet")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
||||
Configure petstore_auth:
|
||||
ApiClient.accessToken = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="updatePetWithForm"></a>
|
||||
# **updatePetWithForm**
|
||||
> updatePetWithForm(petId, name, status)
|
||||
|
||||
Updates a pet in the store with form data
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
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.String = status_example // kotlin.String | Updated status of the pet
|
||||
try {
|
||||
apiInstance.updatePetWithForm(petId, name, status)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling PetApi#updatePetWithForm")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling PetApi#updatePetWithForm")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **kotlin.Long**| ID of pet that needs to be updated |
|
||||
**name** | **kotlin.String**| Updated name of the pet | [optional]
|
||||
**status** | **kotlin.String**| Updated status of the pet | [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
|
||||
|
||||
<a name="uploadFile"></a>
|
||||
# **uploadFile**
|
||||
> ApiResponse uploadFile(petId, additionalMetadata, file)
|
||||
|
||||
uploads an image
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val petId : kotlin.Long = 789 // kotlin.Long | ID of pet to update
|
||||
val additionalMetadata : kotlin.String = additionalMetadata_example // kotlin.String | Additional data to pass to server
|
||||
val file : java.io.File = BINARY_DATA_HERE // java.io.File | file to upload
|
||||
try {
|
||||
val result : ApiResponse = apiInstance.uploadFile(petId, additionalMetadata, file)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling PetApi#uploadFile")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling PetApi#uploadFile")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **kotlin.Long**| ID of pet to update |
|
||||
**additionalMetadata** | **kotlin.String**| Additional data to pass to server | [optional]
|
||||
**file** | **java.io.File**| file to upload | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
||||
Configure petstore_auth:
|
||||
ApiClient.accessToken = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = PetApi()
|
||||
val petId : kotlin.Long = 789 // kotlin.Long | ID of pet to update
|
||||
val requiredFile : java.io.File = BINARY_DATA_HERE // java.io.File | file to upload
|
||||
val additionalMetadata : kotlin.String = additionalMetadata_example // kotlin.String | Additional data to pass to server
|
||||
try {
|
||||
val result : ApiResponse = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling PetApi#uploadFileWithRequiredFile")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling PetApi#uploadFileWithRequiredFile")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **kotlin.Long**| ID of pet to update |
|
||||
**requiredFile** | **java.io.File**| file to upload |
|
||||
**additionalMetadata** | **kotlin.String**| Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
||||
Configure petstore_auth:
|
||||
ApiClient.accessToken = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
# ReadOnlyFirst
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar** | **kotlin.String** | | [optional] [readonly]
|
||||
**baz** | **kotlin.String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
# Return
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**`return`** | **kotlin.Int** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
# SpecialModelname
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **kotlin.Long** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
# StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||
|
||||
|
||||
<a name="deleteOrder"></a>
|
||||
# **deleteOrder**
|
||||
> deleteOrder(orderId)
|
||||
|
||||
Delete purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = StoreApi()
|
||||
val orderId : kotlin.String = orderId_example // kotlin.String | ID of the order that needs to be deleted
|
||||
try {
|
||||
apiInstance.deleteOrder(orderId)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling StoreApi#deleteOrder")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling StoreApi#deleteOrder")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **kotlin.String**| ID of the order that needs to be deleted |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="getInventory"></a>
|
||||
# **getInventory**
|
||||
> kotlin.collections.Map<kotlin.String, kotlin.Int> getInventory()
|
||||
|
||||
Returns pet inventories by status
|
||||
|
||||
Returns a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = StoreApi()
|
||||
try {
|
||||
val result : kotlin.collections.Map<kotlin.String, kotlin.Int> = apiInstance.getInventory()
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling StoreApi#getInventory")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling StoreApi#getInventory")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**kotlin.collections.Map<kotlin.String, kotlin.Int>**
|
||||
|
||||
### Authorization
|
||||
|
||||
|
||||
Configure api_key:
|
||||
ApiClient.apiKey["api_key"] = ""
|
||||
ApiClient.apiKeyPrefix["api_key"] = ""
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="getOrderById"></a>
|
||||
# **getOrderById**
|
||||
> Order getOrderById(orderId)
|
||||
|
||||
Find purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = StoreApi()
|
||||
val orderId : kotlin.Long = 789 // kotlin.Long | ID of pet that needs to be fetched
|
||||
try {
|
||||
val result : Order = apiInstance.getOrderById(orderId)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling StoreApi#getOrderById")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling StoreApi#getOrderById")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **kotlin.Long**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="placeOrder"></a>
|
||||
# **placeOrder**
|
||||
> Order placeOrder(order)
|
||||
|
||||
Place an order for a pet
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = StoreApi()
|
||||
val order : Order = // Order | order placed for purchasing the pet
|
||||
try {
|
||||
val result : Order = apiInstance.placeOrder(order)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling StoreApi#placeOrder")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling StoreApi#placeOrder")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
# Tag
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **kotlin.Long** | | [optional]
|
||||
**name** | **kotlin.String** | | [optional]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
# User
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **kotlin.Long** | | [optional]
|
||||
**username** | **kotlin.String** | | [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]
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,376 @@
|
||||
# UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**createUser**](UserApi.md#createUser) | **POST** /user | Create user
|
||||
[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
|
||||
[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
|
||||
[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
|
||||
[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
<a name="createUser"></a>
|
||||
# **createUser**
|
||||
> createUser(user)
|
||||
|
||||
Create user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val user : User = // User | Created user object
|
||||
try {
|
||||
apiInstance.createUser(user)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling UserApi#createUser")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling UserApi#createUser")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="createUsersWithArrayInput"></a>
|
||||
# **createUsersWithArrayInput**
|
||||
> createUsersWithArrayInput(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val user : kotlin.Array<User> = // kotlin.Array<User> | List of user object
|
||||
try {
|
||||
apiInstance.createUsersWithArrayInput(user)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling UserApi#createUsersWithArrayInput")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling UserApi#createUsersWithArrayInput")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**kotlin.Array<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="createUsersWithListInput"></a>
|
||||
# **createUsersWithListInput**
|
||||
> createUsersWithListInput(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val user : kotlin.Array<User> = // kotlin.Array<User> | List of user object
|
||||
try {
|
||||
apiInstance.createUsersWithListInput(user)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling UserApi#createUsersWithListInput")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling UserApi#createUsersWithListInput")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**kotlin.Array<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="deleteUser"></a>
|
||||
# **deleteUser**
|
||||
> deleteUser(username)
|
||||
|
||||
Delete user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val username : kotlin.String = username_example // kotlin.String | The name that needs to be deleted
|
||||
try {
|
||||
apiInstance.deleteUser(username)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling UserApi#deleteUser")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling UserApi#deleteUser")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **kotlin.String**| The name that needs to be deleted |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="getUserByName"></a>
|
||||
# **getUserByName**
|
||||
> User getUserByName(username)
|
||||
|
||||
Get user by user name
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val username : kotlin.String = username_example // kotlin.String | The name that needs to be fetched. Use user1 for testing.
|
||||
try {
|
||||
val result : User = apiInstance.getUserByName(username)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling UserApi#getUserByName")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling UserApi#getUserByName")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **kotlin.String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
[**User**](User.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="loginUser"></a>
|
||||
# **loginUser**
|
||||
> kotlin.String loginUser(username, password)
|
||||
|
||||
Logs user into the system
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val username : kotlin.String = username_example // kotlin.String | The user name for login
|
||||
val password : kotlin.String = password_example // kotlin.String | The password for login in clear text
|
||||
try {
|
||||
val result : kotlin.String = apiInstance.loginUser(username, password)
|
||||
println(result)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling UserApi#loginUser")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling UserApi#loginUser")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **kotlin.String**| The user name for login |
|
||||
**password** | **kotlin.String**| The password for login in clear text |
|
||||
|
||||
### Return type
|
||||
|
||||
**kotlin.String**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="logoutUser"></a>
|
||||
# **logoutUser**
|
||||
> logoutUser()
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
try {
|
||||
apiInstance.logoutUser()
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling UserApi#logoutUser")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling UserApi#logoutUser")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="updateUser"></a>
|
||||
# **updateUser**
|
||||
> updateUser(username, user)
|
||||
|
||||
Updated user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```kotlin
|
||||
// Import classes:
|
||||
//import org.openapitools.client.infrastructure.*
|
||||
//import org.openapitools.client.models.*
|
||||
|
||||
val apiInstance = UserApi()
|
||||
val username : kotlin.String = username_example // kotlin.String | name that need to be deleted
|
||||
val user : User = // User | Updated user object
|
||||
try {
|
||||
apiInstance.updateUser(username, user)
|
||||
} catch (e: ClientException) {
|
||||
println("4xx response calling UserApi#updateUser")
|
||||
e.printStackTrace()
|
||||
} catch (e: ServerException) {
|
||||
println("5xx response calling UserApi#updateUser")
|
||||
e.printStackTrace()
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **kotlin.String**| name that need to be deleted |
|
||||
**user** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
Reference in New Issue
Block a user