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

JavaJaxRS.cxf.api.mustache Maven / Gradle / Ivy

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

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

import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
import java.util.Map;
import {{javaxPackage}}.ws.rs.*;
import {{javaxPackage}}.ws.rs.core.Response;
import {{javaxPackage}}.ws.rs.core.MediaType;
import org.apache.cxf.jaxrs.ext.multipart.*;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.ApiResponse;
import io.swagger.jaxrs.PATCH;
{{#useBeanValidation}}
import {{javaxPackage}}.validation.constraints.*;
import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}

{{#appName}}
/**
 * {{{appName}}}
 *
 {{#appDescription}}
 * 

{{{.}}} * {{/appDescription}} */ {{/appName}} @Path("{{#useAnnotatedBasePath}}{{contextPath}}{{/useAnnotatedBasePath}}{{commonPath}}") @Api(value = "/", description = "{{description}}") {{#addConsumesProducesJson}} @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) {{/addConsumesProducesJson}} public interface {{classname}} { {{#operations}} {{#operation}} {{#summary}} /** * {{summary}} * {{#notes}} * {{.}} * {{/notes}} */ {{/summary}} @{{httpMethod}} {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}} {{#hasConsumes}} @Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }) {{/hasConsumes}} {{#hasProduces}} @Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }) {{/hasProduces}} @ApiOperation(value = "{{{summary}}}", tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }) {{#implicitHeadersParams.0}} @io.swagger.annotations.ApiImplicitParams({ {{#implicitHeadersParams}} @io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}} {{/implicitHeadersParams}} }) {{/implicitHeadersParams.0}} @ApiResponses(value = { {{#responses}} @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{^vendorExtensions.x-java-is-response-void}}, response = {{#isFile}}{{#useAbstractionForFiles}}InputStream{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{baseType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{baseType}}}{{/isFile}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}{{/vendorExtensions.x-java-is-response-void}}){{^-last}},{{/-last}}{{/responses}} }) public {{>returnTypes}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}); {{/operation}} } {{/operations}}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy