github.com/phrase/openapi@v0.0.0-20240514140800-49e8a106740e/openapi-generator/templates/java/libraries/microprofile/api.mustache (about) 1 {{>licenseInfo}} 2 package {{package}}; 3 4 {{#imports}}import {{import}}; 5 {{/imports}} 6 7 import java.io.InputStream; 8 import java.io.OutputStream; 9 import java.util.List; 10 import java.util.Map; 11 import javax.ws.rs.*; 12 import javax.ws.rs.core.Response; 13 import javax.ws.rs.core.MediaType; 14 {{^disableMultipart}} 15 import org.apache.cxf.jaxrs.ext.multipart.*; 16 {{/disableMultipart}} 17 18 import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; 19 import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; 20 21 {{#appName}} 22 /** 23 * {{{appName}}} 24 * 25 {{#appDescription}} 26 * <p>{{{appDescription}}} 27 * 28 {{/appDescription}} 29 */ 30 {{/appName}} 31 32 @RegisterRestClient 33 @RegisterProvider(ApiExceptionMapper.class) 34 @Path("{{^useAnnotatedBasePath}}/{{/useAnnotatedBasePath}}{{#useAnnotatedBasePath}}{{contextPath}}{{/useAnnotatedBasePath}}") 35 public interface {{classname}} { 36 {{#operations}} 37 {{#operation}} 38 39 {{#summary}} 40 /** 41 * {{summary}} 42 * 43 {{#notes}} 44 * {{notes}} 45 * 46 {{/notes}} 47 */ 48 {{/summary}} 49 @{{httpMethod}} 50 {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}} 51 {{#hasConsumes}} 52 @Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }) 53 {{/hasConsumes}} 54 {{#hasProduces}} 55 @Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }) 56 {{/hasProduces}} 57 public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException, ProcessingException; 58 {{/operation}} 59 } 60 {{/operations}} 61