Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/utils/ensure-up-to-date
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ declare -a scripts=(
"./bin/kotlin-client-string.sh"
"./bin/kotlin-client-threetenbp.sh"
"./bin/kotlin-server-petstore.sh"
"./bin/kotlin-springboot-petstore-server.sh"
"./bin/mysql-schema-petstore.sh"
"./bin/python-petstore-all.sh"
"./bin/openapi3/python-petstore.sh"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package {{package}}
interface {{classname}}Service {
{{#operation}}

fun {{operationId}}({{#allParams}}{{paramName}}: {{{dataType}}}{{#hasMore}},{{/hasMore}}{{/allParams}}): {{>returnTypes}}
fun {{operationId}}({{#allParams}}{{paramName}}: {{{dataType}}}{{^required}}?{{/required}}{{#hasMore}},{{/hasMore}}{{/allParams}}): {{>returnTypes}}
Copy link
Member

@macjohnny macjohnny Mar 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it be better to use {{>optionalDataType}}, i.e.

Suggested change
fun {{operationId}}({{#allParams}}{{paramName}}: {{{dataType}}}{{^required}}?{{/required}}{{#hasMore}},{{/hasMore}}{{/allParams}}): {{>returnTypes}}
fun {{operationId}}({{#allParams}}{{paramName}}: {{>optionalDataType}}{{#hasMore}}, {{/hasMore}}{{/allParams}}): {{>returnTypes}}

{{/operation}}
}
{{/operations}}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.springframework.stereotype.Service
class {{classname}}ServiceImpl : {{classname}}Service {
{{#operation}}

override fun {{operationId}}({{#allParams}}{{paramName}}: {{{dataType}}}{{#hasMore}},{{/hasMore}}{{/allParams}}): {{>returnTypes}} {
override fun {{operationId}}({{#allParams}}{{paramName}}: {{{dataType}}}{{^required}}?{{/required}}{{#hasMore}},{{/hasMore}}{{/allParams}}): {{>returnTypes}} {
Copy link
Member

@macjohnny macjohnny Mar 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
override fun {{operationId}}({{#allParams}}{{paramName}}: {{{dataType}}}{{^required}}?{{/required}}{{#hasMore}},{{/hasMore}}{{/allParams}}): {{>returnTypes}} {
override fun {{operationId}}({{#allParams}}{{paramName}}: {{>optionalDataType}}{{#hasMore}}, {{/hasMore}}{{/allParams}}): {{>returnTypes}} {

TODO("Implement me")
}
{{/operation}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface PetApiService {

fun addPet(body: Pet): Unit

fun deletePet(petId: Long,apiKey: String): Unit
fun deletePet(petId: Long,apiKey: String?): Unit

fun findPetsByStatus(status: List<String>): List<Pet>

Expand All @@ -17,7 +17,7 @@ interface PetApiService {

fun updatePet(body: Pet): Unit

fun updatePetWithForm(petId: Long,name: String,status: String): Unit
fun updatePetWithForm(petId: Long,name: String?,status: String?): Unit

fun uploadFile(petId: Long,additionalMetadata: String,file: org.springframework.core.io.Resource): ModelApiResponse
fun uploadFile(petId: Long,additionalMetadata: String?,file: org.springframework.core.io.Resource?): ModelApiResponse
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class PetApiServiceImpl : PetApiService {
TODO("Implement me")
}

override fun deletePet(petId: Long,apiKey: String): Unit {
override fun deletePet(petId: Long,apiKey: String?): Unit {
TODO("Implement me")
}

Expand All @@ -30,11 +30,11 @@ class PetApiServiceImpl : PetApiService {
TODO("Implement me")
}

override fun updatePetWithForm(petId: Long,name: String,status: String): Unit {
override fun updatePetWithForm(petId: Long,name: String?,status: String?): Unit {
TODO("Implement me")
}

override fun uploadFile(petId: Long,additionalMetadata: String,file: org.springframework.core.io.Resource): ModelApiResponse {
override fun uploadFile(petId: Long,additionalMetadata: String?,file: org.springframework.core.io.Resource?): ModelApiResponse {
TODO("Implement me")
}
}