diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaJerseyServerCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaJerseyServerCodegen.java index 32da243f7b4..53b367da68e 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaJerseyServerCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaJerseyServerCodegen.java @@ -28,7 +28,7 @@ public JavaJerseyServerCodegen() additionalProperties.put("title", title); - embeddedTemplateDir = templateDir = JAXRS_TEMPLATE_DIRECTORY_NAME + File.separator + "jersey1_18"; + embeddedTemplateDir = templateDir = JAXRS_TEMPLATE_DIRECTORY_NAME; for ( int i = 0; i < cliOptions.size(); i++ ) { if ( CodegenConstants.LIBRARY.equals(cliOptions.get(i).getOpt()) ) { @@ -43,6 +43,7 @@ public JavaJerseyServerCodegen() Map supportedLibraries = new LinkedHashMap(); supportedLibraries.put(DEFAULT_LIBRARY, "Jersey core 1.18.1"); + supportedLibraries.put("jersey2", "HTTP client: Jersey client 2.22"); library.setEnum(supportedLibraries); cliOptions.add(library); @@ -88,6 +89,11 @@ public void processOpts() { writeOptional(outputFolder, new SupportingFile("web.mustache", ("src/main/webapp/WEB-INF"), "web.xml")); supportingFiles.add(new SupportingFile("StringUtil.mustache", (sourceFolder + '/' + apiPackage).replace(".", "/"), "StringUtil.java")); + // default: jersey 1.18 + if (getLibrary() == null) { + setTemplateDir( JAXRS_TEMPLATE_DIRECTORY_NAME + File.separator + "jersey1_18" ); + } + if ( additionalProperties.containsKey("dateLibrary") ) { setDateLibrary(additionalProperties.get("dateLibrary").toString()); additionalProperties.put(dateLibrary, "true"); diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/ApiException.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/ApiException.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/ApiException.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/ApiException.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/ApiOriginFilter.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/ApiOriginFilter.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/ApiOriginFilter.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/ApiOriginFilter.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/ApiResponseMessage.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/ApiResponseMessage.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/ApiResponseMessage.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/ApiResponseMessage.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/JodaDateTimeProvider.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/JodaDateTimeProvider.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/JodaDateTimeProvider.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/JodaDateTimeProvider.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/JodaLocalDateProvider.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/JodaLocalDateProvider.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/JodaLocalDateProvider.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/JodaLocalDateProvider.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/LocalDateProvider.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/LocalDateProvider.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/LocalDateProvider.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/LocalDateProvider.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/LocalDateTimeProvider.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/LocalDateTimeProvider.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/LocalDateTimeProvider.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/LocalDateTimeProvider.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/NotFoundException.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/NotFoundException.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/NotFoundException.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/NotFoundException.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/README.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/README.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/README.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/README.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/StringUtil.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/StringUtil.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/StringUtil.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/StringUtil.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/allowableValues.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/allowableValues.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/allowableValues.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/allowableValues.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/apiServiceFactory.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/apiServiceFactory.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/apiServiceFactory.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/apiServiceFactory.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/bodyParams.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/bodyParams.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/bodyParams.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/bodyParams.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/enumClass.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/enumClass.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/enumClass.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/enumClass.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/enumOuterClass.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/enumOuterClass.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/enumOuterClass.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/enumOuterClass.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/formParams.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/formParams.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/formParams.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/formParams.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/generatedAnnotation.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/generatedAnnotation.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/generatedAnnotation.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/generatedAnnotation.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/headerParams.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/headerParams.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/headerParams.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/headerParams.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/libraries/jersey2/api.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/libraries/jersey2/api.mustache new file mode 100644 index 00000000000..0eeb1cc707b --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/libraries/jersey2/api.mustache @@ -0,0 +1,58 @@ +package {{package}}; + +import {{modelPackage}}.*; +import {{package}}.{{classname}}Service; +import {{package}}.factories.{{classname}}ServiceFactory; + +import io.swagger.annotations.ApiParam; + +import com.sun.jersey.multipart.FormDataParam; + +{{#imports}}import {{import}}; +{{/imports}} + +import java.util.List; +import {{package}}.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jerse.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.*; + +@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") +{{>generatedAnnotation}} +{{#operations}} +public class {{classname}} { + private final {{classname}}Service delegate = {{classname}}ServiceFactory.get{{classname}}(); + +{{#operation}} + @{{httpMethod}} + {{#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 = { + {{#authMethods}}@io.swagger.annotations.Authorization(value = "{{name}}"{{#isOAuth}}, scopes = { + {{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}}, + {{/hasMore}}{{/scopes}} + }{{/isOAuth}}){{#hasMore}}, + {{/hasMore}}{{/authMethods}} + }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.x-tags}} }) + @io.swagger.annotations.ApiResponses(value = { {{#responses}} + @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}){{#hasMore}}, + {{/hasMore}}{{/responses}} }) + + public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}},{{/allParams}}@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.{{nickname}}({{#allParams}}{{#isFile}}inputStream, fileDetail{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}},{{/allParams}}securityContext); + } +{{/operation}} +} +{{/operations}} diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/libraries/jersey2/apiService.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/libraries/jersey2/apiService.mustache new file mode 100644 index 00000000000..aa459b93ce3 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/libraries/jersey2/apiService.mustache @@ -0,0 +1,30 @@ +package {{package}}; + +import {{package}}.*; +import {{modelPackage}}.*; + +import org.glassfish.jersey.media.multipart.FormDataParam; + +{{#imports}}import {{import}}; +{{/imports}} + +import java.util.List; +import {{package}}.NotFoundException; + +import java.io.InputStream; + +import com.sun.jersey.core.header.FormDataContentDisposition; +import com.sun.jersey.multipart.FormDataParam; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; + +{{>generatedAnnotation}} +{{#operations}} +public abstract class {{classname}}Service { + {{#operation}} + public abstract Response {{nickname}}({{#allParams}}{{>serviceQueryParams}}{{>servicePathParams}}{{>serviceHeaderParams}}{{>serviceBodyParams}}{{>serviceFormParams}},{{/allParams}}SecurityContext securityContext) + throws NotFoundException; + {{/operation}} +} +{{/operations}} diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/libraries/jersey2/apiServiceImpl.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/libraries/jersey2/apiServiceImpl.mustache new file mode 100644 index 00000000000..fc83da89897 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/libraries/jersey2/apiServiceImpl.mustache @@ -0,0 +1,34 @@ +package {{package}}.impl; + +import {{package}}.*; +import {{modelPackage}}.*; + +import org.glassfish.jersey.media.multipart.FormDataParam; + +{{#imports}}import {{import}}; +{{/imports}} + +import java.util.List; +import {{package}}.NotFoundException; + +import java.io.InputStream; + +import com.sun.jersey.core.header.FormDataContentDisposition; +import com.sun.jersey.multipart.FormDataParam; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; + +{{>generatedAnnotation}} +{{#operations}} +public class {{classname}}ServiceImpl extends {{classname}}Service { + {{#operation}} + @Override + public Response {{nickname}}({{#allParams}}{{>serviceQueryParams}}{{>servicePathParams}}{{>serviceHeaderParams}}{{>serviceBodyParams}}{{>serviceFormParams}}, {{/allParams}}SecurityContext securityContext) + throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + {{/operation}} +} +{{/operations}} diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/libraries/jersey2/pom.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/libraries/jersey2/pom.mustache new file mode 100644 index 00000000000..6e9dae4239a --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/libraries/jersey2/pom.mustache @@ -0,0 +1,157 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + + src/main/java + + + org.apache.maven.plugins + maven-war-plugin + 2.1.1 + + + maven-failsafe-plugin + 2.6 + + + + integration-test + verify + + + + + + org.eclipse.jetty + jetty-maven-plugin + ${jetty-version} + + + / + + target/${project.artifactId}-${project.version} + 8079 + stopit + + {{serverPort}} + 60000 + + + + + start-jetty + pre-integration-test + + start + + + 0 + true + + + + stop-jetty + post-integration-test + + stop + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.9.1 + + + add-source + generate-sources + + add-source + + + + src/gen/java + + + + + + + + + + io.swagger + swagger-jersey2-jaxrs + ${swagger-core-version} + + + org.slf4j + slf4j-log4j12 + ${slf4j-version} + + + + javax.ws.rs + javax.ws.rs-api + ${jaxrs-version} + + + + javax.servlet + javax.servlet-api + ${servlet-api-version} + provided + + + + junit + junit + ${junit-version} + test + + + + org.testng + testng + 6.8.8 + test + + + junit + junit + + + snakeyaml + org.yaml + + + bsh + org.beanshell + + + + + + + sonatype-snapshots + https://oss.sonatype.org/content/repositories/snapshots + + true + + + + + 1.5.7 + 9.2.9.v20150224 + 2.0.1 + 2.22.1 + 1.6.3 + 4.8.1 + 3.1.0 + + diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/libraries/jersey2/web.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/libraries/jersey2/web.mustache new file mode 100644 index 00000000000..f0fb32d5c39 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/libraries/jersey2/web.mustache @@ -0,0 +1,50 @@ + + + + + jersey + org.glassfish.jersey.servlet.ServletContainer + + jersey.config.server.provider.packages + + io.swagger.jaxrs.json, + io.swagger.jaxrs.listing, + {{apiPackage}} + + + 1 + + + + DefaultJaxrsConfig + io.swagger.jaxrs.config.DefaultJaxrsConfig + + api.version + 1.0.0 + + + swagger.api.title + {{{title}}} + + + swagger.api.basepath + {{basePath}} + + 2 + + + + jersey + {{contextPath}}/* + + + ApiOriginFilter + {{apiPackage}}.ApiOriginFilter + + + ApiOriginFilter + /* + + diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/model.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/model.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/model.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/model.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/pathParams.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/pathParams.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/pathParams.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/pathParams.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/pojo.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/pojo.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/pojo.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/pojo.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/project/build.properties b/modules/swagger-codegen/src/main/resources/JavaJaxRS/project/build.properties similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/project/build.properties rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/project/build.properties diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/project/plugins.sbt b/modules/swagger-codegen/src/main/resources/JavaJaxRS/project/plugins.sbt similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/project/plugins.sbt rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/project/plugins.sbt diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/queryParams.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/queryParams.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/queryParams.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/queryParams.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/returnTypes.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/returnTypes.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/returnTypes.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/returnTypes.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/serviceBodyParams.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/serviceBodyParams.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/serviceBodyParams.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/serviceBodyParams.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/serviceFormParams.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/serviceFormParams.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/serviceFormParams.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/serviceFormParams.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/serviceHeaderParams.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/serviceHeaderParams.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/serviceHeaderParams.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/serviceHeaderParams.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/servicePathParams.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/servicePathParams.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/servicePathParams.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/servicePathParams.mustache diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/serviceQueryParams.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/serviceQueryParams.mustache similarity index 100% rename from modules/swagger-codegen/src/main/resources/JavaJaxRS/jersey1_18/serviceQueryParams.mustache rename to modules/swagger-codegen/src/main/resources/JavaJaxRS/serviceQueryParams.mustache diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/java/jaxrs/AllowableValuesTest.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/java/jaxrs/AllowableValuesTest.java index 4a4e6ff9180..aa81a3cf81e 100644 --- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/java/jaxrs/AllowableValuesTest.java +++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/java/jaxrs/AllowableValuesTest.java @@ -17,7 +17,7 @@ public class AllowableValuesTest { - private static final String TEMPLATE_FILE = "JavaJaxRS/jersey1_18/allowableValues.mustache"; + private static final String TEMPLATE_FILE = "JavaJaxRS/allowableValues.mustache"; private static final String PROVIDER_NAME = "operations"; private static String loadClassResource(Class cls, String name) throws IOException {