forked from loafle/openapi-generator-original
use unescaped path in server stub templates (#5157)
This commit is contained in:
@@ -26,10 +26,10 @@ import javax.ws.rs.*;
|
||||
import javax.validation.constraints.*;
|
||||
{{/useBeanValidation}}
|
||||
|
||||
@Path("/{{baseName}}")
|
||||
@Path("/{{{baseName}}}")
|
||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
|
||||
@io.swagger.annotations.Api(description = "the {{baseName}} API")
|
||||
@io.swagger.annotations.Api(description = "the {{{baseName}}} API")
|
||||
{{>generatedAnnotation}}
|
||||
{{#operations}}
|
||||
public class {{classname}} {
|
||||
@@ -37,7 +37,7 @@ public class {{classname}} {
|
||||
|
||||
{{#operation}}
|
||||
@{{httpMethod}}
|
||||
{{#subresourceOperation}}@Path("{{path}}"){{/subresourceOperation}}
|
||||
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
|
||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
|
||||
@io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = {
|
||||
|
||||
@@ -21,10 +21,10 @@ import java.util.List;
|
||||
{{#useBeanValidation}}
|
||||
import javax.validation.constraints.*;
|
||||
{{/useBeanValidation}}
|
||||
@Path("/{{baseName}}")
|
||||
@Path("/{{{baseName}}}")
|
||||
@RequestScoped
|
||||
|
||||
@Api(description = "the {{baseName}} API")
|
||||
@Api(description = "the {{{baseName}}} API")
|
||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
|
||||
{{>generatedAnnotation}}
|
||||
@@ -39,7 +39,7 @@ public class {{classname}} {
|
||||
{{#operation}}
|
||||
|
||||
@{{httpMethod}}
|
||||
{{#subresourceOperation}}@Path("{{path}}"){{/subresourceOperation}}
|
||||
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
|
||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||
{{#hasProduces}}@Produces({ {{#produces}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
|
||||
@ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = {
|
||||
|
||||
@@ -32,7 +32,7 @@ public interface {{classname}} {
|
||||
{{#operation}}
|
||||
|
||||
@{{httpMethod}}
|
||||
{{#subresourceOperation}}@Path("{{path}}"){{/subresourceOperation}}
|
||||
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
|
||||
{{#hasConsumes}}
|
||||
@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} })
|
||||
{{/hasConsumes}}
|
||||
|
||||
@@ -69,7 +69,7 @@ public class {{classname}}Test {
|
||||
api = JAXRSClientFactory.create("http://localhost:" + serverPort + "/services", {{classname}}.class, providers);
|
||||
{{/generateSpringBootApplication}}
|
||||
{{^generateSpringBootApplication}}
|
||||
api = JAXRSClientFactory.create("{{basePath}}", {{classname}}.class, providers);
|
||||
api = JAXRSClientFactory.create("{{{basePath}}}", {{classname}}.class, providers);
|
||||
{{/generateSpringBootApplication}}
|
||||
org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@ import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.SecurityContext;
|
||||
import javax.ws.rs.*;
|
||||
|
||||
@Path("/{{baseName}}")
|
||||
@Path("/{{{baseName}}}")
|
||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
|
||||
@io.swagger.annotations.Api(description = "the {{baseName}} API")
|
||||
@io.swagger.annotations.Api(description = "the {{{baseName}}} API")
|
||||
{{>generatedAnnotation}}
|
||||
{{#operations}}
|
||||
public class {{classname}} {
|
||||
@@ -39,7 +39,7 @@ public class {{classname}} {
|
||||
|
||||
{{#operation}}
|
||||
@{{httpMethod}}
|
||||
{{#subresourceOperation}}@Path("{{path}}"){{/subresourceOperation}}
|
||||
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
|
||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
|
||||
@io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = {
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>swagger.api.basepath</param-name>
|
||||
<param-value>{{basePath}}</param-value>
|
||||
<param-value>{{{basePath}}}</param-value>
|
||||
</init-param>
|
||||
<load-on-startup>2</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
@@ -24,10 +24,10 @@ import javax.validation.constraints.*;
|
||||
{{/useBeanValidation}}
|
||||
{{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
|
||||
{{/isMultipart}}{{/operation}}{{/operations}}
|
||||
@Path("/{{baseName}}")
|
||||
@Path("/{{{baseName}}}")
|
||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
|
||||
@io.swagger.annotations.Api(description = "the {{baseName}} API")
|
||||
@io.swagger.annotations.Api(description = "the {{{baseName}}} API")
|
||||
{{>generatedAnnotation}}
|
||||
{{#operations}}
|
||||
public class {{classname}} {
|
||||
@@ -35,7 +35,7 @@ public class {{classname}} {
|
||||
|
||||
{{#operation}}
|
||||
@{{httpMethod}}
|
||||
{{#subresourceOperation}}@Path("{{path}}"){{/subresourceOperation}}
|
||||
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
|
||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
|
||||
@io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = {
|
||||
|
||||
@@ -21,17 +21,17 @@ import javax.validation.constraints.*;
|
||||
{{/useBeanValidation}}
|
||||
{{#operations}}{{#operation}}{{#isMultipart}}import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
|
||||
{{/isMultipart}}{{/operation}}{{/operations}}
|
||||
@Path("/{{baseName}}")
|
||||
@Path("/{{{baseName}}}")
|
||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
|
||||
@io.swagger.annotations.Api(description = "the {{baseName}} API")
|
||||
@io.swagger.annotations.Api(description = "the {{{baseName}}} API")
|
||||
{{>generatedAnnotation}}
|
||||
{{#operations}}
|
||||
public interface {{classname}} {
|
||||
|
||||
{{#operation}}
|
||||
@{{httpMethod}}
|
||||
{{#subresourceOperation}}@Path("{{path}}"){{/subresourceOperation}}
|
||||
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
|
||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
|
||||
@io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = {
|
||||
|
||||
@@ -13,9 +13,9 @@ import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
{{/useBeanValidation}}
|
||||
|
||||
@Path("/{{baseName}}")
|
||||
@Path("/{{{baseName}}}")
|
||||
|
||||
@Api(description = "the {{baseName}} API")
|
||||
@Api(description = "the {{{baseName}}} API")
|
||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
|
||||
{{>generatedAnnotation}}
|
||||
@@ -25,7 +25,7 @@ public class {{classname}} {
|
||||
{{#operation}}
|
||||
|
||||
@{{httpMethod}}
|
||||
{{#subresourceOperation}}@Path("{{path}}"){{/subresourceOperation}}
|
||||
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
|
||||
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }){{/hasConsumes}}
|
||||
{{#hasProduces}}@Produces({ {{#produces}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }){{/hasProduces}}
|
||||
@ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = {
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>swagger.api.basepath</param-name>
|
||||
<param-value>{{basePath}}</param-value>
|
||||
<param-value>{{{basePath}}}</param-value>
|
||||
</init-param>
|
||||
|
||||
<load-on-startup>2</load-on-startup>
|
||||
|
||||
Reference in New Issue
Block a user