handlebars.JavaMicronaut.api.mustache Maven / Gradle / Ivy
/**
* NOTE: This class is auto generated by the swagger code generator program ({{{generatorVersion}}}).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
package {{package}};
{{#imports}}import {{import}};
{{/imports}}
import com.fasterxml.jackson.databind.ObjectMapper;
import io.micronaut.http.*;
import io.micronaut.http.annotation.*;
{{#useRxJava3}}
import io.reactivex.rxjava3.core.Single;
{{/useRxJava3}}
{{^useRxJava3}}
{{#useRxJava2}}
import io.reactivex.Single;
{{/useRxJava2}}
{{/useRxJava3}}
import io.swagger.v3.oas.annotations.*;
import io.swagger.v3.oas.annotations.responses.*;
{{#useReactor}}
import org.reactivestreams.Publisher;
import reactor.core.publisher.Mono;
{{/useReactor}}
{{#useBeanValidation}}
{{#jakarta}}
import jakarta.annotation.Nullable;
import jakarta.validation.Valid;
import jakarta.validation.constraints.*;
{{/jakarta}}
{{^jakarta}}
import javax.annotation.Nullable;
import javax.validation.Valid;
import javax.validation.constraints.*;
{{/jakarta}}
{{/useBeanValidation}}
import java.io.IOException;
import java.util.List;
import java.util.Map;
{{#useOptional}}
import java.util.Optional;
{{/useOptional}}
{{>generatedAnnotation}}
{{#operations}}
public interface {{classname}} {
{{#operation}}
{{#contents}}
@Operation(summary = "{{{summary}}}", operationId = "{{{operationId}}}", description = "{{{notes}}}" {{#vendorExtensions.x-tags}}{{#@first}}, tags = {{braces "left"}}{{/@first}}"{{tag}}"{{^@last}}, {{/@last}}{{#@last}}{{braces "right"}}{{/@last}}{{/vendorExtensions.x-tags}})
{{#responses}}
@ApiResponse(responseCode = "{{{code}}}", description = "{{{message}}}")
{{/responses}}
{{#implicitHeaders}}
@ApiImplicitParams({
{{#headerParams}}
{{>implicitHeader}}
{{/headerParams}}
})
{{/implicitHeaders}}
@{{#lambda.capitalise}}{{httpMethod}}{{/lambda.capitalise}}(value = "{{{path}}}"{{#hasProduces}}, produces = { {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }{{/hasProduces}}{{#hasConsumes}}, consumes = {{braces "left"}}{{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}}{{braces "right"}}{{/hasConsumes}})
default SinglereturnTypes}}>> {{operationId}}({{#parameters}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>cookieParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/parameters}}) {
return {{^useReactor}}Single{{/useReactor}}{{#useReactor}}Mono{{/useReactor}}.fromCallable(() -> {
throw new UnsupportedOperationException();
});
}
{{/contents}}
{{/operation}}
}
{{/operations}}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy