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.*;
import io.reactivex.Single;
import io.swagger.v3.oas.annotations.*;
import io.swagger.v3.oas.annotations.responses.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
{{#useBeanValidation}}
import javax.annotation.Nullable;
import javax.validation.Valid;
import javax.validation.constraints.*;
{{/useBeanValidation}}
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Optional;
{{>generatedAnnotation}}
{{#operations}}
@Controller
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}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/parameters}}) {
return Single.fromCallable(() -> {
throw new UnsupportedOperationException();
});
}
{{/contents}}
{{/operation}}
}
{{/operations}}