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

JavaJaxRS.resteasy.eap.api.mustache Maven / Gradle / Ivy

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

import {{modelPackage}}.*;

import io.swagger.annotations.ApiParam;
import io.swagger.jaxrs.*;

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

import java.util.List;
import java.util.Map;

import java.io.InputStream;

import {{javaxPackage}}.ws.rs.core.Context;
import {{javaxPackage}}.ws.rs.core.Response;
import {{javaxPackage}}.ws.rs.core.SecurityContext;
import {{javaxPackage}}.ws.rs.*;
{{#useBeanValidation}}
import {{javaxPackage}}.validation.constraints.*;
import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
{{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
{{/isMultipart}}{{/operation}}{{/operations}}
@Path("{{commonPath}}")
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}}
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}}
@io.swagger.annotations.Api(description = "the {{{baseName}}} API")
{{>generatedAnnotation}}
{{#operations}}
public interface {{classname}}  {

{{#operation}}
    @{{httpMethod}}
    {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
    {{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}}
    {{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}}
    @io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = {
        {{#authMethods}}@io.swagger.annotations.Authorization(value = "{{name}}"{{#isOAuth}}, scopes = {
            {{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}},
            {{/-last}}{{/scopes}}
        }{{/isOAuth}}){{^-last}},
        {{/-last}}{{/authMethods}}
    }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/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}}
    @io.swagger.annotations.ApiResponses(value = { {{#responses}}
        @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},
        {{/-last}}{{/responses}} })
    public Response {{nickname}}({{#isMultipart}}MultipartFormDataInput input,{{/isMultipart}}{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{^isMultipart}}{{>formParams}},{{/isMultipart}}{{#isMultipart}}{{^isFormParam}},{{/isFormParam}}{{/isMultipart}}{{/allParams}}@Context SecurityContext securityContext);
{{/operation}}
}
{{/operations}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy