All Downloads are FREE. Search and download functionalities are using the official Maven repository.

openapi.templates.kora.javaApiResponses.mustache Maven / Gradle / Ivy

There is a newer version: 1.1.16
Show 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