Skip to content

Commit 1281afa

Browse files
committed
added kotlin updates
1 parent 5bd57df commit 1281afa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1026
-569
lines changed

bin/kotlin-client-petstore.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ fi
2626

2727
# if you've executed sbt assembly previously it will use that instead.
2828
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -Dlogback.configurationFile=bin/logback.xml"
29-
ags="generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l kotlin-client --artifact-id kotlin-petstore-client -o samples/client/petstore/kotlin $@"
29+
ags="generate -i modules/swagger-codegen/src/test/resources/3_0_0/petstore.yaml -l kotlin-client --artifact-id kotlin-petstore-client -o samples/client/petstore/kotlin $@"
3030

3131
java ${JAVA_OPTS} -jar ${executable} ${ags}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.5-SNAPSHOT
1+
3.0.19-SNAPSHOT

samples/client/petstore/kotlin/README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,18 @@ This runs all tests and packages the library.
3131
<a name="documentation-for-api-endpoints"></a>
3232
## Documentation for API Endpoints
3333

34-
All URIs are relative to *http://petstore.swagger.io/v2*
34+
All URIs are relative to */*
3535

3636
Class | Method | HTTP request | Description
3737
------------ | ------------- | ------------- | -------------
38+
*DefaultApi* | [**testMethod**](docs/DefaultApi.md#testmethod) | **GET** /test |
3839
*PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
3940
*PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
4041
*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
4142
*PetApi* | [**findPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
43+
*PetApi* | [**getAllPets**](docs/PetApi.md#getallpets) | **GET** /allPets |
4244
*PetApi* | [**getPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID
45+
*PetApi* | [**getRandomPet**](docs/PetApi.md#getrandompet) | **GET** /randomPet |
4346
*PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
4447
*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
4548
*PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
@@ -54,16 +57,25 @@ Class | Method | HTTP request | Description
5457
*UserApi* | [**getUserByName**](docs/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name
5558
*UserApi* | [**loginUser**](docs/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system
5659
*UserApi* | [**logoutUser**](docs/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session
57-
*UserApi* | [**updateUser**](docs/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user
60+
*UserApi* | [**userUsernamePut**](docs/UserApi.md#userusernameput) | **PUT** /user/{username} | Updated user
5861

5962
<a name="documentation-for-models"></a>
6063
## Documentation for Models
6164

65+
- [io.swagger.client.models.AllPetsResponse](docs/AllPetsResponse.md)
6266
- [io.swagger.client.models.ApiResponse](docs/ApiResponse.md)
67+
- [io.swagger.client.models.Body](docs/Body.md)
68+
- [io.swagger.client.models.Cat](docs/Cat.md)
6369
- [io.swagger.client.models.Category](docs/Category.md)
70+
- [io.swagger.client.models.Dog](docs/Dog.md)
71+
- [io.swagger.client.models.NullableEnumModel](docs/NullableEnumModel.md)
72+
- [io.swagger.client.models.OneOfAllPetsResponseItems](docs/OneOfAllPetsResponseItems.md)
73+
- [io.swagger.client.models.OneOfSinglePetResponsePet](docs/OneOfSinglePetResponsePet.md)
6474
- [io.swagger.client.models.Order](docs/Order.md)
6575
- [io.swagger.client.models.Pet](docs/Pet.md)
76+
- [io.swagger.client.models.SinglePetResponse](docs/SinglePetResponse.md)
6677
- [io.swagger.client.models.Tag](docs/Tag.md)
78+
- [io.swagger.client.models.Test](docs/Test.md)
6779
- [io.swagger.client.models.User](docs/User.md)
6880

6981
<a name="documentation-for-authorization"></a>
@@ -73,12 +85,16 @@ Class | Method | HTTP request | Description
7385
### api_key
7486

7587

88+
<a name="bearer"></a>
89+
### bearer
90+
91+
7692
<a name="petstore_auth"></a>
7793
### petstore_auth
7894

7995
- **Type**: OAuth
8096
- **Flow**: implicit
81-
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
97+
- **Authorization URL**: http://petstore.swagger.io/oauth/dialog
8298
- **Scopes**:
8399
- :
84100

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# AllPetsResponse
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Body
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**name** | [**kotlin.String**](.md) | Updated name of the pet | [optional]
7+
**status** | [**kotlin.String**](.md) | Updated status of the pet | [optional]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Cat
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**hunts** | [**kotlin.Boolean**](.md) | | [optional]
7+
**age** | [**kotlin.Int**](.md) | | [optional]
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# DefaultApi
2+
3+
All URIs are relative to */*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**testMethod**](DefaultApi.md#testMethod) | **GET** /test |
8+
9+
<a name="testMethod"></a>
10+
# **testMethod**
11+
> kotlin.Array&lt;Test&gt; testMethod()
12+
13+
14+
15+
### Example
16+
```kotlin
17+
// Import classes:
18+
//import io.swagger.client.infrastructure.*
19+
//import io.swagger.client.models.*;
20+
21+
val apiInstance = DefaultApi()
22+
try {
23+
val result : kotlin.Array<Test> = apiInstance.testMethod()
24+
println(result)
25+
} catch (e: ClientException) {
26+
println("4xx response calling DefaultApi#testMethod")
27+
e.printStackTrace()
28+
} catch (e: ServerException) {
29+
println("5xx response calling DefaultApi#testMethod")
30+
e.printStackTrace()
31+
}
32+
```
33+
34+
### Parameters
35+
This endpoint does not need any parameter.
36+
37+
### Return type
38+
39+
[**kotlin.Array&lt;Test&gt;**](Test.md)
40+
41+
### Authorization
42+
43+
[bearer](../README.md#bearer)
44+
45+
### HTTP request headers
46+
47+
- **Content-Type**: Not defined
48+
- **Accept**: application/json
49+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Dog
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**bark** | [**kotlin.Boolean**](.md) | | [optional]
7+
**breed** | [**inline**](#BreedEnum) | | [optional]
8+
9+
<a name="BreedEnum"></a>
10+
## Enum: breed
11+
Name | Value
12+
---- | -----
13+
breed | Dingo, Husky, Retriever, Shepherd
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# NullableEnumModel
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**enumProp** | [**inline**](#EnumPropEnum) | | [optional]
7+
8+
<a name="EnumPropEnum"></a>
9+
## Enum: enumProp
10+
Name | Value
11+
---- | -----
12+
enumProp | a, b,
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# OneOfAllPetsResponseItems
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------

0 commit comments

Comments
 (0)