Skip to content

Commit b66ea6d

Browse files
Merge branch '3.0.0' into 3.0.0
2 parents ffa2996 + 912afd4 commit b66ea6d

28 files changed

+368
-109
lines changed

modules/swagger-codegen/src/main/java/io/swagger/codegen/v3/CodegenConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ public static enum ENUM_PROPERTY_NAMING_TYPE {camelCase, PascalCase, snake_case,
251251
public static final String HAS_INNER_OBJECT_NAME = PREFIX_HAS + "inner-object";
252252

253253
public static final String IS_SIMPLE_TYPE_EXT_NAME = PREFIX_IS + "simple-type";
254+
public static final String IS_NULLABLE_EXT_NAME = PREFIX_IS + "nullable";
254255
public static final String IS_PRIMITIVE_TYPE_EXT_NAME = PREFIX_IS + "primitive-type";
255256
public static final String IS_OBJECT_EXT_NAME = PREFIX_IS + "object";
256257
public static final String IS_CONTAINER_EXT_NAME = PREFIX_IS + "container";

modules/swagger-codegen/src/main/java/io/swagger/codegen/v3/CodegenObject.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ public Boolean getIsReadOnly() {
136136
return getBooleanValue(CodegenConstants.IS_READ_ONLY_EXT_NAME);
137137
}
138138

139+
public Boolean getIsNullable() {
140+
return getBooleanValue(CodegenConstants.IS_NULLABLE_EXT_NAME);
141+
}
142+
139143
public Boolean getIsCollectionFormatMulti() {
140144
return getBooleanValue(CodegenConstants.IS_COLLECTION_FORMAT_MULTI_EXT_NAME);
141145
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.19-SNAPSHOT
1+
3.0.25-SNAPSHOT

samples/client/petstore/kotlin/README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
## Requires
44

5-
* Kotlin 1.1.2
6-
* Gradle 3.3
5+
* Kotlin 1.4.30
6+
* Gradle 5.3
77

88
## Build
99

@@ -38,6 +38,7 @@ Class | Method | HTTP request | Description
3838
*DefaultApi* | [**testMethod**](docs/DefaultApi.md#testmethod) | **GET** /test |
3939
*PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
4040
*PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
41+
*PetApi* | [**doCategoryStuff**](docs/PetApi.md#docategorystuff) | **POST** /pet/category |
4142
*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
4243
*PetApi* | [**findPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
4344
*PetApi* | [**getAllPets**](docs/PetApi.md#getallpets) | **GET** /allPets |
@@ -62,6 +63,8 @@ Class | Method | HTTP request | Description
6263
<a name="documentation-for-models"></a>
6364
## Documentation for Models
6465

66+
- [io.swagger.client.models.AllOfSubCategoryCategory](docs/AllOfSubCategoryCategory.md)
67+
- [io.swagger.client.models.AllOfSubCategoryPetsItems](docs/AllOfSubCategoryPetsItems.md)
6568
- [io.swagger.client.models.AllPetsResponse](docs/AllPetsResponse.md)
6669
- [io.swagger.client.models.ApiResponse](docs/ApiResponse.md)
6770
- [io.swagger.client.models.Body](docs/Body.md)
@@ -74,6 +77,7 @@ Class | Method | HTTP request | Description
7477
- [io.swagger.client.models.Order](docs/Order.md)
7578
- [io.swagger.client.models.Pet](docs/Pet.md)
7679
- [io.swagger.client.models.SinglePetResponse](docs/SinglePetResponse.md)
80+
- [io.swagger.client.models.SubCategory](docs/SubCategory.md)
7781
- [io.swagger.client.models.Tag](docs/Tag.md)
7882
- [io.swagger.client.models.Test](docs/Test.md)
7983
- [io.swagger.client.models.User](docs/User.md)
@@ -96,5 +100,6 @@ Class | Method | HTTP request | Description
96100
- **Flow**: implicit
97101
- **Authorization URL**: http://petstore.swagger.io/oauth/dialog
98102
- **Scopes**:
99-
- :
103+
- write:pets: modify pets in your account
104+
- read:pets: read your pets
100105

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
group 'io.swagger'
22
version '1.0.0'
33

4-
task wrapper(type: Wrapper) {
5-
gradleVersion = '3.3'
4+
wrapper {
5+
gradleVersion = '5.3'
66
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
77
}
88

99
buildscript {
10-
ext.kotlin_version = '1.1.2'
10+
ext.kotlin_version = '1.4.30'
1111

1212
repositories {
13-
mavenCentral()
13+
maven { url "https://repo1.maven.org/maven2" }
1414
}
1515
dependencies {
1616
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
@@ -20,14 +20,14 @@ buildscript {
2020
apply plugin: 'kotlin'
2121

2222
repositories {
23-
mavenCentral()
23+
maven { url "https://repo1.maven.org/maven2" }
2424
}
2525

2626
dependencies {
27-
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
28-
compile "com.squareup.moshi:moshi-kotlin:1.5.0"
29-
compile "com.squareup.moshi:moshi-adapters:1.5.0"
30-
compile "com.squareup.okhttp3:okhttp:3.8.0"
31-
compile "org.threeten:threetenbp:1.3.6"
32-
testCompile "io.kotlintest:kotlintest:2.0.2"
33-
}
27+
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
28+
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
29+
compile "com.squareup.moshi:moshi-kotlin:1.11.0"
30+
compile "com.squareup.moshi:moshi-adapters:1.11.0"
31+
compile "com.squareup.okhttp3:okhttp:4.9.0"
32+
testCompile "io.kotlintest:kotlintest:2.0.7"
33+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# AllOfSubCategoryCategory
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**foo** | [**kotlin.Boolean**](.md) | | [optional]
7+
**bar** | [**kotlin.Int**](.md) | | [optional]
8+
**beer** | [**kotlin.String**](.md) | | [optional]
9+
**drunk** | [**User**](User.md) | | [optional]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# AllOfSubCategoryPetsItems
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------

samples/client/petstore/kotlin/docs/PetApi.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
88
[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
9+
[**doCategoryStuff**](PetApi.md#doCategoryStuff) | **POST** /pet/category |
910
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
1011
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
1112
[**getAllPets**](PetApi.md#getAllPets) | **GET** /allPets |
@@ -105,6 +106,51 @@ null (empty response body)
105106
- **Content-Type**: Not defined
106107
- **Accept**: Not defined
107108

109+
<a name="doCategoryStuff"></a>
110+
# **doCategoryStuff**
111+
> ApiResponse doCategoryStuff(body)
112+
113+
114+
115+
### Example
116+
```kotlin
117+
// Import classes:
118+
//import io.swagger.client.infrastructure.*
119+
//import io.swagger.client.models.*;
120+
121+
val apiInstance = PetApi()
122+
val body : SubCategory = // SubCategory |
123+
try {
124+
val result : ApiResponse = apiInstance.doCategoryStuff(body)
125+
println(result)
126+
} catch (e: ClientException) {
127+
println("4xx response calling PetApi#doCategoryStuff")
128+
e.printStackTrace()
129+
} catch (e: ServerException) {
130+
println("5xx response calling PetApi#doCategoryStuff")
131+
e.printStackTrace()
132+
}
133+
```
134+
135+
### Parameters
136+
137+
Name | Type | Description | Notes
138+
------------- | ------------- | ------------- | -------------
139+
**body** | [**SubCategory**](SubCategory.md)| | [optional]
140+
141+
### Return type
142+
143+
[**ApiResponse**](ApiResponse.md)
144+
145+
### Authorization
146+
147+
No authorization required
148+
149+
### HTTP request headers
150+
151+
- **Content-Type**: application/json
152+
- **Accept**: application/json
153+
108154
<a name="findPetsByStatus"></a>
109155
# **findPetsByStatus**
110156
> kotlin.Array&lt;Pet&gt; findPetsByStatus(status)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SubCategory
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**category** | [**AllOfSubCategoryCategory**](AllOfSubCategoryCategory.md) | | [optional]
7+
**category2** | [**Category**](Category.md) | | [optional]
8+
**pets** | [**kotlin.Array&lt;AllOfSubCategoryPetsItems&gt;**](.md) | | [optional]
4.88 KB
Binary file not shown.

0 commit comments

Comments
 (0)