Skip to content

Commit 035d41a

Browse files
author
andrewwilsonnew
committed
fixup up Array -> List
1 parent 7d5c279 commit 035d41a

15 files changed

Lines changed: 53 additions & 53 deletions

File tree

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinMiskServerCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public KotlinMiskServerCodegen() {
172172
artifactId = "openapi-kotlin-misk-server";
173173
artifactVersion = apiVersion;
174174

175-
typeMapping.put("File", "Response<ByteString>");
175+
typeMapping.put("array", "kotlin.List");
176176

177177
updateOption(CodegenConstants.API_PACKAGE, apiPackage);
178178
updateOption(CodegenConstants.MODEL_PACKAGE, modelPackage);

samples/server/petstore/kotlin-misk-config/docs/Pet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**name** | **kotlin.String** | |
8-
**photoUrls** | **kotlin.Array&lt;kotlin.String&gt;** | |
8+
**photoUrls** | **kotlin.List&lt;kotlin.String&gt;** | |
99
**id** | **kotlin.Long** | | [optional]
1010
**category** | [**Category**](Category.md) | | [optional]
11-
**tags** | [**kotlin.Array&lt;Tag&gt;**](Tag.md) | | [optional]
11+
**tags** | [**kotlin.List&lt;Tag&gt;**](Tag.md) | | [optional]
1212
**status** | [**inline**](#Status) | pet status in the store | [optional]
1313

1414

samples/server/petstore/kotlin-misk-config/docs/PetApi.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ null (empty response body)
111111

112112
<a name="findPetsByStatus"></a>
113113
# **findPetsByStatus**
114-
> kotlin.Array&lt;Pet&gt; findPetsByStatus(status)
114+
> kotlin.List&lt;Pet&gt; findPetsByStatus(status)
115115
116116
Finds Pets by status
117117

@@ -124,9 +124,9 @@ Multiple status values can be provided with comma separated strings
124124
//import org.openapitools.server.api.model.*
125125

126126
val apiInstance = PetApi()
127-
val status : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Status values that need to be considered for filter
127+
val status : kotlin.List<kotlin.String> = // kotlin.List<kotlin.String> | Status values that need to be considered for filter
128128
try {
129-
val result : kotlin.Array<Pet> = apiInstance.findPetsByStatus(status)
129+
val result : kotlin.List<Pet> = apiInstance.findPetsByStatus(status)
130130
println(result)
131131
} catch (e: ClientException) {
132132
println("4xx response calling PetApi#findPetsByStatus")
@@ -141,11 +141,11 @@ try {
141141

142142
Name | Type | Description | Notes
143143
------------- | ------------- | ------------- | -------------
144-
**status** | [**kotlin.Array&lt;kotlin.String&gt;**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
144+
**status** | [**kotlin.List&lt;kotlin.String&gt;**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
145145

146146
### Return type
147147

148-
[**kotlin.Array&lt;Pet&gt;**](Pet.md)
148+
[**kotlin.List&lt;Pet&gt;**](Pet.md)
149149

150150
### Authorization
151151

@@ -158,7 +158,7 @@ Name | Type | Description | Notes
158158

159159
<a name="findPetsByTags"></a>
160160
# **findPetsByTags**
161-
> kotlin.Array&lt;Pet&gt; findPetsByTags(tags)
161+
> kotlin.List&lt;Pet&gt; findPetsByTags(tags)
162162
163163
Finds Pets by tags
164164

@@ -171,9 +171,9 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
171171
//import org.openapitools.server.api.model.*
172172

173173
val apiInstance = PetApi()
174-
val tags : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Tags to filter by
174+
val tags : kotlin.List<kotlin.String> = // kotlin.List<kotlin.String> | Tags to filter by
175175
try {
176-
val result : kotlin.Array<Pet> = apiInstance.findPetsByTags(tags)
176+
val result : kotlin.List<Pet> = apiInstance.findPetsByTags(tags)
177177
println(result)
178178
} catch (e: ClientException) {
179179
println("4xx response calling PetApi#findPetsByTags")
@@ -188,11 +188,11 @@ try {
188188

189189
Name | Type | Description | Notes
190190
------------- | ------------- | ------------- | -------------
191-
**tags** | [**kotlin.Array&lt;kotlin.String&gt;**](kotlin.String.md)| Tags to filter by |
191+
**tags** | [**kotlin.List&lt;kotlin.String&gt;**](kotlin.String.md)| Tags to filter by |
192192

193193
### Return type
194194

195-
[**kotlin.Array&lt;Pet&gt;**](Pet.md)
195+
[**kotlin.List&lt;Pet&gt;**](Pet.md)
196196

197197
### Authorization
198198

samples/server/petstore/kotlin-misk-config/docs/UserApi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Creates list of users with given input array
7575
//import org.openapitools.server.api.model.*
7676

7777
val apiInstance = UserApi()
78-
val user : kotlin.Array<User> = // kotlin.Array<User> | List of user object
78+
val user : kotlin.List<User> = // kotlin.List<User> | List of user object
7979
try {
8080
apiInstance.createUsersWithArrayInput(user)
8181
} catch (e: ClientException) {
@@ -91,7 +91,7 @@ try {
9191

9292
Name | Type | Description | Notes
9393
------------- | ------------- | ------------- | -------------
94-
**user** | [**kotlin.Array&lt;User&gt;**](User.md)| List of user object |
94+
**user** | [**kotlin.List&lt;User&gt;**](User.md)| List of user object |
9595

9696
### Return type
9797

@@ -121,7 +121,7 @@ Creates list of users with given input array
121121
//import org.openapitools.server.api.model.*
122122

123123
val apiInstance = UserApi()
124-
val user : kotlin.Array<User> = // kotlin.Array<User> | List of user object
124+
val user : kotlin.List<User> = // kotlin.List<User> | List of user object
125125
try {
126126
apiInstance.createUsersWithListInput(user)
127127
} catch (e: ClientException) {
@@ -137,7 +137,7 @@ try {
137137

138138
Name | Type | Description | Notes
139139
------------- | ------------- | ------------- | -------------
140-
**user** | [**kotlin.Array&lt;User&gt;**](User.md)| List of user object |
140+
**user** | [**kotlin.List&lt;User&gt;**](User.md)| List of user object |
141141

142142
### Return type
143143

samples/server/petstore/kotlin-misk-config/src/main/kotlin/org/openapitools/server/api/api/PetApiAction.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ class PetApiAction @Inject constructor(
6767
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
6868
@Suppress("unused")
6969
fun findPetsByStatus(
70-
@QueryParam(value = "status") status: kotlin.Array<kotlin.String>
71-
): kotlin.Array<Pet> {
70+
@QueryParam(value = "status") status: kotlin.List<kotlin.String>
71+
): kotlin.List<Pet> {
7272
TODO()
7373
}
7474

@@ -78,8 +78,8 @@ class PetApiAction @Inject constructor(
7878
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
7979
@Suppress("unused")
8080
fun findPetsByTags(
81-
@QueryParam(value = "tags") tags: kotlin.Array<kotlin.String>
82-
): kotlin.Array<Pet> {
81+
@QueryParam(value = "tags") tags: kotlin.List<kotlin.String>
82+
): kotlin.List<Pet> {
8383
TODO()
8484
}
8585

samples/server/petstore/kotlin-misk-config/src/main/kotlin/org/openapitools/server/api/api/UserApiAction.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class UserApiAction @Inject constructor(
5454
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
5555
@Suppress("unused")
5656
fun createUsersWithArrayInput(
57-
@Valid @RequestBody user: kotlin.Array<User>
57+
@Valid @RequestBody user: kotlin.List<User>
5858
): Response<Unit> {
5959
TODO()
6060
}
@@ -65,7 +65,7 @@ class UserApiAction @Inject constructor(
6565
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
6666
@Suppress("unused")
6767
fun createUsersWithListInput(
68-
@Valid @RequestBody user: kotlin.Array<User>
68+
@Valid @RequestBody user: kotlin.List<User>
6969
): Response<Unit> {
7070
TODO()
7171
}

samples/server/petstore/kotlin-misk-config/src/main/kotlin/org/openapitools/server/api/model/Pet.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import com.squareup.moshi.JsonClass
77
@JsonClass(generateAdapter = true)
88
data class Pet(
99
val name: kotlin.String,
10-
val photoUrls: kotlin.Array<kotlin.String>,
10+
val photoUrls: kotlin.List<kotlin.String>,
1111
val id: kotlin.Long? = null,
1212
val category: Category? = null,
13-
val tags: kotlin.Array<Tag>? = null,
13+
val tags: kotlin.List<Tag>? = null,
1414
/** pet status in the store */
1515
val status: kotlin.String? = null
1616
)

samples/server/petstore/kotlin-misk-config/src/test/kotlin/org/openapitools/server/api/api/PetApiTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ internal class PetApiTest {
4747
@Test
4848
fun `should handle findPetsByStatus`() {
4949
val status = TODO()
50-
val response: kotlin.Array<Pet> = petApi.findPetsByStatus(status)
50+
val response: kotlin.List<Pet> = petApi.findPetsByStatus(status)
5151
}
5252

5353
/**
@@ -56,7 +56,7 @@ internal class PetApiTest {
5656
@Test
5757
fun `should handle findPetsByTags`() {
5858
val tags = TODO()
59-
val response: kotlin.Array<Pet> = petApi.findPetsByTags(tags)
59+
val response: kotlin.List<Pet> = petApi.findPetsByTags(tags)
6060
}
6161

6262
/**

samples/server/petstore/kotlin-misk/docs/Pet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**name** | **kotlin.String** | |
8-
**photoUrls** | **kotlin.Array&lt;kotlin.String&gt;** | |
8+
**photoUrls** | **kotlin.List&lt;kotlin.String&gt;** | |
99
**id** | **kotlin.Long** | | [optional]
1010
**category** | [**Category**](Category.md) | | [optional]
11-
**tags** | [**kotlin.Array&lt;Tag&gt;**](Tag.md) | | [optional]
11+
**tags** | [**kotlin.List&lt;Tag&gt;**](Tag.md) | | [optional]
1212
**status** | [**inline**](#Status) | pet status in the store | [optional]
1313

1414

samples/server/petstore/kotlin-misk/docs/PetApi.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ null (empty response body)
111111

112112
<a name="findPetsByStatus"></a>
113113
# **findPetsByStatus**
114-
> kotlin.Array&lt;Pet&gt; findPetsByStatus(status)
114+
> kotlin.List&lt;Pet&gt; findPetsByStatus(status)
115115
116116
Finds Pets by status
117117

@@ -124,9 +124,9 @@ Multiple status values can be provided with comma separated strings
124124
//import org.openapitools.server.api.model.*
125125

126126
val apiInstance = PetApi()
127-
val status : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Status values that need to be considered for filter
127+
val status : kotlin.List<kotlin.String> = // kotlin.List<kotlin.String> | Status values that need to be considered for filter
128128
try {
129-
val result : kotlin.Array<Pet> = apiInstance.findPetsByStatus(status)
129+
val result : kotlin.List<Pet> = apiInstance.findPetsByStatus(status)
130130
println(result)
131131
} catch (e: ClientException) {
132132
println("4xx response calling PetApi#findPetsByStatus")
@@ -141,11 +141,11 @@ try {
141141

142142
Name | Type | Description | Notes
143143
------------- | ------------- | ------------- | -------------
144-
**status** | [**kotlin.Array&lt;kotlin.String&gt;**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
144+
**status** | [**kotlin.List&lt;kotlin.String&gt;**](kotlin.String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
145145

146146
### Return type
147147

148-
[**kotlin.Array&lt;Pet&gt;**](Pet.md)
148+
[**kotlin.List&lt;Pet&gt;**](Pet.md)
149149

150150
### Authorization
151151

@@ -158,7 +158,7 @@ Name | Type | Description | Notes
158158

159159
<a name="findPetsByTags"></a>
160160
# **findPetsByTags**
161-
> kotlin.Array&lt;Pet&gt; findPetsByTags(tags)
161+
> kotlin.List&lt;Pet&gt; findPetsByTags(tags)
162162
163163
Finds Pets by tags
164164

@@ -171,9 +171,9 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
171171
//import org.openapitools.server.api.model.*
172172

173173
val apiInstance = PetApi()
174-
val tags : kotlin.Array<kotlin.String> = // kotlin.Array<kotlin.String> | Tags to filter by
174+
val tags : kotlin.List<kotlin.String> = // kotlin.List<kotlin.String> | Tags to filter by
175175
try {
176-
val result : kotlin.Array<Pet> = apiInstance.findPetsByTags(tags)
176+
val result : kotlin.List<Pet> = apiInstance.findPetsByTags(tags)
177177
println(result)
178178
} catch (e: ClientException) {
179179
println("4xx response calling PetApi#findPetsByTags")
@@ -188,11 +188,11 @@ try {
188188

189189
Name | Type | Description | Notes
190190
------------- | ------------- | ------------- | -------------
191-
**tags** | [**kotlin.Array&lt;kotlin.String&gt;**](kotlin.String.md)| Tags to filter by |
191+
**tags** | [**kotlin.List&lt;kotlin.String&gt;**](kotlin.String.md)| Tags to filter by |
192192

193193
### Return type
194194

195-
[**kotlin.Array&lt;Pet&gt;**](Pet.md)
195+
[**kotlin.List&lt;Pet&gt;**](Pet.md)
196196

197197
### Authorization
198198

0 commit comments

Comments
 (0)