openapi.templates.kora.kotlinApiResponses.mustache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openapi-generator Show documentation
Show all versions of openapi-generator Show documentation
Kora openapi-generator module
The newest version!
/**
* NOTE: This class is auto generated by Kora OpenAPI Generator (https://openapi-generator.tech) ({{{generatorVersion}}}).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package {{package}}
{{#imports}}import {{import}}
{{/imports}}
@ru.tinkoff.kora.common.annotation.Generated("openapi generator kora client"){{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}
interface {{classname}}Responses {
{{#operations}}
{{#operation}}{{#vendorExtensions.singleResponse}}{{#responses}}
/**
* {{message}} (status code {{code}})
*/
{{#vendorExtensions.hasData}}data {{/vendorExtensions.hasData}}class {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}ApiResponse(
{{#dataType}}{{#isDefault}}val statusCode: Int,
{{/isDefault}}val content: {{{dataType}}}{{#hasHeaders}},{{/hasHeaders}}{{/dataType}}
{{^dataType}}{{#isDefault}}val statusCode: Int{{#hasHeaders}},{{/hasHeaders}}{{/isDefault}}{{/dataType}}
{{#headers}}
val {{#lambda.camelcase}}{{nameInCamelCase}}{{/lambda.camelcase}}: String{{^required}}?{{/required}}{{^-last}},{{/-last}}
{{/headers}}
)
{{/responses}}{{/vendorExtensions.singleResponse}}{{^vendorExtensions.singleResponse}}
sealed interface {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}ApiResponse {
{{#responses}}
/**
* {{message}} (status code {{code}})
*/
{{#vendorExtensions.hasData}}data {{/vendorExtensions.hasData}}class {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}{{#isDefault}}Default{{/isDefault}}{{^isDefault}}{{code}}{{/isDefault}}ApiResponse(
{{#dataType}}{{#isDefault}}val statusCode: Int,
{{/isDefault}}val content: {{{dataType}}}{{#hasHeaders}},{{/hasHeaders}}{{/dataType}}
{{^dataType}}{{#isDefault}}val statusCode: Int{{#hasHeaders}},{{/hasHeaders}}{{/isDefault}}{{/dataType}}
{{#headers}}
val {{#lambda.camelcase}}{{nameInCamelCase}}{{/lambda.camelcase}}: String{{^required}}?{{/required}}{{^-last}},{{/-last}}
{{/headers}}
) : {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}ApiResponse
{{/responses}}
}
{{/vendorExtensions.singleResponse}}
{{/operation}}
{{/operations}}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy