Skip to content

Commit d16b7a4

Browse files
committed
Update samples
1 parent 13ab653 commit d16b7a4

13 files changed

Lines changed: 116 additions & 0 deletions

File tree

samples/server/petstore/kotlin-server-required-and-nullable-properties/src/main/kotlin/org/openapitools/server/models/Pet.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,17 @@ package org.openapitools.server.models
2020
* @param notNullableNotRequired
2121
*/
2222
data class Pet(
23+
24+
@field:com.fasterxml.jackson.annotation.JsonProperty("notNullable_required")
2325
val notNullableRequired: kotlin.String,
26+
27+
@field:com.fasterxml.jackson.annotation.JsonProperty("nullable_required")
2428
val nullableRequired: kotlin.String?,
29+
30+
@field:com.fasterxml.jackson.annotation.JsonProperty("nullable_notRequired")
2531
val nullableNotRequired: kotlin.String? = null,
32+
33+
@field:com.fasterxml.jackson.annotation.JsonProperty("notNullable_notRequired")
2634
val notNullableNotRequired: kotlin.String? = null
2735
)
2836

samples/server/petstore/kotlin-server/javalin-6/src/main/kotlin/org/openapitools/server/models/Category.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ package org.openapitools.server.models
1818
* @param name
1919
*/
2020
data class Category(
21+
22+
@field:com.fasterxml.jackson.annotation.JsonProperty("id")
2123
val id: kotlin.Long? = null,
24+
25+
@field:com.fasterxml.jackson.annotation.JsonProperty("name")
2226
val name: kotlin.String? = null
2327
)
2428

samples/server/petstore/kotlin-server/javalin-6/src/main/kotlin/org/openapitools/server/models/ModelApiResponse.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,14 @@ package org.openapitools.server.models
1919
* @param message
2020
*/
2121
data class ModelApiResponse(
22+
23+
@field:com.fasterxml.jackson.annotation.JsonProperty("code")
2224
val code: kotlin.Int? = null,
25+
26+
@field:com.fasterxml.jackson.annotation.JsonProperty("type")
2327
val type: kotlin.String? = null,
28+
29+
@field:com.fasterxml.jackson.annotation.JsonProperty("message")
2430
val message: kotlin.String? = null
2531
)
2632

samples/server/petstore/kotlin-server/javalin-6/src/main/kotlin/org/openapitools/server/models/Order.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,24 @@ package org.openapitools.server.models
2222
* @param complete
2323
*/
2424
data class Order(
25+
26+
@field:com.fasterxml.jackson.annotation.JsonProperty("id")
2527
val id: kotlin.Long? = null,
28+
29+
@field:com.fasterxml.jackson.annotation.JsonProperty("petId")
2630
val petId: kotlin.Long? = null,
31+
32+
@field:com.fasterxml.jackson.annotation.JsonProperty("quantity")
2733
val quantity: kotlin.Int? = null,
34+
35+
@field:com.fasterxml.jackson.annotation.JsonProperty("shipDate")
2836
val shipDate: java.time.OffsetDateTime? = null,
2937
/* Order Status */
38+
39+
@field:com.fasterxml.jackson.annotation.JsonProperty("status")
3040
val status: Order.Status? = null,
41+
42+
@field:com.fasterxml.jackson.annotation.JsonProperty("complete")
3143
val complete: kotlin.Boolean? = false
3244
)
3345
{

samples/server/petstore/kotlin-server/javalin-6/src/main/kotlin/org/openapitools/server/models/Pet.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,24 @@ import org.openapitools.server.models.Tag
2424
* @param status pet status in the store
2525
*/
2626
data class Pet(
27+
28+
@field:com.fasterxml.jackson.annotation.JsonProperty("name")
2729
val name: kotlin.String,
30+
31+
@field:com.fasterxml.jackson.annotation.JsonProperty("photoUrls")
2832
val photoUrls: kotlin.collections.List<kotlin.String>,
33+
34+
@field:com.fasterxml.jackson.annotation.JsonProperty("id")
2935
val id: kotlin.Long? = null,
36+
37+
@field:com.fasterxml.jackson.annotation.JsonProperty("category")
3038
val category: Category? = null,
39+
40+
@field:com.fasterxml.jackson.annotation.JsonProperty("tags")
3141
val tags: kotlin.collections.List<Tag>? = null,
3242
/* pet status in the store */
43+
44+
@field:com.fasterxml.jackson.annotation.JsonProperty("status")
3345
val status: Pet.Status? = null
3446
)
3547
{

samples/server/petstore/kotlin-server/javalin-6/src/main/kotlin/org/openapitools/server/models/Tag.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ package org.openapitools.server.models
1818
* @param name
1919
*/
2020
data class Tag(
21+
22+
@field:com.fasterxml.jackson.annotation.JsonProperty("id")
2123
val id: kotlin.Long? = null,
24+
25+
@field:com.fasterxml.jackson.annotation.JsonProperty("name")
2226
val name: kotlin.String? = null
2327
)
2428

samples/server/petstore/kotlin-server/javalin-6/src/main/kotlin/org/openapitools/server/models/User.kt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,30 @@ package org.openapitools.server.models
2424
* @param userStatus User Status
2525
*/
2626
data class User(
27+
28+
@field:com.fasterxml.jackson.annotation.JsonProperty("id")
2729
val id: kotlin.Long? = null,
30+
31+
@field:com.fasterxml.jackson.annotation.JsonProperty("username")
2832
val username: kotlin.String? = null,
33+
34+
@field:com.fasterxml.jackson.annotation.JsonProperty("firstName")
2935
val firstName: kotlin.String? = null,
36+
37+
@field:com.fasterxml.jackson.annotation.JsonProperty("lastName")
3038
val lastName: kotlin.String? = null,
39+
40+
@field:com.fasterxml.jackson.annotation.JsonProperty("email")
3141
val email: kotlin.String? = null,
42+
43+
@field:com.fasterxml.jackson.annotation.JsonProperty("password")
3244
val password: kotlin.String? = null,
45+
46+
@field:com.fasterxml.jackson.annotation.JsonProperty("phone")
3347
val phone: kotlin.String? = null,
3448
/* User Status */
49+
50+
@field:com.fasterxml.jackson.annotation.JsonProperty("userStatus")
3551
val userStatus: kotlin.Int? = null
3652
)
3753

samples/server/petstore/kotlin-server/javalin/src/main/kotlin/org/openapitools/server/models/Category.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ package org.openapitools.server.models
1818
* @param name
1919
*/
2020
data class Category(
21+
22+
@field:com.fasterxml.jackson.annotation.JsonProperty("id")
2123
val id: kotlin.Long? = null,
24+
25+
@field:com.fasterxml.jackson.annotation.JsonProperty("name")
2226
val name: kotlin.String? = null
2327
)
2428

samples/server/petstore/kotlin-server/javalin/src/main/kotlin/org/openapitools/server/models/ModelApiResponse.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,14 @@ package org.openapitools.server.models
1919
* @param message
2020
*/
2121
data class ModelApiResponse(
22+
23+
@field:com.fasterxml.jackson.annotation.JsonProperty("code")
2224
val code: kotlin.Int? = null,
25+
26+
@field:com.fasterxml.jackson.annotation.JsonProperty("type")
2327
val type: kotlin.String? = null,
28+
29+
@field:com.fasterxml.jackson.annotation.JsonProperty("message")
2430
val message: kotlin.String? = null
2531
)
2632

samples/server/petstore/kotlin-server/javalin/src/main/kotlin/org/openapitools/server/models/Order.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,24 @@ package org.openapitools.server.models
2222
* @param complete
2323
*/
2424
data class Order(
25+
26+
@field:com.fasterxml.jackson.annotation.JsonProperty("id")
2527
val id: kotlin.Long? = null,
28+
29+
@field:com.fasterxml.jackson.annotation.JsonProperty("petId")
2630
val petId: kotlin.Long? = null,
31+
32+
@field:com.fasterxml.jackson.annotation.JsonProperty("quantity")
2733
val quantity: kotlin.Int? = null,
34+
35+
@field:com.fasterxml.jackson.annotation.JsonProperty("shipDate")
2836
val shipDate: java.time.OffsetDateTime? = null,
2937
/* Order Status */
38+
39+
@field:com.fasterxml.jackson.annotation.JsonProperty("status")
3040
val status: Order.Status? = null,
41+
42+
@field:com.fasterxml.jackson.annotation.JsonProperty("complete")
3143
val complete: kotlin.Boolean? = false
3244
)
3345
{

0 commit comments

Comments
 (0)