forked from loafle/openapi-generator-original
* [Kotlin] [#8809] Allow optional header parameters with Kotlin and retrofit2 * [Kotlin] [#8809] Update sample client * [Kotlin] [#8809] Replace mustache dot notation with more classic style * [Kotlin] [#8809] Remove new line at the end of the mustache template
This commit is contained in:
committed by
GitHub
parent
1ff436a86a
commit
d1b8a3fac4
@@ -1 +1 @@
|
||||
{{#isHeaderParam}}@Header("{{baseName}}") {{{paramName}}}: {{{dataType}}}{{/isHeaderParam}}
|
||||
{{#isHeaderParam}}@Header("{{baseName}}") {{{paramName}}}: {{{dataType}}}{{#required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isHeaderParam}}
|
||||
@@ -34,7 +34,7 @@ interface PetApi {
|
||||
* @return [Call]<[Unit]>
|
||||
*/
|
||||
@DELETE("pet/{petId}")
|
||||
fun deletePet(@Path("petId") petId: kotlin.Long, @Header("api_key") apiKey: kotlin.String): Call<Unit>
|
||||
fun deletePet(@Path("petId") petId: kotlin.Long, @Header("api_key") apiKey: kotlin.String? = null): Call<Unit>
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
|
||||
@@ -35,7 +35,7 @@ interface PetApi {
|
||||
* @return [Call]<[Unit]>
|
||||
*/
|
||||
@DELETE("pet/{petId}")
|
||||
fun deletePet(@Path("petId") petId: kotlin.Long, @Header("api_key") apiKey: kotlin.String): Completable
|
||||
fun deletePet(@Path("petId") petId: kotlin.Long, @Header("api_key") apiKey: kotlin.String? = null): Completable
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
|
||||
@@ -34,7 +34,7 @@ interface PetApi {
|
||||
* @return [Call]<[Unit]>
|
||||
*/
|
||||
@DELETE("pet/{petId}")
|
||||
fun deletePet(@Path("petId") petId: kotlin.Long, @Header("api_key") apiKey: kotlin.String): Call<Unit>
|
||||
fun deletePet(@Path("petId") petId: kotlin.Long, @Header("api_key") apiKey: kotlin.String? = null): Call<Unit>
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
|
||||
Reference in New Issue
Block a user