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

jersey2-v3template.SecurityService.mustache Maven / Gradle / Ivy

Go to download

jersey2 generator from openapi 3.x spec files. Changing to openapitools dependencies.

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

import cd.connect.openapi.support.ApiClient;
import cd.connect.openapi.support.ApiResponse;
import cd.connect.openapi.support.Pair;
import javax.ws.rs.BadRequestException;

import javax.ws.rs.core.GenericType;
import java.io.InputStream;

import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam;

import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.*;

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

{{^fullJavaUtil}}
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.List;
  import java.util.Map;
{{/fullJavaUtil}}

{{#useBeanValidation}}
  import javax.validation.Valid;
  import javax.validation.constraints.*;
{{/useBeanValidation}}

{{>generatedAnnotation}}
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
{{#operations}}
  @Path("/{{apiName}}")
  public interface {{classname}} {

  {{#serviceDefaultUrl}}
      public static String DEFAULT_SERVICE_URL = "{{{serviceDefaultUrl}}}";
  {{/serviceDefaultUrl}}

  {{#operation}}
    /**
    * {{summary}}
    * {{notes}}
    {{#allParams}}
      * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}
    {{/allParams}}
    {{#returnType}}
      * @return {{returnType}}
    {{/returnType}}
    {{#isDeprecated}}
      * @deprecated
    {{/isDeprecated}}
    {{#externalDocs}}
      * {{description}}
      * @see {{summary}} Documentation
    {{/externalDocs}}
    */
    @{{httpMethod}}{{#subresourceOperation}}
    @Path("{{path}}"){{/subresourceOperation}}{{#hasConsumes}}
    @Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}{{#hasProduces}}
    @Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
    {{#isDeprecated}}
    @Deprecated
    {{/isDeprecated}}
    {{#vendorExtensions.x-java-annotations}}{{{.}}}{{/vendorExtensions.x-java-annotations}}
    public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}Response {{/returnType}}{{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#authMethods}}{{#hasParams}}, {{/hasParams}}@Context SecurityContext securityContext{{/authMethods}});
  {{/operation}}
  }
{{/operations}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy