openapi.templates.kora.javaApiResponses.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}}
import jakarta.annotation.Nullable;
@ru.tinkoff.kora.common.annotation.Generated("openapi generator kora client"){{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}
public interface {{classname}}Responses {
{{#operations}}
{{#operation}}{{#vendorExtensions.singleResponse}}{{#responses}}
/**
* {{message}} (status code {{code}})
*/
@ru.tinkoff.kora.common.annotation.Generated("openapi generator kora client")
public record {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}ApiResponse(
{{#dataType}}{{#isDefault}}int statusCode,
{{/isDefault}}{{{dataType}}} content{{#hasHeaders}},{{/hasHeaders}}{{/dataType}}{{^dataType}}{{#isDefault}}int statusCode{{#hasHeaders}},{{/hasHeaders}}{{/isDefault}}{{/dataType}}{{#headers}}{{^required}}
@Nullable{{/required}}
String {{#lambda.camelcase}}{{nameInCamelCase}}{{/lambda.camelcase}}{{^-last}},{{/-last}}{{/headers}}
){}
{{/responses}}{{/vendorExtensions.singleResponse}}{{^vendorExtensions.singleResponse}}
public sealed interface {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}ApiResponse {
{{#responses}}
/**
* {{message}} (status code {{code}})
*/
@ru.tinkoff.kora.common.annotation.Generated("openapi generator kora client")
public record {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}{{#isDefault}}Default{{/isDefault}}{{^isDefault}}{{code}}{{/isDefault}}ApiResponse(
{{#dataType}}{{#isDefault}}int statusCode,
{{/isDefault}}{{{dataType}}} content{{#hasHeaders}},{{/hasHeaders}}{{/dataType}}{{^dataType}}{{#isDefault}}int statusCode{{#hasHeaders}},{{/hasHeaders}}{{/isDefault}}{{/dataType}}{{#headers}}{{^required}}
@Nullable{{/required}}
String {{#lambda.camelcase}}{{nameInCamelCase}}{{/lambda.camelcase}}{{^-last}},{{/-last}}{{/headers}}
) implements {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}ApiResponse {}
{{/responses}}
}
{{/vendorExtensions.singleResponse}}
{{/operation}}
{{/operations}}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy