kotlin-client.libraries.jvm-retrofit2.api.mustache Maven / Gradle / Ivy
The newest version!
package {{apiPackage}}
import {{packageName}}.infrastructure.CollectionFormats.*
import retrofit2.http.*
import retrofit2.Call
import okhttp3.RequestBody
import okhttp3.ResponseBody
import okhttp3.MultipartBody
{{#imports}}import {{import}}
{{/imports}}
{{#operations}}
interface {{classname}} {
{{#operation}}
{{#isDeprecated}}
@Deprecated("This api was deprecated")
{{/isDeprecated}}
{{#formParams}}
{{#-first}}
{{#isMultipart}}@Multipart{{/isMultipart}}{{^isMultipart}}@FormUrlEncoded{{/isMultipart}}
{{/-first}}
{{/formParams}}
{{^formParams}}
{{#prioritizedContentTypes}}
{{#-first}}
@Headers({
"Content-Type:{{{mediaType}}}"
})
{{/-first}}
{{/prioritizedContentTypes}}
{{/formParams}}
@{{httpMethod}}("{{{path}}}")
fun {{operationId}}({{^allParams}}){{/allParams}}{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}}, {{/hasMore}}{{^hasMore}}){{/hasMore}}{{/allParams}}: Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}}{{/isResponseFile}}>
{{/operation}}
}
{{/operations}}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy