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

handlebars.JavaMicronaut.apiController.mustache Maven / Gradle / Ivy

There is a newer version: 1.0.55
Show newest version
package {{package}};

{{#imports}}
import {{import}};

{{/imports}}
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.HttpResponse;
{{#useRxJava3}}
import io.reactivex.rxjava3.core.Single;
{{/useRxJava3}}
{{^useRxJava3}}
{{#useRxJava2}}
import io.reactivex.Single;
{{/useRxJava2}}
{{/useRxJava3}}
{{#useReactor}}
import org.reactivestreams.Publisher;
import reactor.core.publisher.Mono;
{{/useReactor}}

{{#useBeanValidation}}
import javax.annotation.Nullable;
import javax.validation.Valid;
import javax.validation.constraints.*;
{{/useBeanValidation}}
import java.util.List;
import java.util.Map;
{{#useOptional}}
import java.util.Optional;
{{/useOptional}}

{{#operations}}
@Controller
public class {{classname}}Controller implements {{classname}} {
{{#operation}}
{{#contents}}

    @Override
    public SinglereturnTypes}}>> {{operationId}}({{#parameters}}{{#useBeanValidation}}{{!
    Bean validation spec for path parameters (PathParam is always required)
}}{{#isPathParam}}{{>beanValidationParams}}{{/isPathParam}}{{!
    Bean validation spec for any other parameters
}}{{^isPathParam}}{{>nullableBeanValidationParams}}{{/isPathParam}}{{/useBeanValidation}}{{!
    Method argument type and name
}}{{>optionalDataType}} {{paramName}}{{!
    Arguments separator, if required
}}{{#hasMore}}, {{/hasMore}}{{/parameters}}) {
        // TODO: Implement me
        return {{classname}}.super.{{operationId}}({{#parameters}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/parameters}});
    }
{{/contents}}
{{/operation}}
}
{{/operations}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy